void HybridComp::SetUpFRH001_Com_CEC05() { string fname[m_numFuncs]; unsigned fid[m_numFuncs]; for(int i=0;i<m_numFuncs;i++){ mp_height[i]=100*i; } fname[0]="FUN_Expanded_Scaffer_F6_CEC05"; fname[1]="FUN_Expanded_Scaffer_F6_CEC05"; fname[2]="FUN_Rastrigin"; fname[3]="FUN_Rastrigin"; fname[4]="FUN_Griewank_Rosenbrock_F13_CEC05"; fname[5]="FUN_Griewank_Rosenbrock_F13_CEC05"; fname[6]="FUN_Weierstrass"; fname[7]="FUN_Weierstrass"; fname[8]="FUN_Griewank"; fname[9]="FUN_Griewank"; mp_stretchSeverity[0]=5.*5./100; mp_convergeSeverity[0]=1.; for(int i=0;i<m_numFuncs;i++) fid[i]=Global::msm_pro[fname[i]]; setFunction(fid,fname); mpp_f[0]->setSearchRange(-100,100); mpp_f[1]->setSearchRange(-100,100); mpp_f[2]->setSearchRange(-5,5); mpp_f[3]->setSearchRange(-5,5); mpp_f[4]->setSearchRange(-5,5); mpp_f[5]->setSearchRange(-5,5); mpp_f[6]->setSearchRange(-0.5,0.5); mpp_f[7]->setSearchRange(-0.5,0.5); mpp_f[8]->setSearchRange(-200,200); mpp_f[9]->setSearchRange(-200,200); mp_stretchSeverity[1]=5./100; mp_stretchSeverity[2]=5.; mp_stretchSeverity[3]=1.; mp_stretchSeverity[4]=5; mp_stretchSeverity[5]=1; mp_stretchSeverity[6]=50.; mp_stretchSeverity[7]=10.; mp_stretchSeverity[8]=5.*5/200; mp_stretchSeverity[9]=5./200; mp_convergeSeverity[1]=1.; mp_convergeSeverity[2]=1.; mp_convergeSeverity[3]=1.; mp_convergeSeverity[4]=1.; mp_convergeSeverity[5]=2.; mp_convergeSeverity[6]=2; mp_convergeSeverity[7]=2; mp_convergeSeverity[8]=2.; mp_convergeSeverity[9]=2.; for(int i=0;i<m_numFuncs;i++){ mpp_f[i]->setScale(mp_stretchSeverity[i]); } setBias(360); }
void HybridComp::SetUpFCom_CEC05(){ string fname[m_numFuncs]; unsigned fid[m_numFuncs]; for(int i=0;i<m_numFuncs;i++){ mp_height[i]=100*i; mp_convergeSeverity[i]=1.; } fname[0]="FUN_Rastrigin"; fname[1]="FUN_Rastrigin"; fname[2]="FUN_Weierstrass"; fname[3]="FUN_Weierstrass"; fname[4]="FUN_Griewank"; fname[5]="FUN_Griewank"; fname[6]="FUN_Ackley"; fname[7]="FUN_Ackley"; fname[8]="FUN_Sphere"; fname[9]="FUN_Sphere"; for(int i=0;i<m_numFuncs;i++) { fid[i]=Global::msm_pro[fname[i]]; } setFunction(fid,fname); mpp_f[0]->setSearchRange(-5,5); mpp_f[1]->setSearchRange(-5,5); mpp_f[2]->setSearchRange(-0.5,0.5); mpp_f[3]->setSearchRange(-0.5,0.5); mpp_f[4]->setSearchRange(-60,60); mpp_f[5]->setSearchRange(-60,60); mpp_f[6]->setSearchRange(-32,32); mpp_f[7]->setSearchRange(-32,32); mpp_f[8]->setSearchRange(-100,100); mpp_f[9]->setSearchRange(-100,100); mp_stretchSeverity[0]=1.; mp_stretchSeverity[1]=1.; mp_stretchSeverity[2]=10.; mp_stretchSeverity[3]=10.; mp_stretchSeverity[4]=5./60; mp_stretchSeverity[5]=5./60; mp_stretchSeverity[6]=5./32; mp_stretchSeverity[7]=5./32; mp_stretchSeverity[8]=5./100; mp_stretchSeverity[9]=5./100; for(int i=0;i<m_numFuncs;i++){ mpp_f[i]->setScale(mp_stretchSeverity[i]); } setBias(120.); }
void FSchwefel_1_2::initialize(){ setOriginalGlobalOpt(); if(IS_PROBLEM_NAME(m_id,"FUN_Schwefel_1_2")||IS_PROBLEM_NAME(m_id,"FUN_Schwefel_1_2_Noisy")){ }else if(IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel_1_2")||IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel_1_2_Noisy")){ loadTranslation(); }else if(IS_PROBLEM_NAME(m_id,"FUN_R_Schwefel_1_2")){ setConditionNumber(2); loadRotation(); }else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Schwefel_1_2")){ setConditionNumber(2); loadTranslation(); loadRotation(); }else if(IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel_1_2_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel_1_2_Noisy_CEC05")){ setBias(-450); loadTranslation(); }else{ throw myException("Error: please check the problem ID@FSchwefel_1_2::initialize"); } setGlobalOpt(); setAccuracy(1.0e-2); }
neuron::neuron(const vector<float>& WeightVector, const float& BiasNumber) //constructor 1 { setWeights(WeightVector); //gives provided parameters to the class setNumberOfInputs(Weights.size()); setBias(BiasNumber); }
void CTRNN::randomizeBiases(double lb, double ub) { for (int i = 0; i < size; i++) setBias(i, UniformRandom(lb, ub)); }
//---------------------------------------------------------------------------------------------------------------------- void CTRNN::setInputNeuron(int i) { setUpdateFunction(i, kUF_Input); setActivationFunction(i, kAF_Identity); setBias(i, 0.0); }