(AX < b) instead of (AX <= b) using the solver " intlinprog "
Ältere Kommentare anzeigen
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
Weitere Antworten (1)
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
Ismaeel
am 24 Dez. 2016
Matt J
am 25 Dez. 2016
I wonder if this should be
bprime = b ./ (1+eps(b));
?
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.
Kategorien
Mehr zu Robotics System Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!