简体   繁体   中英

How to solve - FMUException: The slave failed to initialize

I am new to the FMU world and started with it. I am trying to load and simulate an FMU in python which is created in GT-Suite. I had hard time solving the errors while loading an FMU but could do it finally.I am following jmodelica tutorials

from pyfmi import load_fmu

#Load the FMU
model = load_fmu('AHU.fmu')

#simulate an fmu
res = model.simulate(final_time=10)

Now I am getting an error when I try to simulate the model. Error is:

FMUException: The slave failed to initialize. See the log for possibly more information.

What could be the reason? Is there something wrong in my .fmu file because when I try to do load and simulate a fmu downloaded from fmi-standard everything works fine.

model = load_fmu('RoomHeating_OM_RH.fmu')

res = model.simulate(final_time=10)

'RoomHeating_OM_RH.fmu' is from fmi-standard

The problem is with FMU exported from GT-Suite. Apparently, GT-Suite doesn't support fmu for model-exchange. It works only for co-simulation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM