当前位置:文档之家› 多目标规划MATLABwgx

多目标规划MATLABwgx


二、多目标规划的MATLAB求解
x = fgoalattain(@myfun,x0,goal,weight) where myfun is a MATLAB function such as function F = myfun(x) F = ... % Compute function values at x.
ceq = ...
% Nonlinear equalities at x
if nargout > 2 % Nonlcon called with 4 outputs
GC = ...
% Gradients of the inequalities
GCeq = ... % Gradients of the equalities
End
注意:一般 weight=abs(goal)
二、举例---有关循环控制系统优化问题
模型:x’=(A+BKC)x+Bu,设计K满足目标:
Y=Cx
1)循环系统的特征值(由命令eig(A+B*K*C)确定)的目标为goal = [-5,-3,-1] 2)K中元素均在[-4,4]中; 设特征值的weight= abs(goal),定义目标函数F如下: function F = eigfun(K,A,B,C) F = sort(eig(A+B*K*C)); % Evaluate objectives,由小到大排列
if nargout > 1 % Two output arguments
G = ... % Gradients evaluated at x
End
The gradient consists of the partial derivative dF/dx of each F at the point x.
一、0-1规划的MATLAB求解
数学模型:MIN f’x S.T. Ax<=b Aeqx=beq x=0,1
命令格式:x = bintprog(f) x = bintprog(f, A, b) x = bintprog(f, A, b, Aeq, beq) x = bintprog(f, A, b, Aeq, beq, x0) x = bintprog(f, A, b, Aeq, beq, x0, options) [x, fval] = bintprog(...) [x,fval, exitflag] = bintprog(...) [x, fval, exitflag, output] = bintprog(...)
x = fgoalattain(@myfun,x0,goal,weight,A,b,Aeq,beq,... lb,ub,@mycon)
where mycon is a MATLAB function such as
function [c,ceq] = mycon(x) c = ... % compute nonlinear inequalities at x. ceq = ... % compute nonlinear equalities at
二、多目标规划的MATLAB求解
v 有关优化参数设置:
v options = optimset(‘GradConstr’,‘on’)约束条件的 梯度方向参数设置为‘on’时,用下列函数定义:
function [c,ceq,GC,GCeq] = mycon(x)
c = ...
% Nonlinear inequalities at x
lb,ub,nonlcon,options) [x,fval] = fgoalattain(...) [x,fval,attainfactor] = fgoalattain(...) [x,fval,attainfactor,exitflag] = fgoalattain(...) [x,fval,attainfactor,exitflag,output] = fgoalattain(...) [x,fval,attainfactor,exitflag,output,lambda] = fgoalattain(...)
二、多目标规划的MATLAB求解
命令格式:
x = fgoalattain(fun,x0,goal,weight) x = fgoalattain(fun,x0,goal,weight,A,b) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub,nonlcon) x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,...
x = fgoalattain(fun,x0,goal,weight)
x = fgoalattain(fun,x0,gtain(fun,x0,goal,weight,A,b,Aeq,beq)
x = fgoalattain(fun,x0,goal,weight,A,b,Aeq,beq,lb,ub)
二、多目标规划的MATLAB求解
数学模型:MIN lambda S.T. F(x)-weight* lambda <=goal(达到目标) Ax<=b(线性不等式约束) Aeqx=beq(线性等式约束) C(x)<=0(非线性不等式约束) Ceq(x)=0(非线性等式约束)
lb<=x<=ub F=[f1(x),f2(x),…]为多目标的目标函数; F与[C(x),Ceq(x)]都是通过function来定义; 命令格式:
二、多目标规划的MATLAB求解
❖ 有关优化参数设置:
❖options = optimset(‘GradObj’,‘on’)目标函数的梯度 方向参数设置为‘on’时,用下列函数定义:
function [F,G] = myfun(x)
F = ...
% Compute the function values at x
相关主题