Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Does changing parameter values always require a recompilation?

Does changing parameter values always require a recompilation?

This issue is related to the issue I raised in OpenModelica Programming "Array use leads to excessive compilation times" https://www.openmodelica.org/index.php/ … ic?id=1030 but is a different question.

Ideally I would like to change parameters in a model without requiring the compilation step to occur every time. I note that there is an OMOptim program but I have been able to get this work with the changes that we are trying to do with our sensitivity study, and from reading the documentation I believe it will recompile the model. The "Simulate" call in the omc API also seems to always recompile.

Is it possible to compile a model and supply an input file or some other technique to change the values of parameters in an OpenModlica model without recompiling the model for every parameter change?

Harley Mackenzie

Edited by: Mackenzie - Nov-01-13 08:32:28

Re: Does changing parameter values always require a recompilation?

Hi,
It definitely is possible to change parameter values without recompiling. As you suspected, there is an init-file for parameters and start values in xml format. Have a look at this thread for example: https://www.openmodelica.org/index.php/ … pic?id=715

Re: Does changing parameter values always require a recompilation?

This feature was actually added to OMEdit just two days ago, so if you feel brave you can try the latest nightly build. It's still a work in progress, but it seems like it's already possible to change values of parameters in the plot view and resimulate without recompiling. Otherwise you can edit the init-file or use the override functionality as SKD suggested.

There are 0 guests and 0 other users also viewing this topic
You are here: