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

Set initial values from file

Set initial values from file

  Hello,

How can we set the initial values of a large number of variables with OpenModelica in order to ease  initialization? In Dymola, it is possible to load a “.mos” script file like this

    initialized(true);
    variable_a=12.34;
    variable_b=9.0;
    variable_c=77.31;

Is it possible to process such files in OMEdit? With a scripting command in OMShell?

Kind regards

Re: Set initial values from file

From command-line or OMEdit additional simulation flags (-overrideFile=...) or in OMShell simFlags="-overrideFile=...".

https://openmodelica.org/doc/OpenModeli … erridefile

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