How to force intlinprog to give integer solution ?
古いコメントを表示
The following command
x=intlinprog([0; 0; 0],[1 2 3],-[0 2 0;0 1 2;3 1 0],-[6;13;11],[],[],[0;0;0],[])
produced x=[2.6667 3 5]' which is not integer.
回答 (2 件)
I think it's a bug. If your goal is simply to find some feasible solution to the constraints, I think you can workaround the bug with any nonzero f vector, e.g.,
>> x=intlinprog([1e-10,0,0],[1 2 3],-[0 2 0;0 1 2;3 1 0],-[6;13;11],[],[],[0;0;0],[]);
x =
0
11
1
3 件のコメント
Jan
2015 年 11 月 7 日
編集済み: Walter Roberson
2015 年 11 月 7 日
Walter Roberson
2015 年 11 月 7 日
What is the exitflag being returned? You do not appear to be recording the exitflag so you do not know what the output represents.
Jan
2015 年 11 月 8 日
編集済み: Walter Roberson
2015 年 11 月 8 日
Alan Weiss
2015 年 11 月 9 日
編集済み: Alan Weiss
2015 年 11 月 9 日
0 投票
I think that this must be a bug in your Optimization Toolbox™ version. Please report the issue to technical support. There might be a workaround.
Alan Weiss
MATLAB mathematical toolbox documentation
カテゴリ
ヘルプ センター および File Exchange で Linear Programming and Mixed-Integer Linear Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!