Hi all,

I have changed the default output format in OpenModelica r8000 from "plt" to "mat". val() and plot() commands work as they used to, but val() now also works on parameters when using the .mat format. If you find that changing the default breaks existing functionality, use outputFormat="plt" as a workaround, and then post a bug at http://openmodelica.org:8080/cb/proj/tracker/browseTracker.do?tracker_id=1 or as a reply to this list. The same goes if you find bugs with the handling of the .mat format (wrong interpolation of data points, garbage variable names, bad performance for certain input, etc).

I will also mention a rather recent scripting function: readSimulationResultVars(filename). It returns the variables you can use plot() and val() commands on (see OPENMODELICAHOME/lib/omc/ModelicaBuiltin.mo for more details on scripting functions).

Of course it's possible to load the file in MATLAB or Octave (my preference, since it's free) to do some post-processing of data

octave:2> load A_res
octave:3> data_1 # All parameters; first one is startTime/stopTime
data_1 =

   0   1
octave:4> data_2(:,1) # All variables at the first time step, time is the first one...
ans =

   0
   0
   0
   0
octave:5> name'
ans =

time
$dummy
der($dummy)
r
octave:6> dataInfo # Which variable corresponds to which column; variable 4 (r) corresponds to data_2, column 4
dataInfo =

   0   2   2   2
   1   2   3   4
   0   0   0   0
  -1  -1  -1  -1

--
Martin Sjölund

Reply via email to