(AX < b) instead of (AX <= b) using the solver " intlinprog "
古いコメントを表示
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
採用された回答
その他の回答 (1 件)
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 件のコメント
Ismaeel
2016 年 12 月 24 日
Matt J
2016 年 12 月 25 日
I wonder if this should be
bprime = b ./ (1+eps(b));
?
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.
カテゴリ
ヘルプ センター および File Exchange で Robotics System Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!