return the system of equations for the input system - MapleSim Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim : MapleSim Application Programming Interface : Deprecated Commands : MapleSim/GetEquations(deprecated)

MapleSim[GetEquations(deprecated)] - return the system of equations for the input system

Calling Sequence

GetEquations( modelFile, modelName, opts )

Parameters

modelFile

-

(optional) string; Modelica model code string or file name

modelName

-

(optional) string; Modelica model name

opts

-

(optional) equation(s) of the form option = value; specify options for GetEquations

Returns

• 

GetEquations returns an expression sequence with the following sets: eqs, ics, constrs, params, vars, aux, probes,Boolean, Discrete, Function.

– 

eqs contains the core continuous equations.

– 

ics contains the initial conditions for the system.

– 

constrs contains the constraint equations obtained from the index reduction process. If simplify<>tryhard, constrs is an empty set.

– 

params contains the parameter substitution equations that define the values of the symbolic parameters remaining in the system equations in eqs.

– 

vars contains the system variables in eqs.

– 

aux contains the auxiliary equations defining the auxiliary variables in terms of the system variables found in vars.  Auxiliary variables are variables that have been eliminated from the system through the simplification process.

– 

probes contains the variable names to which probes are attached.

– 

Boolean contains the Boolean equations.

– 

Discrete contains the discontinuous equations.

– 

Functions contains the procedures defined in the system.

Description

• 

Important: The GetEquations command has been deprecated.

• 

The GetEquations command returns a list of equations that describe the behavior of the system model.

• 

You can specify the input systems in two ways: by using a Modelica model source file name or a Modelica model code string.

  

To specify the input system using the file name of a Modelica model source, set the modelFile parameter to the file name and the modelName parameter to the name of the model.

  

To specify the input system using the Modelica code string, set the modelFile parameter, which passes the code string, and set the keyword parameter option is_immediate to true.

The options parameters are optional parameters of the form option = value, where option is one of the names listed below. These are keyword parameters; the left side of the equation is the keyword and the right side is the value. Each keyword parameter has a default value that is assigned if the parameter is not passed.

Examples

withMapleSim&colon;

Assign a string that corresponds to a simple Modelica deck.

modelmodel Main Real y,z;initial equation y = 0;equation der(y) = if time < 1 then time else time^2; z = y + sin(time); annotation(probes = {y,z});end Main;

model:=model Main Real y,z;initial equation y = 0;equation der(y) = if time < 1 then time else time^2; z = y + sin(time); annotation(probes = {y,z});end Main;

(1)

Call GetEquations, using the is_immediate option to indicate that the input is a literal Modelica deck.

eqs&comma;ics&comma;constrs&comma;params&comma;vars&comma;aux&comma;probes&comma;bool&comma;disc&comma;funcMapleSim:-GetEquationsmodel&comma;&apos;is_immediate&apos;&colon;

The eqs set contains the core differential equations of the system.

eqs

&DifferentialD;&DifferentialD;tMain.ytmsim/CVAR1t&equals;0&comma;msim/CVAR1t&equals;&lcub;tmsim/RVAR1t&equals;truet2otherwise

(2)

The `msim/RVAR1`(t) variable represents a boolean relation; it is defined in bool.

bool

msim/RVAR1t&equals;t<1

(3)

Given the simplicity of the equations, we can substitute bool into eqs after calling subsindets to change the condition in the piecewise expression to the proper form.

deqssubsbool&comma;subsindetseqs&comma;&apos;anything&equals;identicaltrue&apos;&comma;lhs

deqs:=&DifferentialD;&DifferentialD;tMain.ytmsim/CVAR1t&equals;0&comma;msim/CVAR1t&equals;&lcub;tt<1t2otherwise

(4)

Pass the set of differential equations to dsolve for a symbolic solution.

dsoldsolvedeqs

dsol:=Main.yt&equals;&lcub;12t2t113t3&plus;161<t&plus;_C1&comma;msim/CVAR1t&equals;&lcub;tt<1t2otherwise

(5)

See Also

MapleSim


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