Closed awecefil closed 4 months ago
Exactly, there are two to different operation modes:
As you correctly noticed, the parallel example simulates the FMUs in CS-mode. From the text, it sounds like you want to do "model-integration", but importing FMUs in OpenModelica and simulate them together sounds like co-simulation to me....
Can you specify: (a) if you want to operate in CS or ME mode? (b) if ME: if you want to use the same solver for both FMUs (model integration) or different solvers for every FMU. (c) do you want to connect states/state derivatives or inputs/outputs
In any case I think there is a solution for your problem, but it is easier to discuss if we further specify.
Best regards!
PS: I convert this to discussion :-)
Problem Description:
I want to know if FMIFlux can currently chain multiple FMUs and NNs together. For example, I have constructed a circuit system in OpenModelica that includes a voltage source and a resistor. Using OpenModelica, I split this system into three subsystems (voltage source, resistor, and ground), and exported each as an independent FMU. I then tried importing these three subsystem FMUs into OpenModelica and connecting their inputs/outputs for simulation. Unsurprisingly, the simulation results were the same as the original circuit system. Diagram as follow, from left to right, it sequentially shows the Voltage Source FMU, Resistor FMU, and Ground FMU:
Now, I want to know two things:
Current Attempts:
I found that FMIFlux currently supports using Parallel to chain multiple FMUs and NNs (via Chain). However, after looking into it in detail, I discovered that the Parallel function allows multiple FMUs to run concurrently and produce results. We can then concatenate the results or perform other operations like summation. However, this is different from sequentially chaining multiple subsystem FMUs as I intend.
If there is any misunderstanding on my part, please correct me. Thank you.