MATLAB Answers

How to separate the Hybrid iteration from the MOGA iteration?

2 views (last 30 days)
Mohamed Abubakr
Mohamed Abubakr on 1 Dec 2019
Answered: Alan Weiss on 2 Dec 2019
Hi
I am using gamultiobj and I am activating the hybrid option.
I am woundering if there is any way to store the Pareto front before the hybrid function start, so I can assess its effect on the solution. Till now I can up with performing gamultiobj without hybrid for say 20 generation then I perform only one more generation of gamultiobj with hybrid. But by this why I can't yet seperate the hybrid function effect since it is still couple with 1 more itteration using GA. I tried to set the GA generation to zero but the matlab refused this settings.
You can find below the part of the code I am intrested in modifying
Thanks
%Without hybrid
for i=2:20
InitialPopulationMatrix_Data=population;
InitialScoresMatrix_Data=score;
[x,fval,exitflag,output,population,score] = MOGA_2_With_Intial(nvars,lb,ub,PopulationSize_Data,CrossoverFraction_Data,ParetoFraction_Data,MaxGenerations_Data,MaxStallGenerations_Data,FunctionTolerance_Data,ConstraintTolerance_Data,InitialPopulationMatrix_Data,InitialScoresMatrix_Data);
end
%%Hybrid
InitialScoresMatrix_Data=score;
InitialPopulationMatrix_Data=population;
MaxGenerations_Data=1;
[x,fval,exitflag,output,population,score] = MOGA_2_With_Hybrid(nvars,lb,ub,PopulationSize_Data,CrossoverFraction_Data,ParetoFraction_Data,MaxGenerations_Data,MaxStallGenerations_Data,FunctionTolerance_Data,ConstraintTolerance_Data,InitialPopulationMatrix_Data,InitialScoresMatrix_Data);

  0 Comments

Sign in to comment.

Answers (1)

Alan Weiss
Alan Weiss on 2 Dec 2019
You can use a custom output function to store the population and Pareto front at each generation. See Custom Output Function for Genetic Algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation

  0 Comments

Sign in to comment.

Sign in to answer this question.