SetParameters - MapleSim Help

Online Help

All Products    Maple    MapleSim


SetParameters

set the parameters of the active MapleSim subsystem

 

Calling Sequence

Parameters

Returns

Options

Description

Examples

Calling Sequence

A := MapleSim:-LinkModel();

A:-SetParameters(params)

Parameters

params

-

list or set of equations of the form name = value

Returns

• 

string : name of the linked MapleSim model

Options

• 

noerror : true or false

  

True means no error is raised if a given parameter does not exist; the missing parameters are ignored. The default is false.

• 

nosubs : true or false

  

True means name substitutions are not applied to the parameters. Default is false.

Description

• 

A:-SetParameters sets a given value(s) to a specific parameter(s). Warning is given if a parameter with a given name is not found in an active model.

• 

Parameter values are assumed to be given in the units shown in the MapleSim GUI.

• 

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:-LinkModelfilename=catkerneloptstoolboxdir=MapleSim,/data/examples/RLCcircuit.msim:

Getting the parameters of the active subsystem (you are at the top level):

A:-GetParameters

(1)

Setting the active subsystem an RLC circuit subsystem:

A:-SetSubsystemNameRLC

Getting the parameters of the RLC subsystem:

parsA:-GetParameters

parsC=1,L=1,R=1

(2)

A:-SetParametersR=2,L=3

A:-GetParametersparams=R,L

R=2,L=3

(3)

Reset parameters to the original values:

A:-SetParameterspars

A:-GetParameters

C=1,L=1,R=1

(4)

See Also

MapleSim

MapleSim[LinkModel]

MapleSim[LinkModel][GetParameters]

MapleSim[LinkModel][SetSubsystemName]