Fmincon / Multistart: Local minimum found, but one nonlinear constraint is violated

1 view (last 30 days)
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.
e_frog on 22 Mar 2021
Edited: e_frog on 22 Mar 2021
I know, but unfortunately I can't provide that because of confidentiality reasons and I am really sorry about that. Also the structure of my scripts is too complex, to easily get a minimal example. I understand, that it is hard to help me on this situation.
Nevertheless it would help me a lot, if I could at least get help with these questions:
  • Did I misunderstand the functionality of fmincon?
  • My assumption based on the documentation is, that fmincon may violate the nonlinear constraints for intermediate iterations, but not the the last / solution iteration. Is that correct?
  • Is fmincon supposed to be able to breach nonlinear constraints in the solution?
The deviation form the limit value is always so small, that it could be negligible, but it would greatly help me to basically just understand what fmincon does with nonlinear constraints in general.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 22 Mar 2021
Edited: Matt J on 22 Mar 2021
If the exit message says constraints were satisfied within tolerance, then that is what should have happened. However, the tolerance is relative for all fmincon algorithms except 'active-set'. Relative to what, the documentaiton does not seem to say, but it might be relative to the initial point. This means that if your initial point violated one of the constraints by say, 8000, then 0.0011 would be within the 1e-6 tolerance, because 0.0011/8000 < 1e-6.
A simple solution might be to reduce the ConstraintToleance to say, 1e-12. Or, use the active-set algorithm, if it applies to your problem.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!