SetParameters
set the parameters of the active MapleSim subsystem
Calling Sequence
Parameters
Returns
Options
Description
Examples
A := MapleSim:-LinkModel();
A:-SetParameters(params)
params
-
list or set of equations of the form name = value
string : name of the linked MapleSim model
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.
A:-SetParameters sets a given value(s) to a specific parameter(s). A 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.
Linking to a MapleSim model (located in .msim file):
A≔MapleSim:-LinkModel⁡filename=cat⁡kernelopts⁡toolboxdir=MapleSim,/data/examples/RLCcircuit.msim:
Getting the parameters of the active subsystem (you are at the top level):
A:-GetParameters⁡
Setting the active subsystem an RLC circuit subsystem:
A:-SetSubsystemName⁡RLC
Getting the parameters of the RLC subsystem:
pars≔A:-GetParameters⁡
pars≔C=1,L=1,R=1
A:-SetParameters⁡R=2,L=3
A:-GetParameters⁡params=R,L
R=2,L=3
Reset parameters to the original values:
A:-SetParameters⁡pars
C=1,L=1,R=1
See Also
MapleSim
MapleSim[LinkModel]
MapleSim[LinkModel][GetParameters]
MapleSim[LinkModel][SetSubsystemName]
Download Help Document