MATLAB解决0-1规划问题,输入算法后,显示如下Warning:The given starting point x0 is not binary integer feasible; it will be ignored.具体程序为f=[10,2,3,12,7,4,8,12,2,5,12,6,11,10000,12,16,12,11,6,7,10000,0,0,0,0];aeq=[1 1 1 1 1 0 0 0
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 15:05:35
MATLAB解决0-1规划问题,输入算法后,显示如下Warning:The given starting point x0 is not binary integer feasible; it will be ignored.具体程序为f=[10,2,3,12,7,4,8,12,2,5,12,6,11,10000,12,16,12,11,6,7,10000,0,0,0,0];aeq=[1 1 1 1 1 0 0 0
MATLAB解决0-1规划问题,输入算法后,显示如下
Warning:The given starting point x0 is not binary integer feasible; it will be ignored.
具体程序为f=[10,2,3,12,7,4,8,12,2,5,12,6,11,10000,12,16,12,11,6,7,10000,0,0,0,0];
aeq=[1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0
0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1];
beq=[1;1;1;1;1;1;1;1;1;1];
lb=zeros(25,1);
[x,fv,exitflag,output]=bintprog(f,[],[],aeq,beq,lb);
MATLAB解决0-1规划问题,输入算法后,显示如下Warning:The given starting point x0 is not binary integer feasible; it will be ignored.具体程序为f=[10,2,3,12,7,4,8,12,2,5,12,6,11,10000,12,16,12,11,6,7,10000,0,0,0,0];aeq=[1 1 1 1 1 0 0 0
不需要初始值,用指令
[x,fv,exitflag,output]=bintprog(f,[],[],aeq,beq)
可求
Optimization terminated.
x =
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
fv =
19
exitflag =
1
output =
iterations: 20
nodes: 1
time: 3/64
algorithm: 'LP-based branch-and-bound'
branchStrategy: 'maximum integer infeasibility'
nodeSrchStrategy: 'best node search'
message: 'Optimization terminated.