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

조회 수: 5 (최근 30일)
Ismaeel
Ismaeel 2016년 12월 24일
편집: Matt J 2016년 12월 30일
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

채택된 답변

Matt J
Matt J 2016년 12월 24일
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
John D'Errico
John D'Errico 2016년 12월 25일
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 2016년 12월 30일
편집: Matt J 2016년 12월 30일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 12월 24일
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
Matt J
Matt J 2016년 12월 25일
I wonder if this should be
bprime = b ./ (1+eps(b));
?
Walter Roberson
Walter Roberson 2016년 12월 25일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by