Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Co-simulation of 3 of more FMUS

Hi!

I´m learning to use PyFMI for co-simulation. So far, I´ve been able to retrieve and plot info of a coupled office fmu (E+) and HVAC fmu (dymola) simulation. However, what if I would like to add another fmu? I have an occupancy/setpoint schedule FMU (from dymola) that can be connected to my HVAC sys.

Using Dymola as a master sim I´m able to do the co-simulation of the 3 fmus but when I establish the I/O connections in PyFMI I received the following error:

Traceback (most recent call last): File "c:/Gitrepos/14_PyFMI CS2.0/CS.py", line 17, in <module> coupled_sim = Master(models, connections) File "src\pyfmi\master.pyx", line 425, in pyfmi.master.Master.__init__ File "src\pyfmi\master.pyx", line 638, in pyfmi.master.Master.connection_setup KeyError: <pyfmi.fmi.fmumodelcs2 object="" at="" 0x000002024a0c1ac0="">

Is there any example or advice on using 3 or more FMUS in the PyFMI package? I read the PyFMI paper from Christian but the examples showcased are based only on 2 FMUs.

I´d appreciate any insight, Thanks!

Jose