Things that do not work
In OpenModelica from
Subversion
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.
- Functions returning several values (tuples) does not work in equations.
- Events on algebraic variables (Only
state-events works)
In translation to flat Modelica:
- Inner/Outer of
classes does not work. Only inner/outer of components works.
- 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 symmetric 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 ...) (and {… for …}) syntax.
Partially implemented.
What DOES work:
In equation sections (for basic types real, integer, boolean)
…
Assignments such as …
arr = {... for i in
1:x, j in 1:x, ...}; (multiple iterators)
(cases that do not work may exist)
In algorithm sections (for basic types real, integer, boolean)
…
Assignments such as ...
arr := {... for i in
…, j in …, ...}; (multiple iterators)
var := function_call(...
for i in …, for j in …); (multiple iterators)
(cases that do not work may exist)
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.
- 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.