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

12 views (last 30 days)
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)

Alan Weiss
Alan Weiss on 18 Jul 2014
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
Matt J
Matt J on 21 Aug 2014
Edited: Matt J on 21 Aug 2014
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.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!