multiobjective optimization problem (NSGA)
    10 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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 comentarios
Respuestas (1)
  Yu Jiang
    
 el 13 de Ag. de 2014
        
      Editada: Yu Jiang
    
 el 13 de Ag. de 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 comentarios
Ver también
Categorías
				Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!