﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3832	Wrong min/max attributes for derivatives in equation systems	Rüdiger Franke	Lennart Ochel	"Nonlinear solvers can exploit the min/max attributes of variables. The backend introduces additional variables for derivatives. It is good if these variables for der(x) keep nominal attribute of x. They must not keep min and max attributes though.

See e.g.:
{{{
setCommandLineOptions(""+simCodeTarget=Cpp"");
loadModel(Modelica);
simulate(Modelica.Fluid.Examples.DrumBoiler.DrumBoiler);
}}}

The file `OMCppModelica.Fluid.Examples.DrumBoiler.DrumBoilerAlgloop138.cpp:16f` contains {name, nominal, min, max}:
{{{
  _vars[0] = {""der(evaporator.V_l)"", 1.0, -1e60, 1e60};
  _vars[1] = {""der(evaporator.p)"", 1000000.0, 611.657, 100000000.0};
}}}

The backend should not provide the min and max attributes of `evaporator.p` for `der(evaporator.p)` because the derivative of the pressure can be negative.
"	defect	new	high	Future	Backend				
