Parameters

 options - (optional) equation(s) of the form name = value

Returns

 • If returntype = datapoint or returntype = [datapoint,plot] then
 – Array or list : the simulation results as an Array of data values or a list consisting of the simulation results as an Array and a list of plot structures.
 • If returntype = plot then
 – none
 Note: Plots of the simulation results are displayed, but the actual return of the A:-Simulate command is NULL.

Description

 • A:-Simulate simulates linked model A.
 • The simulation engine uses the default settings stored in the model (as set under the Settings tab of the MapleSim GUI). The solver option can be used to change the solver type. For example, A:-Simulate(solver = "Euler") replaces the solver stored in the model with the fixed-step "Euler" solver. Use A:-GetSettings to see the default simulation settings stored in the model. This returns the settings for the solver specified under the Settings tab in the MapleSim GUI. The solver type must be changed using the MapleSim GUI in order to view its default settings using A:-GetSettings command.
 • The A := MapleSim:-LinkModel() statement needs to be run prior to successfully using any of the ModelObject A's export functions.

Examples

 > $A≔\mathrm{MapleSim}:-\mathrm{LinkModel}\left('\mathrm{filename}'=\mathrm{cat}\left(\mathrm{kernelopts}\left('\mathrm{toolboxdir}'=\mathrm{MapleSim}\right),"/data/examples/RLCcircuit.msim"\right)\right):$

Simulating the active system with default options:

 > $A:-\mathrm{Simulate}\left(\right)$

Simulating the active system with various options:

 > $\mathrm{simData}≔A:-\mathrm{Simulate}\left(\mathrm{returntype}=\mathrm{datapoint},\mathrm{tf}=2.0,\mathrm{abserr}=0.1\right)$
 ${\mathrm{simData}}{:=}\left[\begin{array}{c}{\mathrm{200 x 2}}{\mathrm{Matrix}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{Fortran_order}}\end{array}\right]$ (1)
 > $\mathrm{plot}\left({\mathrm{simData}}_{1..-1,1},{\mathrm{simData}}_{1..-1,2}\right)$