Opened 8 years ago
Closed 3 years ago
#4363 closed defect (duplicate)
Properly fix handling of Clocks the front-end, back-end and codegen
Reported by: | Adrian Pop | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | 1.19.0 |
Component: | Backend | Version: | |
Keywords: | Cc: | Rüdiger Franke, Martin Sjölund, Lennart Ochel, Bernhard Thiele |
Description
See PR:
https://github.com/OpenModelica/OMCompiler/pull/1574
Currently we force in the front-end:
- evaluation of solverMethod in Clock (Static.mo)
- vectorization of clock operators (Static.mo)
because:
- back-end does not evaluate the solverMethod
- the C++ runtime does not support non-vectorized clock operators
This ticket is for fixing these issues:
- revert PR https://github.com/OpenModelica/OMCompiler/pull/1574
- implement evaluation of clocks in SynchronousFeatures.resolveClocks
- add proper support for non-vectorized clocked operators in the C++ runtime
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
For interval:
This operator returns the interval between the previous and present tick of the clock of the expression, in which this operator is called and the clock of the optional argument u.
u can be an array, but interval always returns a Real value, never an array. Bernhard read the specification wrong and implemented the operators to vectorize for clocked expressions.
A possible fix to be more similar to what we had before would be to add Evaluate=true
to the solverMethod input argument and adapt the frontend to evaluate this input although I would prefer the backend since the frontend cannot always evaluate expressions.
comment:3 by , 8 years ago
After discussing it with Martin I created a Modelica ticket for discussing/clarifying this issue (https://trac.modelica.org/Modelica/ticket/2161).
comment:4 by , 3 years ago
Milestone: | Future → 1.19.0 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Mostly obsolete, can be considered as a duplicate of https://github.com/OpenModelica/OpenModelica/issues/7854.
See also GitHub ticket https://github.com/OpenModelica/OpenModelica/issues/4363
@sjoelund.se: are you sure we don't need vectorization of clock operators in the fron-end? As far as I can tell the specification says that interval takes a clock not an expression.