<  ><FONT face="Times New Roman">c=[-750 -600 -430 -390</FONT></P> 
<  ><FONT face="Times New Roman">-1250 -600 -530 -490</FONT></P> 
<  ><FONT face="Times New Roman">-1000 -650 -480 -240</FONT></P> 
<P ><FONT face="Times New Roman">-700 -550 -480 -340];</FONT></P> 
<P ><FONT face="Times New Roman">A=[1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1 ]; </FONT></P> 
<P ><FONT face="Times New Roman">b=[10,16,11,18];</FONT></P> 
<P ><FONT face="Times New Roman"> <p></p></FONT></P> 
<P ><FONT face="Times New Roman">Aeq=[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0;</FONT></P> 
<P ><FONT face="Times New Roman">0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1];</FONT></P> 
<P ><FONT face="Times New Roman">beq=[9,17,10,5];</FONT></P> 
<P ><FONT face="Times New Roman">vlb=[1,2,2,1,2,2,2,3,2,2,2,1,1,2,1,0];</FONT></P> 
<P ><FONT face="Times New Roman">vub=[3,inf,inf,inf,5,inf,inf,inf,2,inf,inf,inf,2,8,inf,0];</FONT></P> 
<P ><FONT face="Times New Roman">[x,lam]=linprog(c,A,b, Aeq, beq,vlb,vub)</FONT></P> 
<P ><FONT face="Times New Roman">说明:本程序能运行,但是部分结果不对,找不出那里有问题,所以求助各位高手</FONT></P> 
<P >结果如下:</P> 
<P >Optimization terminated.</P> 
<P >x =</P> 
<P >    1.0000<BR>    6.0000<BR>    2.0000<BR>    1.0000<BR>    5.0000<BR>    3.0000<BR>    5.0000<BR>    3.0000<BR>    2.0000<BR>    6.0000<BR>    2.0000<BR>    1.0000<BR>    1.0000<BR>    2.0000<BR>    1.0000<BR>         0</P> 
<P ><BR>lam =</P> 
<P > -2.7740e+004</P> 
<P >X指人员安排,安排方案正确</P> 
<P >LAM应该等于-2.7150e+004</P> |