Opened 5 years ago
Last modified 5 years ago
#5807 closed defect
Start value for final parameters with fixed=false is ignored — at Version 4
Reported by: | Francesco Casella | Owned by: | Andreas Heuermann |
---|---|---|---|
Priority: | blocker | Milestone: | 1.16.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: | Karim Adbdelhak |
Description (last modified by )
Consider the following model (also attached)
model TestInitStart final parameter Real p(start = p_start, fixed = false); parameter Real p_start = -2; initial equation (p - 1)*p*(p+2) = 0; annotation(__OpenModelica_simulationFlags(lv=LOG_NLS_V)); end TestInitStart;
The Newton solver log clearly shows that the iterations start at p = 0
, not at p = -2
as expected, leading the convergence to the wrong solution.
This issue is preventing me to initialize in steady-state the big power plant model that I will present at the OpenModelica Workshop next week, so fixing this issue is currently top priority to show that OpenModelica can handle such real-life, complex models effectively.
Change History (6)
by , 5 years ago
Attachment: | TestInitStart.mo added |
---|
by , 5 years ago
Attachment: | TestInitStartEvaluate.mo added |
---|
comment:2 by , 5 years ago
It seems like the compiler drops all fixed=false
start values. That is correct for general initialization (in the sense that no initial equation is generated) but not for solving loops in the initialization problem.
I have a pretty good idea where to look!
comment:3 by , 5 years ago
This might be synchronized with the OpenModelica FMI 2.0 export. There are strict rules for start values defined. Sounds bad to implement it twice.
comment:4 by , 5 years ago
Description: | modified (diff) |
---|
Update: I just found a workaround: if I add
-d=evaluateAllParameters
, then the model works as expected.Maybe gives you some clues so as to how to fix the issue.
Unfortunately I cannot use this workaround of the big model because it causes a new frontend failure related to homotopy. Life's hard.