fgoalattain,重量目标多目标

时间:2014-10-07 09:26:02

标签: matlab

我有一个多目标问题,我必须最小化矢量函数F = [F1 F2 F3]。代码:

tau=4628; b=1.76*10^-4;


b0=0;        
b1=1/tau+b/3;    
b2=1/tau+b*2/3;
b3=1/tau+b;   

kk=0;
x=726.2083
% i tried with only the first objective for simplicty
goal = [2.5]% 0 0]
%weight=[ 1 1 1]
weight=abs(goal);
K0=1;
lb=0.0;
ub=b3;
options=optimset('Display','iter');

%vector fun objective
vec_fun=@(K1) [K1*x];% abs(K1-kk) abs(K1)];

[x1,fval]=fgoalattain(vec_fun,K0,goal,weight,[],[],[],[],[],[],[],options)

K1=x1

if K1==0 
  K1=b0;
elseif K1 >b0 && K1 <= b1 
  K1=b1;
elseif K1 >b1 && K1 <= b2
  K1=b2;
elseif K1 > b2 && K1 <= b3
  K1=b3;
else K1=0;
end

K=K1;

代码不起作用。它让我回来了

x1 =-6.8245e+23
fval = -4.9560e+26
K1 = -6.8245e+23

为什么fval!=目标?

谢谢你,抱歉我的英语不好。

0 个答案:

没有答案