What does relative constraint tolerance of fmincon in detail ?

7 visualizzazioni (ultimi 30 giorni)
Hi everyone,
i've got a question regarding the relative constraint tolerance of fmincon. I was looking for the detailed fomula, how the relative constraint violation using fmincon is computed, but couldn't find an answer. I have only linear inequality constraints. Is it like relative violation = violation / (1 + max(confun(x0)), where confun denotes the constraints ? But if I calculate these values, i dont get the same values as the iterative display shows
Furthermore, how can the relative constraint violation be interpreted ? Is it a measure, how good the constraints are satisfied ? The smaller the relative constraint tolerance, the better the result ?
Thanks in advance

Risposta accettata

Alan Weiss
Alan Weiss il 29 Nov 2021
As far as the interpretation, a positive value means at least one constraint is violated. A zero (or negative for other solvers) value means all constraints are satisfied. The larger the reported value, the more the violation. However, because the value is relative to something, the numerical value of the iterative display does not necessarily give a clear meaning.
I am sorry, but I cannot easily give you the meaning of the value. It depends on the specific fmincon algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Commenti
Fabian Friz
Fabian Friz il 29 Nov 2021
Thank you very much for your answer.
I used the interior-point algorithm of fmincon. Do you know the specific definition of how these relative constraint violation values are computed, so that I can get a better understanding of my problem behavior. I think this would be very helpful, in order to find a reasonable upper bound for the relative constraint tolerance and also to geht a better understanding of the problem behaviour.
The problem is, that if I set the relative constraint violation too low, there may be some infeasible constraints.Consequently, the algorithm doesnt converge and if I set the tolerance too high, the solution is not good enough and constraints are almost violated. In general I dont know how to get the best value for the relative constraint tolerance.
I hope I could clarify my question a little bit.
Thanks in advance !
Alan Weiss
Alan Weiss il 29 Nov 2021
Modificato: Alan Weiss il 29 Nov 2021
Sorry, I really don't understand your application. You say "... if I set the relative constraint violation too low, there may be some infeasible constraints." If there are violated constraints, well, either the solution is not an acceptable solution or you didn't really mean that those constraints are hard constraints, meaning they must be satisfied.
I think that the more fruitful approach for you is instead of trying to figure out exactly what "relative" means, you shjould check whether your linear constraints are infeasible by solving a linear programming problem. If they are infeasible, then you need to fix your problem formulation. On the other hand, if they are feasible, then you should be able to find a solution with zero infeasibility, and there is no reason to fiddle with your constraint tolerance.
Yes, I am oversimplifying. You might be able to solve a sequence of problems with gradually decreasing constraint tolerance. Or you could use a solver such as surrogateopt or ga that, by its nature, is always feasible with respect to linear constraints, even though these solvers are not nearly as speedy as fmincon.
Bottom line: I think that trying to set a good constraint tolerance is not a good use of your time. Instead, try to figure out if your problem has any feasible points, and if so, you can set as small a tolerance as makes sense, including 0. You can also try using different algorithms if the interior-point algorithm is not giving you an accurate enough solution.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by