#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 , 9 years ago
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Solved with commit
https://github.com/OpenModelica/OMCompiler/commit/1845ffa3236a377e692cc22ddf36c6110e8d4fb2
RemoveSimpleEquations treats clocked discrete states like regular states now.
RemoveSimpleEquations appears to sometimes remove discrete states. Commit
attempts to prevent this. It works for some examples, like
AssignClock
mentioned above. The states are still removed for other examples that fail then increateSimCode
.See for instance:
Modelica_Synchronous.Examples.Elementary.RealSignals.FractionalDelay
.