ECF 1.5
main.cpp
1#include<iostream>
2#include "ECF/ECF.h"
3#include "KnapsackEvalop.h"
4#include "../API/SolverSHC.h"
5#include "../API/SolverTournamentEA.h"
6#include "../API/SolverEvolutionStrategy.h"
7
8
9int main(int argc, char** argv)
10{
11 StateP state (new State);
12
13 // add dynamic components
14 state->addAlgorithm((AlgorithmP) new SolverSHC);
15 state->addAlgorithm((AlgorithmP) new SolverTournamentEA);
16 state->addAlgorithm((AlgorithmP) new SolverEvolutionStrategy);
17
18 // set problem (evaluator)
19 state->setEvalOp(new KnapsackEvalOp());
20
21 state->initialize(argc, argv);
22 state->run();
23
24 return 0;
25}
State class - backbone of the framework.
Definition: State.h:39