- Index
- » Developer
- » OpenModelica development
- » Set canGetAndSetFMUstate and...
Set canGetAndSetFMUstate and canSerializeFMUstate to true
Set canGetAndSetFMUstate and canSerializeFMUstate to true
Hi,
Is it possible to set enable canGetAndSetFMUstate and canSerializeFMUstate as True while compiling modelica models to FMU via omc compiler? Because, when I run the compiled FMU via FMPy, I would like to store and serialize the FMU states at different stages of the simulation.
Best,
Re: Set canGetAndSetFMUstate and canSerializeFMUstate to true
We don't support serialization of state yet in our exported FMUs.
- adrpo
- 885 Posts
Re: Set canGetAndSetFMUstate and canSerializeFMUstate to true
Hi,
Thanks for your quick response. Is there any workaround to run the FMUs compiled via omc in a streaming mode? That I pass the input data through windows of 10s, then second window should start the simulation from the last values/states of the first window and third window should start the value from the last value of the second window. Is it possible to do that?
Thank you
Best,
Re: Set canGetAndSetFMUstate and canSerializeFMUstate to true
Hej! I am not sure if I understand your application. Do you want to restart the simulation with a given set of start values? The short answer is, there is no workaround for get/setFMUstate. However, if your FMUs don't use internal states, external objects, etc it might actually work. However, I don't recommend it, because i can easily result in wrong output which isn't trivial to catch.
I will see if we can put some resources on this issue to finally support this functionality in OpenModelica.
- lochel
- 45 Posts
- Index
- » Developer
- » OpenModelica development
- » Set canGetAndSetFMUstate and...