model initialization - error

2 posts / 0 new
Last post
tarikf
Offline
Joined: 2017-06-19
model initialization - error

Hi!

 

Using the pyfmi package to simulate my model I got the following error message:

FMUException: Failed to get the event indicators at time: 3.553653E+01.

I managed to find some input here: http://www.jmodelica.org/6171

However, when I try to initialize the model I get the error message:

"FMIL: module = b'Model', log level = 2: b'[][FMU status:Error] fmiInitialize: dsblock_ failed, QiErr = 1'",
 "FMIL: module = b'Model', log level = 2: b'[][FMU status:Error] Unless otherwise indicated by error messages, possible errors are (non-exhaustive):\\nThe model references external data that is not present on the target machine, at least not with the same location.\\n'"]

The issue is that I have some external data that I hand over to the FMU to run the simulations.

So my question is how can I apply the initialize method according the input from http://www.jmodelica.org/6171 to solve the upper problem regarding the event indicators?

Thanks!

Tarik

 

 

tarikf
Offline
Joined: 2017-06-19
model initilization

Hi!

 

IN the meanwhile I managed to add the following piece of code to solve the problem from above:

fmumodel=pyf.load_fmu("bioCH4_Cycles_Design_0OneStage_0FMU.fmu") # Launch fmu before running
fmumodel.set_debug_logging(True)

fmumodel.setup_experiment()

fmumodel.set('Vswep1_in',Vswep1)

fmumodel.set('Vswep2_in',Vswep2)
fmumodel.set('Tsink_in', Tsink_in[i])
fmumodel.set('Tsink_out',Tsink_out[i])
fmumodel.set('dTsource', dTsource[i])
fmumodel.set('Tsource_in', Tsource_in[i])

fmumodel.initialize()

opts['initialize'] = False

res=fmumodel.simulate(start_time=0.0, final_time=Tend,...)

However, when I try to run it as such, I get the error message:

FMUException: Failed to set the time.

Any idea what could be wrong here?

Thanks!

Tarik

 

 

 

Login or register to post comments