1

I'm involved in a project in which I use a model exchange FMU. I'm using PyFMI to interact with it. One of the things that I need to do is get the state of the model at certain time ( get_fmu_state() is the function in PyFMI) and restore it later (set_fmu_state(state)). The flag "canGetAndSetFMUstate" is activated.

The use of these sentences seem to do nothing in my code...is it neccesary to do something more?

I didn't find any example that shows that capability. The FMI specification (https://www.fmi-standard.org) only dedicates a few lines to that feature. Have you ever deal with this feature? Thanks in advance. Regards,

Ignacio.

Book Of Zeus
  • 49,509
  • 18
  • 174
  • 171
ignacio
  • 41
  • 3
  • 2
    Finally I realized there was an error in my code. Now it works as expected. No extra tasks are neccesary to perform the get/set state: just get_fmu_state() at the time instant in which you need to save and restore it later when needed.In my case "time" variable was not being stored in the state, So I had to be careful and set the right time instant when restoring the state. – ignacio Mar 19 '19 at 08:27

0 Answers0