matlab中用linprog函数提示Optimization terminated怎么解?
1个回答

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