2#include "FunctionMinEvalOp.h"
8extern void cec14_test_func(
double *,
double *,
int,
int,
int);
9double *OShift,*M,*y,*z,*x_bound;
10int ini_flag=0,n_flag,func_flag,*SS;
15 state->getRegistry()->registerEntry(
"cec.function", (voidP) (
new uint(1)), ECF::UINT,
16 "Sets the CEC test function number, 1-30 (default: 1)");
22 voidP sptr = state->getRegistry()->getEntry(
"cec.function");
26 if(iFunction_ < 1 || iFunction_ > 30) {
27 ECF_LOG_ERROR(state,
"CEC EvalOp: There are only 30 test functions in this test suite!");
32 std::string fileName(
"input_data/M_" + uint2str(
iFunction_) +
"_D2.txt");
33 ifstream m_file(fileName.c_str());
35 std::string msg(
"\nError: the CEC input data folder must be in path to run the experiments.\n");
36 msg +=
"DOWNLOAD the required data and place them in \"input_data\" folder from http://web.mysites.ntu.edu.sg/epnsugan/PublicSite/Shared%20Documents/CEC-2014/cec14-c-code.zip.\n";
37 msg +=
"Since the data size is 35MB, it is NOT included in the ECF package.";
38 ECF_LOG_ERROR(state, msg);
63 double realTemp = 0, value = 0;
70 fitness->setValue(value);
Fitness for minimization problems.
FloatingPoint class - implements genotype as a vector of floating point values.
FitnessP evaluate(IndividualP individual)
Evaluate a single individual. Method must create and return a Fitness object.
uint iFunction_
function index
void registerParameters(StateP)
Register evaluator parameters. Called before EvaluateOp::initialize method.
bool initialize(StateP)
Initialize the evaluator. Called before first evaluation occurs.
std::vector< double > realValue
vector of floating point values