Things that does not work
OpenModelica v.1.2.1
In simulation code:
- Event handling, only continuous subset of Modelica works
- Limited error checking in numerical solver.
- Limited support for initial values.
- No dynamic selection of states (in index reduction)
- Only possible to run with DASSL numerical solver.
- initial equation can not be used. Set initial values using the
start attribute instead, e.g. Real x(start=1);
- All initial values must be consistent, i.e. no initial value
calculation is performed. This can be done by hand and filled in into
the <modelname>_init.txt file.
In translation to flat Modelica:
- Inner/Outer
- Some excotic cases with Modifications, especially with redeclare.
- Each modifier
- Final element modification not checked against.
- Constraining type on redeclarations
- Restrictions on redeclarations (subtype etc.)
- Derivatives of functions, using annotations.
- Components of function type not implemented.
- When clauses.
- Restrictions on connections.
- The following operators in 3.4.2 have not been implemented:
smooth noEvent sample edge change reinit terminate mod delay
cardinality
- Reduction expressions,
- Slice operation. Partly works but the resulting component names
are sometimes messed up.
- Vectorized call of functions not implemented.
- Output parameters of functions, enable attribute, etc.
- Matrices and vectors in equations (only works if can be fully
converted to scalar values.)
- Array construction (3.4.4.1). Using array(... for ...) syntax.
Partially implemented. Left to do:
- Constant evaluation and/or optimization. Could be implemented as
function calls with index as argument. Or array can be unrolled and
indexed, or if constant value can be calculated and indexed. Array
should then be cached.
- Automatic type conversion of element type, e.g. (Real[]) a[5] =
{(Integer)3 for ...} fails.
- Handle multiple iterators
- Array constructors with iterators. Using {expr for i in ...}
syntax.
- Deduction of ranges (3.3.3.1). It is allowed to leave out "in
range" in loops. e.g. for i loop ... end for; according to
specification.
- Multiple loop ranges, e.g.: for i in 1:5, j in 1:3 loop
a[i,j]=i*j; end for;
- Constant evaluation of record constructors for hierachical
records.
- Constant evaluation of dot ('.') operator.