2#include "FunctionMinEvalOp.h"
5#include "./bbob/bbobStructures.h"
7extern int enableOutput;
12 state->getRegistry()->registerEntry(
"coco.function", (voidP) (
new uint(1)), ECF::UINT,
13 "sets the COCO objective function (default: 1)");
14 state->getRegistry()->registerEntry(
"coco.instance", (voidP) (
new uint(1)), ECF::UINT,
15 "set instance no. for COCO function (default: 1)");
16 state->getRegistry()->registerEntry(
"coco.enableoutput", (voidP) (
new uint(0)), ECF::UINT,
17 "enable COCO folder output (default: 0/no)");
18 state->getRegistry()->registerEntry(
"coco.folder", (voidP) (
new std::string(
"")), ECF::STRING,
19 "sets the COCO output folder (default: none)");
20 state->getRegistry()->registerEntry(
"coco.algorithm", (voidP) (
new std::string(
"")), ECF::STRING,
21 "set algorithm name for post processing (default: none)");
22 state->getRegistry()->registerEntry(
"coco.comments", (voidP) (
new std::string(
"")), ECF::STRING,
23 "set algorithm description for post processing (default: none)");
37 voidP sptr = state->getRegistry()->getEntry(
"coco.function");
40 sptr = state->getRegistry()->getEntry(
"coco.instance");
44 if(state->getRegistry()->isModified(
"coco.folder")) {
45 sptr = state->getRegistry()->getEntry(
"coco.folder");
51 sptr = state->getRegistry()->getEntry(
"coco.enableoutput");
52 enableOutput = *((uint*) sptr.get());
59 sptr = state->getRegistry()->getEntry(
"FloatingPoint.dimension");
63 uint dim = *((uint*) sptr.get());
70 ParamStruct params = fgeneric_getDefaultPARAMS();
80 sptr = state->getRegistry()->getEntry(
"coco.algorithm");
85 sptr = state->getRegistry()->getEntry(
"coco.comments");
90 fgeneric_initialize(params);
125 value = fgeneric_evaluate(&(gen->
realValue[0]));
129 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.
std::string cocoAlgComments_
COCO algorithm description.
double coco_optimum_
COCO function optimal value.
uint cocoInstance_
COCO function instance.
std::string cocoAlgName_
COCO algorithm name.
bool experimentMode_
enable COCO experiment
uint iFunction_
function index
void registerParameters(StateP)
Register evaluator parameters. Called before EvaluateOp::initialize method.
std::string cocoFolder_
COCO output folder.
bool initialize(StateP)
Initialize the evaluator. Called before first evaluation occurs.
bool isCocoInitialized_
is COCO initialized
std::vector< double > realValue
vector of floating point values