Fmincon / Multistart: Local minimum found, but one nonlinear constraint is violated
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Matt J
le 22 Mar 2021
The best would be to provide an example which we can use to reproduce what you are seeing.
Réponse acceptée
Matt J
le 22 Mar 2021
Modifié(e) : Matt J
le 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.
13 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!