SetParameters - MapleSim Help

Online Help

All Products    Maple    MapleSim


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

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

• 

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:-LinkModel'filename'=catkernelopts'toolboxdir'=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

pars:=C=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]

 


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