function Archivar(x,coste_f,box_f)
global eMOGA
j=1;
while (j<=eMOGA.Nind_A)
a=box_domina(box_f,eMOGA.box_A(j,:));
if (a==0)
elseif (a==2)
return;
elseif (a==3)
b=domina(coste_f,eMOGA.coste_A(j,:));
switch b
case 0
dist1=norm((coste_f-((box_f-0.5).*eMOGA.epsilon+eMOGA.min_f))./eMOGA.epsilon,2);
dist2=norm((eMOGA.coste_A(j,:)-((box_f-0.5).*eMOGA.epsilon+eMOGA.min_f))./eMOGA.epsilon,2);
if (dist1<dist2)
eMOGA.ele_A(j,:)=x;
eMOGA.coste_A(j,:)=coste_f;
end
return;
case 1
eMOGA.ele_A(j,:)=x;
eMOGA.coste_A(j,:)=coste_f;
return;
case {2,3}
return;
otherwise
error('error en el switch b')
end
else
if j<eMOGA.Nind_A
eMOGA.ele_A(j:eMOGA.Nind_A-1,:)=eMOGA.ele_A(j+1:eMOGA.Nind_A,:);
eMOGA.box_A(j:eMOGA.Nind_A-1,:)=eMOGA.box_A(j+1:eMOGA.Nind_A,:);
eMOGA.coste_A(j:eMOGA.Nind_A-1,:)=eMOGA.coste_A(j+1:eMOGA.Nind_A,:);
end
j=j-1;
eMOGA.Nind_A=eMOGA.Nind_A-1;
end
j=j+1;
end
eMOGA.ele_A(eMOGA.Nind_A+1,:)=x;
eMOGA.coste_A(eMOGA.Nind_A+1,:)=coste_f;
eMOGA.box_A(eMOGA.Nind_A+1,:)=box_f;
eMOGA.Nind_A=eMOGA.Nind_A+1;