loadres scriptΒΆ

Load results from Modelica simulation(s) and/or linearization(s) and provide a Python session to analyze the results.

This script can be executed from the command line. It accepts as arguments the names of result files or directories with result files. Wildcards can be used. If no arguments are given, then the script provides a dialog to choose files or a folder. After loading files, it provides working session of IPython with the results available. PyLab is imported (from pylab import *) to provide many functions of NumPy and matplotlib (e.g., sin() and plot()). The essential classes and functions of ModelicaRes are imported as well (from modelicares import *).

Setup and example:

Open a command prompt in the examples folder from the ModelicaRes distribution and execute the following command:

$ loadres ChuaCircuit.mat PID.mat
A simulation result has been loaded into sim (a SimRes instance).
A linearization result has been loaded into lin (a LinRes instance).

If this does not work, then the loadres script probably has not been installed to a location recognized by the operating system. Instead, copy it into the examples folder and try again. If necessary, call Python explicitly (python loadres ChuaCircuit.mat PID.mat).

Please also see the tutorial, which is available as an IPython notebook or online as a static page.