function Tr = agr(popsize,adaptmethod,adaptparams,itr,itrCounter)
    % set the default!!
 %perTrmax=0.4;  slope=20;  center=0.25;
 %if strcmp(methodname,'MOEAD-GR')
 %   perTr=0.1;
 %elseif strcmp(methodname,'MOEAD-AGR')
 %    adaptmethod='Sigm';    
   switch adaptmethod
        case 'Lin'
          perTrmax=0.5; 
        case 'Exp'
          perTrmax=0.6; slope=5;
        case 'Sigm'
          perTrmax=0.4; slope=20;center=0.25;
        otherwise
   end
% end    
    while length(adaptparams)>=2
        prop = adaptparams{1};
        val=adaptparams{2};
       adaptparams=adaptparams(3:end);
        switch prop
            case 'perTrmax'
               perTrmax=val;
            case 'slope'
               slope=val;
            case 'center'
               center=val;
            otherwise
               warning('agr doesnot support the given parameters name');
        end
    end
    switch adaptmethod
        case 'Lin'
          %adaptparams={'perTrmax',0.5};
          perTr=perTrmax*itr/curiter;
        case 'Exp'
          %adaptparams={'perTrmax',0.6,'slope',5};
          perTr=perTrmax*(exp(slope*itrCounter/itr)-1)/(exp(slope)-1);   
        case 'Sigm'
          %adaptparams={'perTrmax',0.4,'slope',20,'center',0.25};
          perTr=perTrmax/(exp((center-itrCounter/itr)*slope)+1);
        otherwise
    end
   Tr=ceil(popsize*perTr);
   clear perTrmax slope center perTr
end