作业帮 > 综合 > 作业

matlab中用linprog函数提示Optimization terminated怎么解?

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/06 10:45:19
matlab中用linprog函数提示Optimization terminated怎么解?
F=[10 90 20 80 40 70 50 60 30 60 80 40];
m=[1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1
1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1 0 0
0 0 1 0 0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1];
n=[4 3 5 2 4 3 3];
M=[0 0 0 0 0 0 0 0 0 0 0 0];
[X,v]=linprog(F,[],[],m,n,M);
老提示Optimization terminated,
matlab中用linprog函数提示Optimization terminated怎么解?
F=[10 90 20 80 40 70 50 60 30 60 80 40];
>> m=[1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1
1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1 0 0
0 0 1 0 0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1];
>> n=[4;3;5;2;4;3;3];
>> [x,fval]=linprog(F,[],[],m,n,zeros(7,1))
Exiting:One or more of the residuals,duality gap,or total relative error
has stalled:
the dual appears to be infeasible (and the primal unbounded).
(The primal residual < TolFun=1.00e-008.)
x =
1.0e+009 *
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
1.7174
-1.7174
-0.0000
-0.0000
-1.7174
1.7174
fval =
-8.5869e+010