Fmincon / Multistart: Local minimum found, but one nonlinear constraint is violated
Mostrar comentarios más antiguos
Hi,
i am trying to find an optimal point with multistart / fmincon. Matlab finds a local minima, for which the following message is given in the output struct:
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions,
to within the value of the optimality tolerance,and constraints are satisfied to within the value of the
constraint tolerance.<stopping criteria details>
Optimization completed: The relative first-order optimality measure, 7.337955e-07,
is less than options.OptimalityTolerance = 1.000000e-06, and the relative maximum constraintviolation, 7.082693e-07,
is less than options.ConstraintTolerance = 1.000000e-06.
i have 13 nonlinear constraints, of which one is violated.
This is the constraint:
ceq(10) = (L_1 - (L_2 - L_3)) - 0.001;
I want to achieve:
abs(L_1 - (L_2 - L_3)) <= 0.001;
If i check this constraint by hand, I get
abs(L_1 - (L_2 - L_3)) = 0.0011;
which is larger than the desired value 0.001
The constraint tolerance in optimoptions is set to 1e-6 by default.
How can this happen? The output clearly says, that all the constraints are met, but in reality this one is not.
6 comentarios
Shashank Gupta
el 22 de Mzo. de 2021
Hi,
Would you share your code and all the necessary files required for me to investigate?
Cheers.
e_frog
el 22 de Mzo. de 2021
Matt J
el 22 de Mzo. de 2021
I can't be sure what is going on without code that can actually be executed, but just as a a remark, fmincon expects the constraints to be differentiable, so it may be better to avoid abs,
ceq(10) = (L_1 - (L_2 - L_3)) - 0.001;
ceq(11) = 0.001 - (L_1 - (L_2 - L_3)) ;
e_frog
el 22 de Mzo. de 2021
Matt J
el 22 de Mzo. de 2021
The best would be to provide an example which we can use to reproduce what you are seeing.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Systems of Nonlinear Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!