multiobjective optimization problem (NSGA)

1 view (last 30 days)
adam
adam on 12 Aug 2014
Edited: Yu Jiang on 13 Aug 2014
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?

Answers (1)

Yu Jiang
Yu Jiang on 13 Aug 2014
Edited: Yu Jiang on 13 Aug 2014
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

Community Treasure Hunt

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

Start Hunting!