多目标非线性规划程序Matlab完整版

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

多目标非线性规划程序

M a t l a b

Document serial number【NL89WT-NY98YT-NC8CB-NNUUT-NUT108】

f u n c t i o n[e r r m s g,Z,X,t,c,f a i l]=

BNB18(fun,x0,xstat,xl,xu,A,B,Aeq,Beq,nonlcon,setts,options1,options2,maxSQPit,varargin );

%·Dêy1£Díóa·§¨μü′ú·¨£úDê1ó£DèOptimization toolbox §3

% Minimize F(x)

%subject to: xlb <= x <=xub

% A*x <= B

% Aeq*x=Beq

% C(x)<=0

% 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)

%fun£o Mt£±íê×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òᣱíê±á

%xu: áDòᣱíê±áé

%A: ó, ±íêD2μèêêμêy

%B: áDòá, ±íêD2μèêêé

%Aeq: ó, ±íêDμèêêμêy

%Beg: áDòá, ±íêD2μèêêóòμ

%nonlcon: Mt£±íê·Dêoˉêy[C,Ceq]=nonlin(x),DC(x)a2μèêê,

% Ceq(x)aμèêê

%setts: ·¨éè

%errmsq: ·μ′íóìáê

%Z: ·μ±êoˉêy×Dμ

%X: ·μ×óa

%

%àyìa

% max x1*x2*x3

% -x1+2*x2+2*x3>=0

% x1+2*x2+2*x3<=72

% 10<=x2<=20

% x1-x2=10

% èD′ Moˉêy

% function f=discfun(x)

% f=-x(1)*x(2)*x(3);

%óa

% clear;x0=[25,15,10]';xstat=[1 1 1]';

% xl=[20 10 -10]';xu=[30 20 20]';

% A=[1 -2 -2;1 2 2];B=[0 72]';Aeq=[1 -1 0];Beq=10;

% [err,Z,X]=BNB18('discfun',x0,xstat,xl,xu,A,B,Aeq,Beq);

% XMAX=X',ZMAX=-Z

%

% BNB18 Finds the constrained minimum of a function of several possibly integer variables.

% Usage: [errmsg,Z,X,t,c,fail] =

%

BNB18(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,nonlcon,settings,options1,options2,maxSQPiter ,P1,P2,...)

%

% BNB solves problems of the form:

% Minimize F(x) subject to: xlb <= x0 <=xub

% A*x <= B Aeq*x=Beq

% C(x)<=0 Ceq(x)=0

% x(i) is continuous for xstatus(i)=0

% x(i) integer for xstatus(i)= 1

% x(i) fixed for xstatus(i)=2

%

% BNB uses:

% Optimization Toolbox Version (R11) 09-Oct-1998

% From this toolbox is called. For more info type help fmincon.

%

% fun is the function to be minimized and should return a scalar. F(x)=feval(fun,x).

% x0 is the starting point for x. x0 should be a column vector.

% xstatus is a column vector describing the status of every variable x(i).

% xlb and xub are column vectors with lower and upper bounds for x.

% A and Aeq are matrices for the linear constrains.

% B and Beq are column vectors for the linear constrains.

% nonlcon is the function for the nonlinear constrains.

% [C(x);Ceq(x)]=feval(nonlcon,x). Both C(x) and Ceq(x) should be column vectors.

%

% errmsg is a string containing an error message if BNB found an error in the input.

% Z is the scalar result of the minimization, X the values of the accompanying variables.

% t is the time elapsed while the algorithm BNB has run, c is the number of BNB cycles and

% fail is the number of unsolved leaf sub-problems.

%

% settings is a row vector with settings for BNB:

% settings(1) (standard 0) if 1: use phase 1 by relaxation. This sometimes makes the algorithm

% faster, because phase 1 means the algorithm first checks if there is a feasible solution

% for a sub-problem before trying to find a best solution. If there is no feasible solution BNB

% will not try to find a best solution.

% settings(2) (standard 0) if 1: if the sub-problem did not converge do not branch. If a sub-

% problem did not converge this means BNB did not find a solution for it. Normally BNB will

% branch the problem so it can try again to find a solution.

相关文档
最新文档