A look at the Modelica language specification
- Preliminary result
- Simulink models work fine
- Modelica models behave strangely
- but: they are in accordance with standard
definition!
- Modelica Standard
- current release 3.3
- things relevant here are standard for a long time
- handling of events scattered throughout document
- extract
- pre(y)
Returns the "left limit"
y(tpre ) of variable y(t) at a time instant t. At an
event instant, y(tpre) is the value of y after the
last event iteration at time instant t (...).
- A new event is triggered if at least for one
variable v "pre(v) <> v" after the active model
equations are evaluated at an event instant. In this case the
model is at once reevaluated. This evaluation sequence is called
"event iteration". The integration is restarted, if for
all v used in pre-operators the following condition holds:
"pre(v) == v".
- What this means
- discrete variables can run through several
values at a fixed time instant
- pre(y) is the value of y at the preceeding
iteration, not y(t-)
- this is different from Simulink