User manual

18
New command for multi-simulation
A new built-in function has been added:
simulateMultiResultsModel. The function is
similar to the existing built-in function
simulateMultiExtendedModel; the difference is
that the result of using the existing one gives the endpoints, while the result of the new
function is the whole trajectories.
An example of call is:
simulateMultiResultsModel(
"Modelica.Mechanics.Rotational.Examples.CoupledClutches",
stopTime=1.2, numberOfIntervals=10, resultFile="CoupleCluches",
initialNames={"freqHz"}, initialValues=[0.1;0.2;0.3;0.4],
resultNames={"J1.w","J3.w"});
A comparison between the now available built-in functions for simulation:
Function
Additional input
Output
simulateModel
Trajectories for one
simulation.
simulateExtendedModel
Parameter values and start
values (for one simulation).
Endpoints for one
simulation.
simulateMultiExtendedModel
As simulateExtended model,
but for several simulations.
Endpoints for several
simulations.
simulateMultiResultsModel
As simulateExtended model,
but for several simulations.
Trajectories for several
simulations.
3.3.4 Minor improvements
Improving the code efficiency when using the Visual Studio 2012
compiler
The Visual Studio 2012 compiler is fully supported. However, this compiler by default
generates a bit less efficient code than previous versions of the compiler, with the selected
optimization settings. As a temporary work-around you can set the flag
Advanced.Define.GlobalOptimizations = 2;
before generating code, to activate global optimization in the compiler. (The default value of
the flag is 0.)
This flag works the same for all Visual Studio compilers, but the effect on compilers of
previous versions is small. For the Visual Studio 2012 compiler, however, the simulation
performance is restored, but the compilation of the code might take substantially longer for
large models.
The setting above corresponds to the compiler command
/Og.