simulate the linked MapleSim model - MapleSim Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim : MapleSim Application Programming Interface : API Commands : MapleSim/LinkModel/Simulate

Simulate - simulate the linked MapleSim model

Calling Sequence

A := MapleSim:-LinkModel();

A:-Simulate(options)

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

Linking to a MapleSim model (located in .msim file):

AMapleSim:-LinkModel'filename'=catkernelopts'toolboxdir'=MapleSim,/data/examples/RLCcircuit.msim:

Simulating the active system with default options:

A:-Simulate

Simulating the active system with various options:

simDataA:-Simulatereturntype=datapoint,tf=2.0,abserr=0.1

simData:= 200 x 2 MatrixData Type: float8Storage: rectangularOrder: Fortran_order

(1)

plotsimData1..1,1,simData1..1,2

See Also

MapleSim, MapleSim[LinkModel], MapleSim[LinkModel][GetCompiledProc], MapleSim[LinkModel][GetSettings]


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