資源描述:
《多目標非線性規(guī)劃程序(matlab)》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、function[errmsg,Z,X,t,c,fail]=BNB18(fun,x0,xstat,xl,xu,A,B,Aeq,Beq,nonlcon,setts,options1,options2,maxSQPit,varargin);%·???D???êy1????£Dí?ó?a·??§?¨??μü′ú??·¨?£?úMATLAB5.3?Dê1ó?£?DèOptimizationtoolbox2.0?§3??%MinimizeF(x)%subjectto:xlb<=x<=xub%A*x<=B%Aeq*x=Beq%C(x)<=0%C
2、eq(x)=0%%x(i)?é?aá?D?±?á?£???êy£??ò1ì?¨?μ%ê1ó???ê?%[errmsg,Z,X]=BNB18('fun',x0,xstat,xl,xu,A,B,Aeq,Beq,'nonlcon',setts)%fun£oM???t??£?±íê?×?D??ˉ??±êoˉêyf=fun(x)%x0:áD?òá?£?±íê?±?á?3??μ%xstat£oáD?òá?£?xstat(i)=0±íê?x(i)?aá?D?±?á?£?1±íê???êy£?2±íê?1ì?¨?μ%xl£oáD?òá?£?±íê?
3、±?á?????%xu:áD?òá?£?±íê?±?á?é???%A:???ó,±íê???D?2?μèê???ê??μêy%B:áD?òá?,±íê???D?2?μèê???ê?é???%Aeq:???ó,±íê???D?μèê???ê??μêy%Beg:áD?òá?,±íê???D?2?μèê???ê?óò???μ%nonlcon:M???t??£?±íê?·???D???ê?oˉêy[C,Ceq]=nonlin(x),???DC(x)?a2?μèê???ê?,%Ceq(x)?aμèê???ê?%setts:??·¨éè??%e
4、rrmsq:·μ??′í?óìáê?%Z:·μ????±êoˉêy×?D??μ%X:·μ??×?ó??a%%àyìa%maxx1*x2*x3%-x1+2*x2+2*x3>=0%x1+2*x2+2*x3<=72%10<=x2<=20%x1-x2=10%?èD′Moˉêydiscfun.m%functionf=discfun(x)%f=-x(1)*x(2)*x(3);%?ó?a%clear;x0=[25,15,10]';xstat=[111]';%xl=[2010-10]';xu=[302020]';%A=[1-2-2;122];B=[
5、072]';Aeq=[1-10];Beq=10;%[err,Z,X]=BNB18('discfun',x0,xstat,xl,xu,A,B,Aeq,Beq);%XMAX=X',ZMAX=-Z%%BNB18Findstheconstrainedminimumofafunctionofseveralpossiblyintegervariables.%Usage:[errmsg,Z,X,t,c,fail]=%BNB18(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,nonlcon,settings,options1
6、,options2,maxSQPiter,P1,P2,...)%%BNBsolvesproblemsoftheform:%MinimizeF(x)subjectto:xlb<=x0<=xub%A*x<=BAeq*x=Beq%C(x)<=0Ceq(x)=0%x(i)iscontinuousforxstatus(i)=0%x(i)integerforxstatus(i)=1%x(i)fixedforxstatus(i)=2%%BNBuses:%OptimizationToolboxVersion2.0(R11)09-Oct-1998%F
7、romthistoolboxfmincon.miscalled.Formoreinfotypehelpfmincon.%%funisthefunctiontobeminimizedandshouldreturnascalar.F(x)=feval(fun,x).%x0isthestartingpointforx.x0shouldbeacolumnvector.%xstatusisacolumnvectordescribingthestatusofeveryvariablex(i).%xlbandxubarecolumnvectors
8、withlowerandupperboundsforx.%AandAeqarematricesforthelinearconstrains.%BandBeqarecolumnvectorsforthelinearconstrains.