Annotation Choices for Suggested Redeclarations and Modifications
Replaceable model
sample(start,interval)
edge(b) Is expanded into “(b and not pre(b))” for Boolean variable b.
A parameter variable is constant during simulation. This prefix gives the library designer the possibility to
express that the physical equations in a library are only valid if some of the used components are constant during
simulation. The same also holds for discrete-time and constant variables. Additionally, the parameter prefix
allows a convenient graphical user interface in an experiment environment, to support quick changes of the most
important constants of a compiled model. In combination with an if-clause, a parameter prefix allows to remove
parts of a model before the symbolic processing of a model takes place in order to avoid variable causalities in
the model (similar to #ifdef in C). Class parameters can be sometimes used as an alternative. Example:
model Inertia
parameter Boolean state = true;
...
equation
J*a = t1 – t2;
if state then // code which is removed during symbolic
der(v) = a; // processing, if state=false
der(r) = v;
end if;
end Inertia;