[continue_evolution]=maxgen_maxval(currentgen,currentPop,currentFunVal,stop_cond_params) maxgen_maxval Implements the stop conditions of the algorithm which stops either when a maximum number of iterations has been reached or a given value of the function has been reached. INPUTS currentgen: Current generation. Pop: Current population CurrentFunVal: A matrix of function evaluations, one vector of m objectives for each individual stop_cond_params{1} = CantGen: Maximum number of generations stop_cond_params{2} = MaxVal: Maximum value of the function OUTPUTS continue_evolution= {1,0} to determine whether to continue with the EDA or stop Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0001 function[continue_evolution]=maxgen_maxval(currentgen,currentPop,currentFunVal,stop_cond_params) 0002 % [continue_evolution]=maxgen_maxval(currentgen,currentPop,currentFunVal,stop_cond_params) 0003 % maxgen_maxval Implements the stop conditions of the algorithm which stops either when a 0004 % maximum number of iterations has been reached 0005 % or a given value of the function has been reached. 0006 % INPUTS 0007 % currentgen: Current generation. 0008 % Pop: Current population 0009 % CurrentFunVal: A matrix of function evaluations, one vector of m objectives for each individual 0010 % stop_cond_params{1} = CantGen: Maximum number of generations 0011 % stop_cond_params{2} = MaxVal: Maximum value of the function 0012 % OUTPUTS 0013 % continue_evolution= {1,0} to determine whether to continue with the EDA or stop 0014 % 0015 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es) 0016 0017 CantGen = cell2num(stop_cond_params{1}(1)); 0018 MaxVal = cell2num(stop_cond_params{1}(2)); 0019 0020 continue_evolution = (max(currentFunVal(:,1))<MaxVal) & (currentgen<CantGen); 0021 0022 return 0023 0024 0025