Interpretation of residuals returned by "check"

30 views
Skip to first unread message

Pan Zhao

unread,
Aug 4, 2016, 5:17:43 PM8/4/16
to YALMIP
Hi Johan,

I am trying to use command "check" to check feasibility of all the constraints in my optimization problem. For this, I would like to understand whether negative residuals mean infeasibility. 

In the help doc for "check" (http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Commands.Check), it is first stated that "a solution is feasible if all residuals related to inequalities are non-negative". So non-negative residuals mean feasibility. However, later, another sentence says "Also note that check only computes residuals. It does not judge if these indicate infeasibility". I am a little confused because here it says residuals cannot be used to judge feasibility

Any clarification will be appreciated. 

Thanks
Pan

Johan Löfberg

unread,
Aug 5, 2016, 2:39:45 AM8/5/16
to YALMIP
It means that you have to make a practical judgment from the actual application as to whether the tiny negative residuals means that the solution is practically infeasible. If your optimization problem is used to build a road intended to be at least 10 meters wide, and the solution is 9.99999999999 meters, do you care? 

Pan Zhao

unread,
Aug 5, 2016, 12:14:29 PM8/5/16
to YALMIP
Thank you Johan for your reply. I am clear now.  So the conclusion is: non-negative residuals indicate feasibility; however, negative residuals do not indicate infeasibility. 

Johan Löfberg

unread,
Aug 5, 2016, 12:25:38 PM8/5/16
to YALMIP
No Non-negative means feasible, negative means feasible.

What I say is that a measure of feasibility has to be judged w.r.t the context. If your constraint is that you should build a 10 meter wide road and the solution turns out to be 9.9999999, it is an infeasible solution, but who cares. For all practical purposes it is feasible. However, if your task is to prove stability of a very important dangerous system, and stability is guaranteed if a variable x is non-negative, and it turns out to be 0.000000001, i.e., feasible, would you bet your life that it still works?

Johan Löfberg

unread,
Aug 5, 2016, 1:22:34 PM8/5/16
to YALMIP
meant Non-negative means feasible, negative means infeasible

Pan Zhao

unread,
Aug 5, 2016, 1:27:47 PM8/5/16
to YALMIP
Thanks for your further clarification. I think I got the idea. Non-negative means feasible, negative means infeasible. However, infeasible solution can be regarded as feasible if the (absolute value of ) negative residuals are very small. 

Johan Löfberg

unread,
Aug 5, 2016, 2:06:23 PM8/5/16
to YALMIP
..depending on the context, it's up to you to make an engineering judgement on the solution
Reply all
Reply to author
Forward
0 new messages