資源描述:
《多目標(biāo)非線性規(guī)劃程序.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
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%
2、Ceq(x)=0%%x(i)?é?aá?D?±?á?£???êy£??ò1ì?¨?μ%ê1ó???ê?%[errmsg,Z,X]=BNB18('fun',x0,xstat,xl,xu,A,B,Aeq,Beq,'nonlcon',setts)35/35%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?μèê???ê?,35/35%Ceq(x)?aμèê???ê?%set
4、ts:??·¨éè??%errmsq:·μ??′í?óìáê?%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)35/35%f=-x(1)*x(2)*x(3);%?ó?a%clear;x0=[25,15,10]';xstat=[111]';%xl=[2010-10]';xu=[302020]'
5、;%A=[1-2-2;122];B=[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]=%35/35BNB18(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,
6、nonlcon,settings,options1,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%35/35%BNBuses:%OptimizationTool
7、boxVersion2.0(R11)09-Oct-1998%Fromthistoolboxfmincon.miscalled.Formoreinfotypehelpfmincon.%%funisthefunctiontobeminimizedandshouldreturnascalar.F(x)=feval(fun,x).%x0isthestartingpointforx.x0shouldbeacolumnvector.%xstatusisacolumnvectordescribingthestatusofeveryvariabl
8、ex(i).%xlbandxubarecolumnvectorswithlowerandupperboundsforx.%AandAeqarematricesforthelinearconstrains.35/35%BandBeqarecolumn