I am trying to test a simple fmu to save and restore the states.
For example openmodelica:
model modelicatest
input Real In1;
output Real Out1(start=0, fixed=true);
equation
der(Out1) = In1;
end modelicatest;
Also for simulink:
I am using FMPy to simulate the generated FMUs.
But for OpenModelica v1.14.1 generated FMU, I get the following error when I call getFMUState
from FMPy:
Exception: fmi2GetFMUstate failed with status 3
For Simulink (2019b) generated FMU using the built-in exporter, FMU state does not reset (i.e. the output value) when I run setFMUState
.
Just wondering these functions are supported for OpenModelica and Simulink generated FMUs? or is it FMPy issue?