(AX < b) instead of (AX <= b) using the solver " intlinprog "

2 views (last 30 days)
I was wondering if there is an option (smaller than (<)) instead of (<=) using the solver "intlinprog". There is only the option (smaller than or equal (<=)) but there is no option for (smaller than but not equal (<)). I don't want to increase the values in [b] to satisfy what I want because my problem is very sensitive to any change in [b] even if it's one over million (I already did this case). Thanks in advance

Accepted Answer

Matt J
Matt J on 24 Dec 2016
No, there is no such option. In any case, increasing b would not be the solution. You would want to decrease b.
I don't want to increase the values in [b] to satisfy what I want because my problem is very sensitive to any change in [b] even if it's one over million
Anything you do to achieve A(i,:)*x<b(i) is going to be equivalent to decreasing b(i) by some amount. So, if your problem is over-sensitive to changes like this, then the flaw is in the problem, not the algorithm.
  3 Comments
John D'Errico
John D'Errico on 25 Dec 2016
The problem is it is almost impossible to know how much is enough, but not too much. That would depend on the exact problem, as too little a tweak in b can see floating point issues overwhelm the tiny tweak that you made.
I'd normally make a stab at it by using a differential in b that is twice the size of the TolCon value that is used (supplied or by default). But as I saw, you also said that a relative change of roughly 1e-6 was too much. (You said that one part in a million was too much.)
Really, the problem is that floating point arithmetic simply does not handle strict inequality constraints well. As Matt said, it is not even an option you can apply, and for good reason.
Matt J
Matt J on 30 Dec 2016
Edited: Matt J on 30 Dec 2016
Any idea about how much would be ok for this reduction in [b] in general?
In general?
In general, I would say that you would have to go back to the physical quantity that b represents and assess with what precision, p(i), the different b(i) can be measured physically. You would than reduce the b(i) according to
b'(i) = b(i)-p(i)
and re-solve. Nothing in the interval [b', b] matters, because you can never really be sure, within the precision of your measurement process, that it is less than the critical threshold b.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 24 Dec 2016
Construct
bprime = b ./ (1+eps);
bprime(b == 0) = -eps(realmin);
bprime(b < 0) = b(b < 0) .* (1+eps);
Now use bprime instead of b as your target matrix. The logic is that (strictly less than b) permits (less than or equal to the first representable number less than b)
  3 Comments
Matt J
Matt J on 25 Dec 2016
I wonder if this should be
bprime = b ./ (1+eps(b));
?
Walter Roberson
Walter Roberson on 25 Dec 2016
No, for positive values, b * (1+eps(1)) is the first representable value greater than b, and b / (1+eps(1)) is the first representable value less than b.

Sign in to comment.

Categories

Find more on Robotics System Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!