28#include "./bbob/bbobStructures.h"
30#include "FunctionMinEvalOp.h"
32extern int enableOutput;
35int main(
int argc,
char **argv)
37 unsigned int instances[15] = {1, 2, 3, 4, 5, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
38 unsigned int ifun, idx_instances;
39 int independent_restarts;
40 double maxfunevals, minfunevals;
51 for (ifun = 1; ifun <= 24; ifun++)
54 for (idx_instances = 0; idx_instances < 15; idx_instances++)
57 StateP state (
new State);
60 state->setEvalOp(evalOp);
64 state->initialize(argc, argv);
70 state->getRegistry()->modifyEntry(
"coco.function", (voidP) (
new uint(ifun)));
71 state->getRegistry()->modifyEntry(
"coco.enableoutput", (voidP) (
new uint(1)));
74 state->getRegistry()->modifyEntry(
"coco.instance", (voidP) (
new uint(instances[idx_instances])));
77 state->getEvalOp()->initialize(state);
83 independent_restarts = -1;
84 while (fgeneric_evaluations() + minfunevals <= maxfunevals)
86 if (++independent_restarts > 0)
87 fgeneric_restart(
"independent restart");
92 if (fgeneric_best() < fgeneric_ftarget())
96 printf(
" f%d in %d-D, instance %d: FEs=%.0f with %d restarts,", ifun, 10,
97 instances[idx_instances], fgeneric_evaluations(), independent_restarts);
98 printf(
" fbest-ftarget=%.4e, elapsed time [h]: %.2f\n",
99 fgeneric_best() - fgeneric_ftarget(), (
double)(clock()-t0)/CLOCKS_PER_SEC/60./60.);
104 printf(
" date and time: %s", ctime(&Tval));
Function minimization evaluation class.
bool experimentMode_
enable COCO experiment
State class - backbone of the framework.