chink
chink

Reputation: 1643

FMUException: Failed to setup the experiment

I have a fmu which is created in GT-Suite and am trying to work with it in python.

I have followed jmodelica tutorials

from pyfmi import load_fmu

model = load_fmu('myFMU.fmu')

res = model.simulate(final_time=10)

My fmu gets loaded but when I try to run model.simulate step it throws an error

Traceback (most recent call last):

  File "<ipython-input-3-4812da4bb52b>", line 1, in <module>
    res = model.simulate(final_time=10)

  File "src\pyfmi\fmi.pyx", line 6981, in pyfmi.fmi.FMUModelCS2.simulate

  File "src\pyfmi\fmi.pyx", line 304, in pyfmi.fmi.ModelBase._exec_simulate_algorithm

  File "src\pyfmi\fmi.pyx", line 298, in pyfmi.fmi.ModelBase._exec_simulate_algorithm

  File "C:\Users\chinn\Anaconda3\envs\test_env\lib\site-packages\pyfmi\fmi_algorithm_drivers.py", line 761, in __init__
    self.model.setup_experiment(start_time=start_time, stop_time_defined=self.options["stop_time_defined"], stop_time=final_time)

  File "src\pyfmi\fmi.pyx", line 4292, in pyfmi.fmi.FMUModelBase2.setup_experiment

FMUException: Failed to setup the experiment.

I have tried running it in multiple environments in my pc but am getting the same error. Googled a lot but couldn't find anything. Can some one help me with resolving this issue?

Upvotes: 1

Views: 745

Answers (1)

Hang Yu
Hang Yu

Reputation: 486

The fmu is probably not exported with the correct license setting.

Upvotes: 1

Related Questions