ECF
1.5
D:
Projekt
ECF_trunk
examples
Knapsack
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
9
int
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
}
KnapsackEvalOp
Definition:
KnapsackEvalop.h:24
SolverEvolutionStrategy
Definition:
SolverEvolutionStrategy.h:8
SolverSHC
Definition:
SolverSHC.h:5
SolverTournamentEA
Definition:
SolverTournamentEA.h:5
State
State class - backbone of the framework.
Definition:
State.h:39
Generated on Wed Aug 3 2022 17:50:41 for ECF by
1.9.4