- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External library
External library
External library
How to load external files? Loading a file in OpenModelica succeeded, but OMPython.execute('loadFile("/home/ubuntu/miglu/Buildings/Airflow/Multizone/Orifice.mo")') failed.
I also tried adding Buildings to openmodelica-21495/libraries and doing OMPython.loadModel(Buildings), which failed.
Re: External library
Run checkSettings(); it will tell you the paths you need to install libraries into. apt-get install omlib-buildings-latest should install a working Buildings version. Run getErrorString() after the loadFile command to find out why you could not load it. You wanted to run loadFile("/home/ubuntu/miglu/Buildings/package.mo").
- sjoelund.se
- 1700 Posts
Re: External library
I installed using apt-get, and OMPython.execute('loadModel(Buildings)") and OMPython.execute('loadFile("/home/ubuntu/miglu/Buildings/Airflow/Multizone/Examples/Validation3Rooms.mo")') now return true. However, when I do OMPython.execute('simulate(Validation3Rooms)'), I get "Model: Validation3Rooms does not exist! Please load it first before simulation." Thus I tried OMPython.execute('loadModel(Buildings.Validation3Rooms)'), which returns true, but simulation still fails.
What is the solution?
Re: External library
I would guess simulate(Buildings.Airflow.Multizone.Examples.Validation3Rooms) ...
- sjoelund.se
- 1700 Posts
Re: External library
It's the same interface as regular omc, so read the documentation for those
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External library