﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5139	Initialization failure due to min/max violations do not trigger the homotopy-based initialization	Francesco Casella	Willi Braun	"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 [https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/simulationflags.html#simflag-homotopyonfirsttry -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."	defect	new	high	1.13.0	Run-time				
