Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3741 closed defect (fixed)

removeSimpleEquations too aggressive for Modelica_Synchronous

Reported by: Rüdiger Franke Owned by: Lennart Ochel
Priority: high Milestone: 1.9.4
Component: Backend Version: v1.9.4-dev-nightly
Keywords: Cc:

Description

Many of the remaining failures of the nightly tests of Modelica_Synchronous are due to:

SimCodeUtil.mo:472:5-472:146:writable] Error: Internal error function createSimCode failed 
[Transformation from optimised DAE to simulation code structure failed]

It appears that removeSimpleEquations removes variables that are accessed later on during code generation.

See e.g.: Modelica_Synchronous.Examples.Elementary.RealSignals.AssignClock. It starts with 12 variables, 8 remaining after clockPartitioning, reduced to 2 by removeSimpleEquations. The example translates and simulates if removeSimpleEquations is disabled.

Change History (4)

comment:1 by Rüdiger Franke, 9 years ago

RemoveSimpleEquations appears to sometimes remove discrete states. Commit

https://github.com/OpenModelica/OMCompiler/commit/12ddb6a9a248cb8d536da15889c3c4e3295c4737

attempts to prevent this. It works for some examples, like AssignClock mentioned above. The states are still removed for other examples that fail then in createSimCode.

See for instance: Modelica_Synchronous.Examples.Elementary.RealSignals.FractionalDelay.

comment:2 by Rüdiger Franke, 9 years ago

Resolution: fixed
Status: newclosed

Solved with commit

https://github.com/OpenModelica/OMCompiler/commit/1845ffa3236a377e692cc22ddf36c6110e8d4fb2

RemoveSimpleEquations treats clocked discrete states like regular states now.

comment:3 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:4 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.