Wait or pause during Modelica simulation

439 views Asked by At

I have been working on a real-time simulation case using OpenModelica and that would be great if I could pause the simulation for a while, especially when I am waiting for the new set of real-time data to arrive. In other words, it is problem of synchronisation of Modelica simulation with outer environment.

OpenModelica introduced a new simulation flag -rt but it doesn't do the work. It just helps you to make the whole simulation synchronous with real time or a any fraction of it.

What I want to do is 10 seconds of simulation with any speed faster than 10 seconds. Then the simulation must wait for the new data stream at the real time t=10 seconds. At those time instances, my CombiTable is updated and is read again by the model.

1

There are 1 answers

0
modelicaFan On

Maybe some functionality provided by Modelica_DeviceDrivers.OperatingSystem could help: https://github.com/modelica/Modelica_DeviceDrivers