(AX < b) instead of (AX <= b) using the solver " intlinprog "
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 24 Déc 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 commentaires
Ismaeel
le 24 Déc 2016
Matt J
le 25 Déc 2016
I wonder if this should be
bprime = b ./ (1+eps(b));
?
Walter Roberson
le 25 Déc 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.
Catégories
En savoir plus sur Robotics System Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!