www.pudn.com > GA_Toolbar.rar > DELTA.M, change:1997-04-07,size:574b


function[change] = delta(ct,mt,y,b) 
% The delta function is the non-uniform distributions used by the nonUniform 
% mutations.  This function returns a change based on the current gen, the 
% max gen and the amount of possible deviation. 
% 
% function[change] = delta(ct,mt,y,b) 
% ct - current generation 
% mt - maximum generation 
% y  - maximum amount of change, i.e. distance from parameter value to bounds 
% b  - shape parameter 
r=ct/mt; 
if(r>1) 
  r=.99; 
  % disp(sprintf('max gen %d < current gen %d setting ratio = 1',mt,ct)); 
end 
change = y*(rand*(1-r))^b;