What is the difference between relative max(constraint violation) and Constraint violation?

Im using Findop function and interiorpoint algorithm. In one of my simulation results I see relative max(constraint violation) is 3.65e-11 and opreport.OptimizationOutput.constrviolation is 1.5757e-06.
Below is the detailed optimization
Optimization completed: The relative first-order optimality measure, 0.000000e+00,
is less than options.TolFun = 1.000000e-10, and the relative maximum constraint
violation, 3.648069e-11, is less than options.TolCon = 1.000000e-10.
Optimization Metric Options
relative first-order optimality = 0.00e+00 TolFun = 1e-10 (selected)
relative max(constraint violation) = 3.65e-11 TolCon = 1e-10 (selected)
What should i consider my constraint violation now? OptimizationOutput.constrviolation is still less than opt.tolcon!!

Answers (1)

Relative usually means relative to the value at the initial point x0. This means
relative violation = violation / (1 + max(confun(x0))
or some such thing, where confun means the various constraint violation functions.
You see that the constraint violation is different than the relative constraint violation. Why do optimization functions do this? In order to be more scale invariant. If you multiply your constraint functions by some scalar, the relative violation does not change.
Alan Weiss
MATLAB mathematical toolbox documentation

3 Comments

So the optimum value I got in the above case indeed a right value? Also,later part of my simulation im trying to eliminate the values which violated my constraint violation. For this Im using some thing like delete those rows whose opreport.OptimizationOutput.constrviolation>1e-6.
In the above case even though my relative max(constraint violation) is less than opt.tolcon as my output.constrviolation is 1.5757e-06 >1e-6 my optimum values are deleted.
Any Comments? Is there any way I can get relative max(constraint violation) value to the workspace?
You could just evaluate the constraints yourself at the final point. Then you can compute any violation metric you wish, whether it be Alan's
relative violation = violation / (1 + max(confun(x0))
or another one defined by you.

Sign in to comment.

Asked:

on 18 Jul 2014

Edited:

on 21 Aug 2014

Community Treasure Hunt

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

Start Hunting!