PDA

查看完整版本 : [MATLAB数学相关] 【求助】有约束线性规划


书生有点胖
2012-08-29, 14:52
f=[861 959 950 984 888 290.6 852 800 300 300 300 300 147 65 1300];
A=[56.66 61.88 65.64 64.3 61.59 0 56.67 54 45.24 42.33 41.77 28.86 0 0 0;
-56.66 -61.88 -65.64 -64.3 -61.59 0 -56.67 -54 -45.24 -42.33 -41.77 -28.86 0 0 0;
0.03 0.07 0.021 0.031 04.052 0.001 0.037 0.069 0.054 0.076 0.047 0.53 0 0.001 0.033*0.223;
4.87 3.88 3.68 4.93 8.41 2.18 4.83 7.68 6.21 7.87 4.42 8.34 38.75 4.03 8.233;
-4.87 -3.88 -3.68 -4.93 -8.41 -2.18 -4.83 -7.68 -6.21 -7.87 -4.42 -8.34 -38.75 -4.03 -8.233;]
B=[55.0;-53.0;0.06;7.0;-5.0]
Aeq=[ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1;
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0;
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0;
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0;
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0;
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0;
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
];
lb=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
ub=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
Beq=[1;0.045;0.041;0.0088;0.026;0.017;0.018;0.018;0.225;0.087;0.053];
[x,fval]=linprog(f,A,B,Aeq,Beq,[],[]);


大神们帮我看看有什么不对的地方吗?
目的求最小值,等式约束和不等式约束读设定好,为什么运行以后是:
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-08.)