GetSettings - MapleSim Help

Online Help

All Products    Maple    MapleSim


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

GetSettings

get the settings of the MapleSim model

 

Calling Sequence

Returns

Description

Examples

Calling Sequence

A := MapleSim:-LinkModel();

A:-GetSettings()

Returns

• 

list : list of the MapleSim model's settings.

Description

• 

A:-GetSettings returns the settings of the MapleSim model. A:-GetSettings always returns the settings defined for the entire model.

• 

The A:-GetSettings returns a list of the form name = value, where name is one of the following;

When Solver Type is set to Variable:

• 

t0 : simulation start time, default is 0.0 seconds;

• 

tf : simulation stop time, default is 10.0 seconds;

• 

solver : variable step integration method ("rkf45", "ck45", "rosenbrock"), default is "ck45";

• 

abserr : absolute error tolerance, default is 1e-4;

• 

relerr : relative error tolerance, default is 1e-4;

• 

minpoints : minimum number of points to plot, default is 200;

• 

baumgarte : apply Baumgarte constraint stabilization (list [alpha, beta]), default is [];

– 

alpha : derivative gain for Baumgarte constraint stabilization,

– 

beta : proportional gain for Baumgarte constraint stabilization,

• 

coniter : maximum number of constraint projection iterations, default is 50;

• 

contol : constraint projection error tolerance, default is 1e-5;

• 

evtiter : maximum number of event iterations, default is 100;

• 

numericjacobian : determines how the system Jacobian is formulated for implicit integration methods (equals true when the MapleSim model's Jacobian setting is set to Numeric in the MapleSim GUI), default is false;

• 

ix1relfac : relative error on algebraic variables compared to differential variables, default is 1.0;

• 

ix1errctl : enable error control on algebraic variables not present in events, probes, or black-box function outputs, default is false;

• 

ratehyst : width of the event hysteresis for all event triggers at the start of the simulation, default is 1e-10;

• 

scalemethod : method of variable scaling applied to system (none, minimum, maximum, geometric), default is none;

• 

reduceevents : determines whether to use heuristics to minimize number of the events encountered during simulation, default is false;

• 

plotevents : determines whether to add extra plot points at event points during simulation, default is true;

• 

compiler : determines whether code is compiled to native code prior to simulation, default is true;

• 

optimize : determines whether compiler optimizations are applied during code compilation, default is true;

• 

snap_state_file : use a snapped state simulation, default is "";

• 

diagnosticinfo : output integration diagnostics, default is false;

• 

minstep : minimum step size to use for integration, default is 0.

• 

maxstep : maximum step size to use for integration, default is 0 (disabled).

When Solver Type is set to Fixed:

• 

t0 : simulation start time, default is 0.0 seconds;

• 

t1 : simulation stop time, default is 10.0 seconds;

• 

solver : fixed step integration method ("feuler" (Euler), "rk2", "rk3", "rk4", "beuler" (ImplicitEuler)), default is "feuler";

• 

stepsize : fixed step size, default is 1e-3;

• 

minpoints : minimum number of points to plot, default is 200;

• 

baumgarte : apply Baumgarte constraint stabilization (list [alpha, beta]), default is [];

– 

alpha : derivative gain for Baumgarte constraint stabilization,

– 

beta : proportional gain for Baumgarte constraint stabilization,

• 

coniter : maximum number of constraint projection iterations, default is 50;

• 

contol : constraint projection error tolerance, default is 1e-5;

• 

evtiter : maximum number of event iterations, default is 100;

• 

evtproj : determines whether to apply constraint projection during events, default is true;

• 

evthyst : width of the event hysteresis band, default is 1e-7;

• 

numericjacobian : determines how the system Jacobian is formulated for implicit integration methods (equals true when the MapleSim model's Jacobian setting is set to Numeric in the MapleSim GUI), default is false;

• 

plotevents : determines whether to add an extra plot point before each potential event point during simulation, default is false;

• 

compiler : determines whether code is compiled to native code prior to simulation, default is true;

• 

optimize : determines whether compiler optimizations are applied during code compilation,  default is true;

• 

snap_state_file : use a snapped state simulation, default is "".

• 

diagnosticinfo : output integration diagnostics, default is false;

• 

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:

Getting the settings of the MapleSim model:

A:-GetSettings

t0=0,tf=10,solver=rkf45,abserr=110000000,relerr=110000000,minstep=0,maxstep=0,minpoints=200,coniter=50,evtiter=100,scalemethod=none,diagnosticinfo=false,ix1relfac=1,ix1errctl=false,ratehyst=110000000000,reduceevents=false,plotevents=true,numericjacobian=false,compile=false

(1)

See Also

Advanced Simulation Settings

MapleSim

MapleSim[LinkModel]

MapleSim[LinkModel][GetCompiledProc]

MapleSim[LinkModel][Simulate]

Simulation Settings

 


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