Opened 6 years ago
Last modified 5 years ago
#5139 closed defect
Initialization failure due to min/max violations do not trigger the homotopy-based initialization — at Initial Version
Reported by: | Francesco Casella | Owned by: | Willi Braun |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: | Lennart Ochel, Karim Adbdelhak, Adeel Asghar |
Description
Please run this model
model Test Real x(min = 0); Real y(start = 0, fixed = true); equation 0 = homotopy(1e-6*x + sin(x+0.5), x-2.65); der(y) = x; end Test;
with -d=nowarnMinMax
. The simulation fails with
assert | warning | The following assertion has been violated at time 0.000000 x > = 0.0 assert | error | Variable violating min constraint: 0.0 <= x, has value: -0.5 assert | info | simulation terminated by an assertion at initialization stdout | error | Simulation process failed. Exited with code -1.
The User's Guide says about -homotopyOnFirstTry:
If the model contains the homotopy operator, directly use the homotopy method to solve the initialization problem. Without this flag, the solver first tries to solve the initialization problem without homotopy and only uses homotopy as fallback option.
If this was actually done, homotopy would ensure the convergence of the nonlinear solver to the positive solution, which would then be accepted by the min/max checks.
Please make sure that the triggering of an assertion during initialization does not abort the simulation but rather invokes the homotopy-based solution process.