fitnessfcn = @(x)[sin(x),cos(x)];
nvars = 1;
lb = 0;
ub = 2*pi;
rng default
x = gamultiobj(fitnessfcn,nvars,[],[],[],[],lb,ub)
plot(sin(x),cos(x),'r*')
xlabel('sin(x)')
ylabel('cos(x)')
title('Pareto Front')
legend('Pareto front')
funx=-0.5*x(1)^2+100*log(x(1)+x(2)-14)-x(5)/2+0.9*(-0.5*(1-x(5)/40)*x(3)^2+100*log(x(3)+x(4)-14))
funy=-0.5*x(2)^2+100*log(x(1)+x(2)-14)-x(6)/2+0.9*(-0.5*(1-x(5)/40)*x(4)^2+100*log(x(3)+x(4)-14))
fitnessfcn = @(x)[funx,funy];
nvars = 2;
lb = [0,0,0,0,0,0];
ub = [Inf,Inf,Inf,Inf,24,24];
rng default
x = gamultiobj(fitnessfcn,nvars,[],[],[],[],lb,ub)
plot(funx,funy,'r*')
xlabel('funx')
ylabel('funy')
title('Pareto Front')
legend('Pareto front')
0 Comments
Sign in to comment.