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

2 Ansichten (letzte 30 Tage)
Ismaeel
Ismaeel am 24 Dez. 2016
Bearbeitet: Matt J am 30 Dez. 2016
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

Akzeptierte Antwort

Matt J
Matt J am 24 Dez. 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 Kommentare
John D'Errico
John D'Errico am 25 Dez. 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 am 30 Dez. 2016
Bearbeitet: Matt J am 30 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Robotics System Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by