Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Multiobjective optimization problem
Replies: 0

 Gabboc Posts: 2 Registered: 4/10/13
Multiobjective optimization problem
Posted: Apr 10, 2013 10:27 AM

I'm trying to solve a problem for my multiobjective optimization.
The objective functions are the regression function I've been calculated with LinearModel.stepwise evaluated in my fitness function in this way:

function y = cpt_MAT(x)
load Stepwise_model; %the workspace that contain the models of regression
temp=zeros(1,29);
temp(1,1:23)=x(1,1:23); %this to lines are to delete the variable not included in the model (in this case x(24) )
temp(1,24:29)=x(1,25:30);
y(1)=-feval(md13,temp); %it's a maximizing problem

temp=zeros(1,29);
temp(1,1:13)=x(1,1:13);
temp(1,14:29)=x(1,15:30);
y(2)=-feval(md15,temp);

....
...
..

and again until y(10)=...

My optimization script is:

FitnessFunction=@cpt_MAT;
numberOfVariables=30;
lb = [1000 150 200 80 20 50 40 20 150 1000 500 70 60 100 100 20 16 3000 500 300 150 100 1 50 35 500 1000 27 500 600]; % Lower bound
ub=[];
A=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1];
b=[17000];
Aeq=[];
beq=[];
options = gaoptimset('ParetoFraction',0.7,'PopulationSize',5);
[x,Fval,exitFlag,Output] = gamultiobj(FitnessFunction,numberOfVariables,A,b,Aeq,beq,lb,ub,options);
save ottim_feval;

The optimization script return the following errors:

"Subscripted assignment dimension mismatch.

Error in fcnvectorizer (line 14)
y(i,:) = feval(fun,(pop(i,:)));

Error in gamultiobjMakeState (line 52)
Score =
fcnvectorizer(state.Population(initScoreProvided+1:end,:),FitnessFcn,numObj,options.SerialUserFcn);

Error in gamultiobjsolve (line 11)
state =
gamultiobjMakeState(GenomeLength,FitnessFcn,output.problemtype,options);

Error in gamultiobj (line 238)
[x,fval,exitFlag,output,population,scores] = gamultiobjsolve(FitnessFcn,nvars,
...

Error in Ottim_feval (line 17)
[x,Fval] =
gamultiobj(FitnessFunction,numberOfVariables,A,b,Aeq,beq,lb,ub,options);

Caused by:
Failure in user-supplied fitness function evaluation. GA cannot continue."

Why??