www.gusucode.com > Metaheuristic approach based on the invasive weed method 工具箱matlab源码 > Metaheuristic approach based on the invasive weed method/DEMO/DEMO/fx/Get_Functions_details.m

    % lb is the lower bound: lb=[lb_1,lb_2,...,lb_d]
% up is the uppper bound: ub=[ub_1,ub_2,...,ub_d]


function [lb,ub,fobj] = Get_Functions_details(F,dim)

    switch F
        case 1
            fobj = @Ackley;        
            lb=ones(1,dim)*-30;
            ub=ones(1,dim)*30;
                    
        case 2
            fobj = @Sphere;        
            lb=ones(1,dim)*-10;
            ub=ones(1,dim)*10;
            
        case 3
            fobj = @fx36;        
            lb=ones(1,dim)*-100;
            ub=ones(1,dim)*100;
            
    end


end