- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Changing solver using something like...
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.
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
- adrpo
- 885 Posts
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")
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Changing solver using something like...