-
Notifications
You must be signed in to change notification settings - Fork 66
ModelExecutionException: Timeout #460
Description
Description
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.
Expected Behavior
When i specify a flag like --alarm=120, i expect the timeout value to be raised accordingly.
Screenshots
Version and OS
- Python Version: 3.12.3
- OMPython Version: dev 5b05821
- OpenModelica Version: 1.26.3~1-g7583224
- OS: Linux Ubuntu 24.04.4 LTS
Additional Context
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
OMPython/OMPython/ModelicaSystem.py
Line 1345 in 5b05821
| mod.simulate(simargs={"noEventEmit": None, "noRestart": None, "override": "override": {"e": 0.3, "g": 10}}) |