(AX < b) instead of (AX <= b) using the solver " intlinprog "
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 24 de Dic. de 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 comentarios
Ismaeel
el 24 de Dic. de 2016
Matt J
el 25 de Dic. de 2016
I wonder if this should be
bprime = b ./ (1+eps(b));
?
Walter Roberson
el 25 de Dic. de 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.
Categorías
Más información sobre Robotics System Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!