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

parameter change for model requires recompile

parameter change for model requires recompile

Hello,
I have tried different sets of parameters for the same model. If I change the parameters in OMEdit and start the simulation, everything works fine. But if I use the executable compiled from an earlier run of the same simulation with different parameters, chanage the init.txt file at the corresponding place and run the precompiled simulation program, this does not alway work, even if this set of parameters was tested successfully with omedit.
Is there somthing, wich is different in the compiled exe file with different pramaters, are there hard-coded parameters? I thougt the exe would remein the same and only the init.txt file would change.

Re: parameter change for model requires recompile

Structural parameters are special in Modelica. That is, parameters that define if-conditions or array dimensions do not always work as expected.
Sadly, the compiler does not register which parameters it thinks are structural. So trying to do a parameter sweep is sometimes a bit hard.

It is often possible to start with compiling a model that has a larger input array than you need, and then changing the parameter to something lower. This way OpenModelica will allocate more than enough memory for your array.

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