Example of continuing simulation when the fmu is an ME type?
Love this package and your work developing it, but a bit unsure if I should be putting what is usage queries into issue logs? I've put this query up on Stackoverflow as well ().
Can an example of how to do a continuing simulation (like continuing example ) be provided for an ME type model, not CS?
I'm trying to deep dive the code to see how to do this, but I don't quite understand the interface for these instances, and how to keep the ME states alive between sequential calls to simulate.
So I guess I'm suggesting further example code, and the link from the main markdown page to the examples be fixed, as it's currently not pointing to them.
For further explanation, the root cause issue I have right now is that I have a Model Exchange FMU that solves perfectly well when run with FMPY using the simulate_fmu() functionality and its sundials 'CVode' solver. However, I need to run this ME FMU in parallel as a co-simulated model alongside a 3rd party simulation exchanging data at each time step. As I understand it, FMPY provides three ways to do this:
- using doStep(), or
- using a continuing simulation via simulate_fmu() that keeps the model instance alive between calls, or
- pulling the ME FMU into the FMPY gui and giving it a co-simulation wrapper, and then exporting for use.
None of these work for me, although I can use simulate_fmu() to run an entire simulation end to end without problem. I can't share my model, unfortunately, but it would be great to see an example of how to use an ME FMU in these situations, and perhaps understand a bit more about how these various approaches are interacting with the model and assembling their 'instances' for simulation.
Hope this helps! Sorry for the length description.
Since this doesn't appear to warrant any reply, I'll simply close this issue and leave it unresolved. Otherwise a great module, and no complaints. Just doesn't do what I want at this stage I guess.