You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i run a simulation model that takes more than 10 s, an exception TimeoutExpired is raised. I guess the initial definition in ModelicaSystem.ModelExecutionCmd.timeout is not updated by simargs={"alarm": 120}. I haven't found a solution to change the value of timeout besides overwriting the init value.
Steps to Reproduce
You can run the example.py file in the zip-archive, which will run a thermal building model created by the TEASER workflow. To run it you will need to install modelica library AixLib. The model should take longer than 10 s to calculate.
I also had trouble using the simulate(simargs={"override": {"stopTime": 63072000.0}}) feature. It did not raise an error but it also didn't change the time values in the result file, so it seems to be ignored. I don't know if the issues are related or if i made a mistake, since you've recently been working on the override feature (there is a typo in
Activity
syntron commentedon Apr 21, 2026
OMC and OMPython use different timeouts - one within OMC and the other by Python using subprocess to call OMC
You should be able to modify the Python timeout as follows (main branch):
or using v4.0.1:
Untested - please check and provide feedback!
syntron commentedon Apr 21, 2026
stopTimeis tested intest_ModelicaSystem.test_getters()and other unittestspsatke commentedon Apr 23, 2026
I have tested:
but the problem still remains with the same exception (timed out after 10.0 seconds).
syntron commentedon Apr 23, 2026
Quite right - you found a bug - the timeout value is not propagated down to the point there the model executable is called; I will prepare a bug fix
syntron commentedon Apr 23, 2026
@psatke please test PR #463
psatke commentedon Apr 24, 2026
Thank you for the fix. Now i can set the timeout with:
and the simulation runs successfully.