multiobjective optimization problem (NSGA)
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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?
0 Commenti
Risposte (1)
Yu Jiang
il 13 Ago 2014
Modificato: Yu Jiang
il 13 Ago 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
0 Commenti
Vedere anche
Categorie
Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!