[SelPop,SelFunVal]=exp_selection(Pop,FunVal,selection_params) exp_selection: Exponential selection for single objective functions INPUTS Pop: Original population FunVal: A matrix of function evaluations, one vector of m objectives for each individual selection_params{1}= base: The parameter used by exponential selection is the base for exponentiation OUTPUTS SelPop: Selected population SelFunVal: A vector of function evaluations for each selected individual Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0001 function[SelPop,SelFunVal]=exp_selection(Pop,FunVal,selection_params) 0002 % [SelPop,SelFunVal]=exp_selection(Pop,FunVal,selection_params) 0003 % exp_selection: Exponential selection for single objective functions 0004 % INPUTS 0005 % Pop: Original population 0006 % FunVal: A matrix of function evaluations, one vector of m objectives for each individual 0007 % selection_params{1}= base: The parameter used by exponential selection is the base for exponentiation 0008 % OUTPUTS 0009 % SelPop: Selected population 0010 % SelFunVal: A vector of function evaluations for each selected individual 0011 % 0012 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es) 0013 0014 base = cell2num(selection_params{1}(1)); 0015 PopSize = size(Pop,1); 0016 0017 partialsum = base.^(FunVal)/sum(base.^(FunVal)); 0018 partialsum=cumsum(partialsum); 0019 Index=sus(PopSize,partialsum); % Stochastic Universal Sampling is used for sampling individuals 0020 SelPop=Pop(Index,:); 0021 SelFunVal=FunVal(Index,:); 0022 return 0023 0024 0025