- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMPython ModelicaSystem Recompilation
OMPython ModelicaSystem Recompilation
OMPython ModelicaSystem Recompilation
Hello,
I am using OMPython to compile and simulation a model:
Code:
from OMPython import ModelicaSystem
fileName = "../../package.mo"
modelPath = "myModel"
mod = ModelicaSystem(fileName,modelPath, ["Modelica"])
My intention is to make some data analysis based on Monte-Carlo studies with scripted parameter variations within the model.
Now, each time I execute the script it annoyingly needs ~70s of compile time and a bunch of .c/.h/.o/... files are generated.
Is it possible to avoid recompilation of the same models over and over again? A compiler option/flag maybe?
Re: OMPython ModelicaSystem Recompilation
Can you just do all the analysis after the call to ModelicaSystem? That way it will only be compiled once.
I will open a ticket for OMPython to have a flag for ModelicaSystem to just build if needed.
- adrpo
- 885 Posts
Re: OMPython ModelicaSystem Recompilation
Thank you for your answer.
Yes, this is exactly what I am doing now. I compile the model, run the simulation and use the stored .mat file for analysis. It is just annoying to wait for the model to recompile after simple parameter changes. Especially since OMEdit apparently can do that without recompiling...
Any update on the issue would be appreciated.
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMPython ModelicaSystem Recompilation