simulate a MapleSim model - MapleSim Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : MapleSim : MapleSim Application Programming Interface : Deprecated Commands : MapleSim/RunSimulation(deprecated)

MapleSim[RunSimulation(deprecated)] - simulate a MapleSim model

Calling Sequence

RunSimulation(MCodeStr, MName, duration, opts)




string; the Modelica source file name or the Modelica code of the model to simulate



string; the name of the model to simulate



(optional) Or(realcons,realcons..realcons); the simulation duration



(optional) equation(s) of the form option = value; specify options for RunSimulation



Important: The RunSimulation command has been deprecated.


The RunSimulation command simulates MapleSim models. It returns plots displaying simulation results, as determined by calls to dsolve/numeric, for the specified model.


The MCodeStr parameter specifies the Modelica source of the MapleSim model for which you want to view simulation graphs. You can either export an existing MapleSim model to a Modelica file (.mo) and specify the Modelica source file name, or create a string containing the Modelica code.


If you want to create a string containing the Modelica code, you must also set the is_immediate input option to true; otherwise, if you want to specify the Modelica source file name, set the is_immediate option to false.


For more information about exporting a MapleSim model to a Modelica file, see Exporting a Model to a Modelica File.


The MName parameter specifies which model or subsystem to simulate. You can simulate the top-level model or a subsystem defined in your model.


The optional duration parameter specifies the simulation time in seconds. If this parameter is of type/realcons, the start time is 0 and the duration value is the end time. The default value is 0..10 seconds.



Run the Modelica file located in the MapleSim example directory. The name of the model to simulate is Main.



Create a Modelica source file as a string and use the is_immediate option. The name of the model is test.

modelica model test annotation(probes={x,y}); // specify the signals to plot Real x,y; equation // Create a delayed ramp. y = if time < 1 then 0 else time-1; der(x) = y; end test;&colon;


See Also


Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam