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

Changing solver using something like annotation

Changing solver using something like annotation

Hello everybody,

I was wondering how I could change the default solvers for a particular model so that it starts with the solver I want it to start.
I would like to change the integration method to IDA and the linear solver to totalpivot.
First I thought that could be done with annotation() but I did not find any matching command.
I am using OMEdit.

Edited by: ToMaK - Jul-17-20 14:25:10

Re: Changing solver using something like annotation

You can tell OMEdit to save the simulation settings inside the model. When you have the model opened press "S" on the tool bar for Simulation Setup and down below you have: "Save simulation flags inside model", you can click that.

You can also manually use:

Code:


annotation(__OpenModelica_simulationFlags("-s=ida -ls=totalpivot"));

Simulation flags help here:
https://www.openmodelica.org/doc/OpenMo … flags.html

Re: Changing solver using something like annotation

Thank you very much!
Just in case somebody else wants to use the flag and does not know how. The syntax is a bit different. This is how I think it has to be:

__OpenModelica_simulationFlags(s="ida", ls="totalpivot")

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