<H3 ><FONT size=1>线性规划问题求最优解函数:</FONT></H3> 
<  ><FONT size=1><B><FONT face="Times New Roman">       </FONT></B><B>调用格式:<FONT face="Times New Roman">       x=linprog(f,A,b)<p></p></FONT></B></FONT></P> 
<  ><B><FONT face="Times New Roman"><FONT size=1>                            x=linprog(f,A,b,Aeq,beq)<p></p></FONT></FONT></B></P> 
<  ><B><FONT face="Times New Roman"><FONT size=1>                            x=linprog(f,A,b,Aeq,beq,lb,ub)<p></p></FONT></FONT></B></P> 
<P ><B><FONT face="Times New Roman"><FONT size=1>                            x=linprog(f,A,b,Aeq,beq,lb,ub,x0)<p></p></FONT></FONT></B></P> 
<P ><B><FONT face="Times New Roman"><FONT size=1>                            x=linprog(f,A,b,Aeq,beq,lb,ub,x0,options)<p></p></FONT></FONT></B></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">              [x,fval]=linprog(</FONT></B><B>…<FONT face="Times New Roman">)<p></p></FONT></B></FONT></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">              [x, fval, exitflag]=linprog(</FONT></B><B>…<FONT face="Times New Roman">)<p></p></FONT></B></FONT></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">              [x, fval, exitflag, output]=linprog(</FONT></B><B>…<FONT face="Times New Roman">)<p></p></FONT></B></FONT></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">              [x, fval, exitflag, output, lambda]=linprog(</FONT></B><B>…<FONT face="Times New Roman">)<p></p></FONT></B></FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       </FONT><B>说明:</B><FONT face="Times New Roman">x=linprog(f,A,b)</FONT>返回值<FONT face="Times New Roman">x</FONT>为最优解向量。</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       x=linprog(f,A,b,Aeq,beq) </FONT>作有等式约束的问题。若没有不等式约束,则令<FONT face="Times New Roman">A=[ ]</FONT>、<FONT face="Times New Roman">b=[ ] </FONT>。</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       x=linprog(f,A,b,Aeq,beq,lb,ub,x0,options) </FONT>中<FONT face="Times New Roman">lb ,ub</FONT>为变量<FONT face="Times New Roman">x</FONT>的下界和上界,<FONT face="Times New Roman">x0</FONT>为初值点,<FONT face="Times New Roman">options</FONT>为指定优化参数进行最小化。</FONT></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">Options</FONT></B><B>的参数描述:</B></FONT> 
<FONT face="Times New Roman"><FONT size=1>Display   </FONT></FONT><FONT size=1>显示水平。<FONT face="Times New Roman"> </FONT>选择<FONT face="Times New Roman">’off’ </FONT>不显示输出;选择<FONT face="Times New Roman">’iter’</FONT>显示每一<FONT face="Times New Roman"> </FONT>步迭代过程的输出;选择<FONT face="Times New Roman">’final’ </FONT>显示最终结果。</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">MaxFunEvals </FONT>函数评价的最大允许次数</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">Maxiter </FONT>最大允许迭代次数</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">TolX   x</FONT>处的终止容限<FONT face="Times New Roman">  </FONT></FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman"><B>       </B>[x,fval]=linprog(</FONT>…<FONT face="Times New Roman">) </FONT>左端<FONT face="Times New Roman"> fval </FONT>返回解<FONT face="Times New Roman">x</FONT>处的目标函数值。</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">[x,fval,exitflag,output,lambda]=linprog(f,A,b, Aeq,beq,lb,ub,x0) </FONT>的输出部分:<B><FONT face="Times New Roman"> <p></p></FONT></B></FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman"><B>exitflag</B> </FONT>描述函数计算的退出条件:若为正值,表示目标函数收敛于解<FONT face="Times New Roman">x</FONT>处;若为负值,表示目标函数不收敛;若为零值,表示已经达到函数评价或迭代的最大次数。</FONT></P> 
<P ><FONT size=1><B><FONT face="Times New Roman">output </FONT></B>返回优化信息:<FONT face="Times New Roman">output.iterations</FONT>表示迭代次数;<FONT face="Times New Roman">output.algorithm</FONT>表示所采用的算法;<FONT face="Times New Roman">outprt.funcCount</FONT>表示函数评价次数。</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman"><B>lambda</B> </FONT>返回<FONT face="Times New Roman">x</FONT>处的拉格朗日乘子。它有以下属性:</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       lambda.lower-lambda</FONT>的下界;</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       lambda.upper-lambda</FONT>的上界;</FONT></P> 
<P ><FONT size=1><FONT face="Times New Roman">       lambda.ineqlin-lambda</FONT>的线性不等式;</FONT></P><FONT size=1>       lambda.eqlin-lambda的线性等式。</FONT> |