コード例 #1
0
ファイル: FWeierstrass.cpp プロジェクト: benmyb/OFEC_v0.4.2
void FWeierstrass::initialize(){

    setOriginalGlobalOpt();

	if(IS_PROBLEM_NAME(m_id,"FUN_Weierstrass")){
	
	}else if(IS_PROBLEM_NAME(m_id,"FUN_R_Weierstrass")){
		setConditionNumber(2);
            loadRotation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Weierstrass")){
		setConditionNumber(5);
            loadTranslation();
            loadRotation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Weierstrass_CEC05")){
		setConditionNumber(5);
            loadTranslation();
            loadRotation();
             setBias(90);
	}else {
		throw myException("Error: please check the problem ID@FWeierstrass::initialize");
	}

    setGlobalOpt();
    setAccuracy(1.0e-2);

}
コード例 #2
0
ファイル: FAckley.cpp プロジェクト: Changhe160/OFEC
void FAckley::initialize(){

    setOriginalGlobalOpt();

	if(IS_PROBLEM_NAME(m_id,"FUN_Ackley")||IS_PROBLEM_NAME(m_id,"FUN_Ackley_Noisy")){	}
	else if(IS_PROBLEM_NAME(m_id,"FUN_S_Ackley")){
		loadTranslation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_R_Ackley")){
		 setConditionNumber(2);
         loadRotation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Ackley")){
		setConditionNumber(100);
        loadTranslation();
        loadRotation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Ackley_Bound_CEC05")){
		setConditionNumber(100);
        loadTranslation();
        loadRotation();
        setBias(-140);

	}else if(IS_PROBLEM_NAME(m_id,"FUN_S_Ackley_CEC08")){
		setBias(-140);
            loadTranslation();
	}else{
		throw myException("Error: please check the problem ID@FAckley::initialize()");
	}

    setGlobalOpt();
}
コード例 #3
0
ファイル: FSchwefel_2_22.cpp プロジェクト: Changhe160/OFEC
void FSchwefel_2_22::initialize() {

    setOriginalGlobalOpt();

    if(IS_PROBLEM_NAME(m_id,"FUN_Schwefel_2_22")||IS_PROBLEM_NAME(m_id,"FUN_Schwefel_2_22_Noisy")) {

    } else if(IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel_2_22")) {
        loadTranslation();

    } else if(IS_PROBLEM_NAME(m_id,"FUN_R_Schwefel_2_22")) {
        setConditionNumber(2);
        loadRotation();
    } else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Schwefel_2_22")) {
        setConditionNumber(2);
        loadTranslation();
        loadRotation();
    } else {
        throw myException("Error: please check the problem ID@FSchwefel_2_22::initialize");
    }
    setGlobalOpt();

}
コード例 #4
0
ファイル: FSchwefel.cpp プロジェクト: dcshen/OFEC
void FSchwefel::initialize()
{
	vector<double> v(m_numDim,420.9687);
    setOriginalGlobalOpt(0,&v);

	if(IS_PROBLEM_NAME(m_id,"FUN_Schwefel")||IS_PROBLEM_NAME(m_id,"FUN_Schwefel_Noisy")){
	}else if(IS_PROBLEM_NAME(m_id,"FUN_S_Schwefel")){
		loadTranslation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_R_Schwefel")){
		setConditionNumber(2);
        loadRotation();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RS_Schwefel")){
		 setConditionNumber(2);
        loadTranslation();
        loadRotation();
	}else{
		throw myException("Error: please check the problem ID@FSchwefel::initialize");
	}
	
    setGlobalOpt(0,&v);
    setAccuracy(1.0e-2);

}
コード例 #5
0
ファイル: FHybridComp.cpp プロジェクト: dcshen/OFEC
void HybridComp::initialize(){

	 m_originalGlobalOpt.flagGloObj()=false;
	 m_originalGlobalOpt.flagLoc()=false;

	if(IS_PROBLEM_NAME(m_id,"FUN_Com")||IS_PROBLEM_NAME(m_id,"FUN_R_Com")){
		setUpFCom();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_Com_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_H_Com_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_H_Com_Noisy_CEC05")){
		SetUpFCom_CEC05();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RH_Com_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_RH_Com_NarrowBasin_CEC05")||\
		IS_PROBLEM_NAME(m_id,"FUN_RH_Com_Bound_CEC05")){
		SetUpFRH_Com_CEC05();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RH_Com_F21_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_RH_Com_HighConNumMatrix_F22_CEC05")||\
		IS_PROBLEM_NAME(m_id,"FUN_Noncont_RH_Com_F23_CEC05")){
		SetUpFRH001_Com_CEC05();
	}else if(IS_PROBLEM_NAME(m_id,"FUN_RH_Com_F24_CEC05")||IS_PROBLEM_NAME(m_id,"FUN_RH_Com_noBounds_F25_CEC05")){
		 SetUpFRH002_Com_CEC05();
	}else {
		 throw myException("Error: please check the problem ID@HybridComp::initialize");
	}

    loadTranslation();
    loadRotation();

	CodeVReal x(m_numDim,m_numObj);
    for(int i=0;i<m_numFuncs;i++){
        for(int j=0;j<m_numDim;j++){ // calculate the estimate max value of funciton i
            x[j]=m_searchRange[j].m_upper;
            x[j]/=mp_stretchSeverity[i];
        }		
		mpp_f[i]->BenchmarkFunction::evaluate_(x,false);
		mp_fmax[i]=x.m_obj[0];
     }
    
	vector<double> v(m_numDim,0);
	m_globalOpt.setNumOpts(1);
    setGlobalOpt(0,&v,mpp_f[0]->getTranslation());
    setAccuracy(1.0e-3);
	setDisAccuracy(0.1);
}