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

What happened to -iim=numeric?

What happened to -iim=numeric?

I've seen in the change log that numeric initialization has been removed because it is deprecated (r24058). Can someone please explain why this very useful capability has been removed? Is there an undocumented functionality that replaces this?

Numeric initialization is critical for a whole suite of problems where symbolic initialization is not possible (as far as I know), particularly when there are multiple solutions to the initialization problem or when the initial values of state variables is only approximately known. For example, consider a 2D spring-mass-spring system under gravity where the spring supports are closer together than the total length of the springs (causing it to form a triangle or truss). There are two solutions: 1) the mass hangs down in the direction of gravity, and 2) the mass is held up by the springs in a higher total energy configuration. How can I tell the initializer to go to one solution or the other? With numeric initialization all that was needed was to give it some bias to put it in the local region of the solution and let ipopt (or other optimizer) find the exact solution, which is the best anyone could really hope for in complex problems.

Any insight as to why this was done and any possible workarounds/replacement capabilities would be very much appreciated.

Re: What happened to -iim=numeric?

The same thing will happen with the symbolic solver according to the presentation today at the OpenModelica workshop. While solving the equation, an additional equation will be added and the solution chosen will be the one closest to the previous value (for continuous time), which should mean the value closer to the start value for initialisation problems. If the ExpressionSolve module cannot solve the equation, a non-linear system will be added and again the start value influences the initial solution.

Re: What happened to -iim=numeric?

Hmm, interesting. I will look at the presentation (once it is posted) to see how you perform this magic. Thank you.

Re: What happened to -iim=numeric?

Numeric initialization was not able to handle discrete variables properly. Therefore, it was no good idea to trust the generated results. Now, this is completely removed and you should test the symbolic initialization (default configuration) for your models.
As Martin already wrote, you should be able to hint at the intended solution using start values. Therefore, the initialization (test +d=initialization) prints all the variables that are used in iteration processes.
Besides that, using homotopy could help as well. Unfortunately, there is only a poor implementation of it right now, but we will release a completely new implementation later on this year.

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