Opened 5 years ago
Last modified 5 years ago
#5552 new defect
OpenModelica FMUs seem to not report exact continuous states
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | FMI | Version: | v1.14.0-dev-nightly |
Keywords: | FMU, fmpy | Cc: |
Description
When compiling a simple model to a CoSimulation (cs) FMU using "OpenModelica v1.14.0-dev-26515-g3e60c14bfc (64-bit)", the solution to the continuous states after the next fmi2doStep seems to depend on whether or not the continuous states have been set to what fmi2getReal reports for the individual states using fmi2setReal.
So, it makes a difference for the next continuous state if you extract the current continous state, save it, and then set it to what was just saved.
I'm attaching a Python 3 script to demonstrate this issue using the model "Modelica.Blocks.Examples.PID_Controller". The script assumes the corresponding .fmu file to be in the current working directory (see line 26).
Attachments (3)
Change History (4)
by , 5 years ago
Attachment: | bug_demo.py added |
---|
comment:1 by , 5 years ago
Milestone: | Future → 2.0.0 |
---|
by , 5 years ago
Attachment: | bug_demo.2.py added |
---|
a programming error was fixed in the previous file (line 95) and another model was chosen (a version of Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects)
by , 5 years ago
an example model still showing the described bug with bug_report.2.py
Python 3 script to demonstrate the issue explained in the ticket