GetSubstitutions - MapleSim Help

# Online Help

###### All Products    Maple    MapleSim

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

GetSubstitutions

get variable and parameter substitutions

 Calling Sequence A := MapleSim:-LinkModel(); A:-GetSubstitutions(options)

Parameters

 options - (optional) equation(s) of the form name = value

Returns

 • set : set of the system's variable and parameter substitutions

Options

 • reverse : true or false
 Specifies whether to return the reverse of the substitutions that are used in other API calls. Default is false.

Description

 • A:-GetSubstitutions returns the substitutions that are applied to variable and parameter names in other API function calls.
 • The A := MapleSim:-LinkModel() statement needs to be run prior to successfully using any of the ModelObject A's export functions.

Notes

 • If no substitutions have been defined for the system, a set of default substitutions will be returned.

Examples

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

 > $A≔\mathrm{MapleSim}:-\mathrm{LinkModel}\left('\mathrm{filename}'=\mathrm{cat}\left(\mathrm{kernelopts}\left('\mathrm{toolboxdir}'=\mathrm{MapleSim}\right),"/data/examples/RLCcircuit.msim"\right)\right):$

Getting the substitutions that are applied to variable and parameter names in other API function calls:

 > $A:-\mathrm{GetSubstitutions}\left(\right)$
 $\left\{{\mathrm{Main.RLC.C}}{=}{C}{,}{\mathrm{Main.RLC.C1.i}}{=}{\mathrm{C1_i}}{,}{\mathrm{Main.RLC.C1.n.i}}{=}{\mathrm{C1_n_i}}{,}{\mathrm{Main.RLC.C1.n.v}}{=}{\mathrm{C1_n_v}}{,}{\mathrm{Main.RLC.C1.p.i}}{=}{\mathrm{C1_p_i}}{,}{\mathrm{Main.RLC.C1.p.v}}{=}{\mathrm{C1_p_v}}{,}{\mathrm{Main.RLC.C1.v}}{=}{\mathrm{C1_v}}{,}{\mathrm{Main.RLC.G2.p.i}}{=}{\mathrm{G2_p_i}}{,}{\mathrm{Main.RLC.G2.p.v}}{=}{\mathrm{G2_p_v}}{,}{\mathrm{Main.RLC.I1.i}}{=}{\mathrm{I1_i}}{,}{\mathrm{Main.RLC.I1.n.i}}{=}{\mathrm{I1_n_i}}{,}{\mathrm{Main.RLC.I1.n.v}}{=}{\mathrm{I1_n_v}}{,}{\mathrm{Main.RLC.I1.p.i}}{=}{\mathrm{I1_p_i}}{,}{\mathrm{Main.RLC.I1.p.v}}{=}{\mathrm{I1_p_v}}{,}{\mathrm{Main.RLC.I1.v}}{=}{\mathrm{I1_v}}{,}{\mathrm{Main.RLC.L}}{=}{L}{,}{\mathrm{Main.RLC.NP1.i}}{=}{\mathrm{NP1_i}}{,}{\mathrm{Main.RLC.NP1.v}}{=}{\mathrm{NP1_v}}{,}{\mathrm{Main.RLC.NP2.i}}{=}{\mathrm{NP2_i}}{,}{\mathrm{Main.RLC.NP2.v}}{=}{\mathrm{NP2_v}}{,}{\mathrm{Main.RLC.PP1.i}}{=}{\mathrm{PP1_i}}{,}{\mathrm{Main.RLC.PP1.v}}{=}{\mathrm{PP1_v}}{,}{\mathrm{Main.RLC.PP2.i}}{=}{\mathrm{PP2_i}}{,}{\mathrm{Main.RLC.PP2.v}}{=}{\mathrm{PP2_v}}{,}{\mathrm{Main.RLC.PP3.i}}{=}{\mathrm{PP3_i}}{,}{\mathrm{Main.RLC.PP3.v}}{=}{\mathrm{PP3_v}}{,}{\mathrm{Main.RLC.PS1.y}}{=}{\mathrm{PS1_y}}{,}{\mathrm{Main.RLC.R}}{=}{R}{,}{\mathrm{Main.RLC.R1.i}}{=}{\mathrm{R1_i}}{,}{\mathrm{Main.RLC.R1.n.i}}{=}{\mathrm{R1_n_i}}{,}{\mathrm{Main.RLC.R1.n.v}}{=}{\mathrm{R1_n_v}}{,}{\mathrm{Main.RLC.R1.p.i}}{=}{\mathrm{R1_p_i}}{,}{\mathrm{Main.RLC.R1.p.v}}{=}{\mathrm{R1_p_v}}{,}{\mathrm{Main.RLC.R1.v}}{=}{\mathrm{R1_v}}{,}{\mathrm{Main.RLC.SC1.i}}{=}{\mathrm{SC1_i}}{,}{\mathrm{Main.RLC.SC1.v}}{=}{\mathrm{SC1_v}}{,}{\mathrm{Main.S1.freqHz}}{=}{\mathrm{S1_freqHz}}{,}{\mathrm{Main.S1.offset}}{=}{\mathrm{S1_offset}}{,}{\mathrm{Main.S1.phase}}{=}{\mathrm{S1_phase}}{,}{\mathrm{Main.S1.y}}{=}{\mathrm{S1_y}}{,}{\mathrm{Main.Probe1.Vout}}{=}{\mathrm{Vout}}{,}{\mathrm{Main.RLC.InputSignal}}{=}{\mathrm{InputSignal}}{,}{\mathrm{Main.RLC.OutputSignal}}{=}{\mathrm{OutputSignal}}{,}{\mathrm{Main.RLC.PS1.p.i}}{=}{\mathrm{PS1_p_i}}{,}{\mathrm{Main.RLC.PS1.p.v}}{=}{\mathrm{PS1_p_v}}{,}{\mathrm{Main.RLC.R1.LossPower}}{=}{\mathrm{R1_LossPower}}{,}{\mathrm{Main.RLC.R1.R_actual}}{=}{\mathrm{R1_R_actual}}{,}{\mathrm{Main.RLC.R1.T_heatPort}}{=}{\mathrm{R1_T_heatPort}}{,}{\mathrm{Main.RLC.R1.T_ref}}{=}{\mathrm{R1_T_ref}}{,}{\mathrm{Main.RLC.R1.alpha}}{=}{\mathrm{R1_alpha}}{,}{\mathrm{Main.RLC.SC1.n.i}}{=}{\mathrm{SC1_n_i}}{,}{\mathrm{Main.RLC.SC1.n.v}}{=}{\mathrm{SC1_n_v}}{,}{\mathrm{Main.RLC.SC1.p.i}}{=}{\mathrm{SC1_p_i}}{,}{\mathrm{Main.RLC.SC1.p.v}}{=}{\mathrm{SC1_p_v}}{,}{\mathrm{Main.S1.amplitude}}{=}{\mathrm{S1_amplitude}}{,}{\mathrm{Main.S1.startTime}}{=}{\mathrm{S1_startTime}}\right\}$ (1)

Getting reverse substitutions:

 > $A:-\mathrm{GetSubstitutions}\left('\mathrm{reverse}'\right)$
 $\left\{{C}{=}{\mathrm{Main.RLC.C}}{,}{\mathrm{C1_i}}{=}{\mathrm{Main.RLC.C1.i}}{,}{\mathrm{C1_n_i}}{=}{\mathrm{Main.RLC.C1.n.i}}{,}{\mathrm{C1_n_v}}{=}{\mathrm{Main.RLC.C1.n.v}}{,}{\mathrm{C1_p_i}}{=}{\mathrm{Main.RLC.C1.p.i}}{,}{\mathrm{C1_p_v}}{=}{\mathrm{Main.RLC.C1.p.v}}{,}{\mathrm{C1_v}}{=}{\mathrm{Main.RLC.C1.v}}{,}{\mathrm{G2_p_i}}{=}{\mathrm{Main.RLC.G2.p.i}}{,}{\mathrm{G2_p_v}}{=}{\mathrm{Main.RLC.G2.p.v}}{,}{\mathrm{I1_i}}{=}{\mathrm{Main.RLC.I1.i}}{,}{\mathrm{I1_n_i}}{=}{\mathrm{Main.RLC.I1.n.i}}{,}{\mathrm{I1_n_v}}{=}{\mathrm{Main.RLC.I1.n.v}}{,}{\mathrm{I1_p_i}}{=}{\mathrm{Main.RLC.I1.p.i}}{,}{\mathrm{I1_p_v}}{=}{\mathrm{Main.RLC.I1.p.v}}{,}{\mathrm{I1_v}}{=}{\mathrm{Main.RLC.I1.v}}{,}{L}{=}{\mathrm{Main.RLC.L}}{,}{\mathrm{NP1_i}}{=}{\mathrm{Main.RLC.NP1.i}}{,}{\mathrm{NP1_v}}{=}{\mathrm{Main.RLC.NP1.v}}{,}{\mathrm{NP2_i}}{=}{\mathrm{Main.RLC.NP2.i}}{,}{\mathrm{NP2_v}}{=}{\mathrm{Main.RLC.NP2.v}}{,}{\mathrm{PP1_i}}{=}{\mathrm{Main.RLC.PP1.i}}{,}{\mathrm{PP1_v}}{=}{\mathrm{Main.RLC.PP1.v}}{,}{\mathrm{PP2_i}}{=}{\mathrm{Main.RLC.PP2.i}}{,}{\mathrm{PP2_v}}{=}{\mathrm{Main.RLC.PP2.v}}{,}{\mathrm{PP3_i}}{=}{\mathrm{Main.RLC.PP3.i}}{,}{\mathrm{PP3_v}}{=}{\mathrm{Main.RLC.PP3.v}}{,}{\mathrm{PS1_p_i}}{=}{\mathrm{Main.RLC.PS1.p.i}}{,}{\mathrm{PS1_p_v}}{=}{\mathrm{Main.RLC.PS1.p.v}}{,}{\mathrm{PS1_y}}{=}{\mathrm{Main.RLC.PS1.y}}{,}{R}{=}{\mathrm{Main.RLC.R}}{,}{\mathrm{R1_i}}{=}{\mathrm{Main.RLC.R1.i}}{,}{\mathrm{R1_n_i}}{=}{\mathrm{Main.RLC.R1.n.i}}{,}{\mathrm{R1_n_v}}{=}{\mathrm{Main.RLC.R1.n.v}}{,}{\mathrm{R1_p_i}}{=}{\mathrm{Main.RLC.R1.p.i}}{,}{\mathrm{R1_p_v}}{=}{\mathrm{Main.RLC.R1.p.v}}{,}{\mathrm{R1_v}}{=}{\mathrm{Main.RLC.R1.v}}{,}{\mathrm{S1_y}}{=}{\mathrm{Main.S1.y}}{,}{\mathrm{SC1_i}}{=}{\mathrm{Main.RLC.SC1.i}}{,}{\mathrm{SC1_n_i}}{=}{\mathrm{Main.RLC.SC1.n.i}}{,}{\mathrm{SC1_n_v}}{=}{\mathrm{Main.RLC.SC1.n.v}}{,}{\mathrm{SC1_p_i}}{=}{\mathrm{Main.RLC.SC1.p.i}}{,}{\mathrm{SC1_p_v}}{=}{\mathrm{Main.RLC.SC1.p.v}}{,}{\mathrm{SC1_v}}{=}{\mathrm{Main.RLC.SC1.v}}{,}{\mathrm{Vout}}{=}{\mathrm{Main.Probe1.Vout}}{,}{\mathrm{InputSignal}}{=}{\mathrm{Main.RLC.InputSignal}}{,}{\mathrm{OutputSignal}}{=}{\mathrm{Main.RLC.OutputSignal}}{,}{\mathrm{R1_LossPower}}{=}{\mathrm{Main.RLC.R1.LossPower}}{,}{\mathrm{R1_R_actual}}{=}{\mathrm{Main.RLC.R1.R_actual}}{,}{\mathrm{R1_T_heatPort}}{=}{\mathrm{Main.RLC.R1.T_heatPort}}{,}{\mathrm{R1_T_ref}}{=}{\mathrm{Main.RLC.R1.T_ref}}{,}{\mathrm{R1_alpha}}{=}{\mathrm{Main.RLC.R1.alpha}}{,}{\mathrm{S1_amplitude}}{=}{\mathrm{Main.S1.amplitude}}{,}{\mathrm{S1_freqHz}}{=}{\mathrm{Main.S1.freqHz}}{,}{\mathrm{S1_offset}}{=}{\mathrm{Main.S1.offset}}{,}{\mathrm{S1_phase}}{=}{\mathrm{Main.S1.phase}}{,}{\mathrm{S1_startTime}}{=}{\mathrm{Main.S1.startTime}}\right\}$ (2)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam