Things that does not work
OpenModelica v.1.4.2
In simulation code:
- Limited error checking in numerical
solver.
- No dynamic selection of states (in index
reduction)
- Only possible to run with DASSL numerical solver.
- If equations does not work. Workaround:
use if-expressions instead.
In translation to flat
Modelica:
- Lookup through extends of packages, e.g.
extends Modelica.Constants; is terribly slow.
Also lookup of unqualified imports, e.g. import Modelica.Constants.*;
has this problem. Workaround: use fully qualified names or qualified or
named imports. e.g. import Modelica.Constants.PI;
- der(expression) is not supported.
Only der(variable) works. Workaround: expand your expression by
hand. e.g. der(x*y) => x*der(y)+der(x)*y
- Inner/Outer
- Some excotic
cases with Modifications, especially with redeclare.
- 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
in algorithms.
- Restrictions on connections.
- The following operators in 3.4.2 have not
been implemented:
smooth terminate delay
- The following operators in 3.4.3
have not been implemented:
ndims matrix outerProduct
linspace product symmetric cross skew
- Reduction
expressions,
- Slice operation. Partly works but the resulting
component names are sometimes messed up.
- Output parameters of functions, enable
attribute, etc.
- 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 hierarchical records.
- Constant evaluation of dot ('.') operator.