Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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,

Edited by: ankiagg - Oct-22-20 18:49:04

Re: Set canGetAndSetFMUstate and canSerializeFMUstate to true

We don't support serialization of state yet in our exported FMUs.

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,

Edited by: ankiagg - Oct-23-20 06:43:39

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.

Re: Set canGetAndSetFMUstate and canSerializeFMUstate to true

Great, thanks.

There are 0 guests and 0 other users also viewing this topic
You are here: