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

Model building depends on code ordering

Model building depends on code ordering

I've run into strange behavior with a model that runs fine in one case, but if I change the order of the variable definitions then initialization reaches a different solution and the simulation fails. Oddly, the number of algebraic variables also changes.

Unfortunately, I cannot share the model. I know it isn't very helpful without a test model, but perhaps someone can explain why this might happen?

Re: Model building depends on code ordering

There are some cases where the equation ordering may have an impact on the simulation:


  • The ordering of iteration variables can affect the solution process of nonlinear systems.

  • The ordering of equations/variables may affect tearing heuristics.

  • The ordering of equations may affect the initialization if the initial conditions are not fully specified, i.e. under-determined or over-determined.

  • Probably there are more such cases…

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