multiobjective optimization problem (NSGA)

Hi all, I am trying to perform multi objective optimization and this is my function
f
unction [y, cons] = TMS_CONSTR_objfun(x)
y = [0 0];
cons = [];
x(1:10)=1;
d(1:10)=0;
sp(1:10)=0;
y(1)=sum(x(1:10));
for h=1:10
d(h)=x(h)*xe(h);
sp(h)=x(h)*ve(h);
end
dd=d(d~=0);
spp=sp(sp~=0);
n=length(dd);
for j=2:n-1 y(2)=abs(((dd(1)+dd(2))/(2*spp(1)))+9.7-((x(n)+x(n-1))/(2*spp(n))+ sum((x(j+1)-x(j-1))/(2*spp(j))))); end
I keep received an error: Undefined function or variable 'x'.
why?

回答(1 个)

Yu Jiang
Yu Jiang 2014-8-13
编辑:Yu Jiang 2014-8-13
Hi Adam
It seems that you are executing the nonlinear function itself. If that is the case, I wonder what is the expected answer? Also, would you let me know what is the output cons for?
if you want to optimize this function, you need to use one of the optimization solvers in MATLAB, such as fmincon and fminsearch. The documentations are given as below:
For multiobjetive optimization, you can refer to

类别

在 帮助中心 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

标签

提问:

2014-8-12

编辑:

2014-8-13

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by