#include <EGTControl.h>
Collaboration diagram for EGTControl< TP >:
Public Types | |
typedef TP | Pop |
typedef Pop::Graph | Graph |
typedef EGTVector< const Graph * > | Graphs |
typedef Graph::SubGraph | SubGraph |
typedef Graph::Node | Node |
typedef Graph::Fitness | Fitness |
Public Methods | |
EGTControl () | |
Constructor. | |
virtual | ~EGTControl () |
Destructor. | |
virtual void | InitControl () |
Initialization. | |
virtual void | LoadControl () |
Initializes a Population by loading the data. | |
virtual void | SaveControl () const |
Records the data for resumption. | |
virtual void | LoadTarget (const char *filename)=0 |
virtual void | SetEvaluation (EGTEvaluation< TP > *=0)=0 |
Sets the evaluation algorithm. | |
virtual void | SetSelection (EGTSelection< TP > *=0) |
Sets the selection algorithm. | |
virtual void | SetSelection2 (EGTSelection< TP > *=0) |
Sets the selection algorithm. | |
virtual void | SetMutation (EGTMutation< TP > *=0) |
Sets the mutation algorithm. | |
virtual void | SetCrossover (EGTCrossover< TP > *=0) |
Sets the crossover algorithm. | |
virtual void | Execute (std::ostream &) |
Performs the overall procedure of EGG. | |
Protected Types | |
enum | MeasureOp { START, STOP, LAP } |
Operation ID number for time measurement. More... | |
Protected Methods | |
virtual void | NextGeneration () |
Evolves the Population by one generation. | |
void | SaveLogFiles (UInt, MeasureOp) |
Saves log files. | |
void | SaveTimeLog (UInt, MeasureOp) |
Records the execution time of each generation. | |
void | SaveFitnessLog (UInt) const |
Records the fitness values of each generation. | |
void | SavePopLog (UInt) const |
Records the Population data in ????th generation. | |
virtual void | SaveBestLog (UInt) const |
Records the best Graph data in ????th generation. | |
virtual void | SaveBestDot (UInt) const |
Records the best Graph data in ????th generation (in DOT file format). | |
virtual void | SaveGeneration (UInt) const |
Records all the Graph data of current population. | |
Protected Attributes | |
Pop * | m_tPop |
Population. | |
EGTEvaluation< TP > * | m_tEvaluation |
Evaluation. | |
EGTSelection< TP > * | m_tSelection |
Selection. | |
EGTSelection< TP > * | m_tSelection2 |
Selection. | |
EGTMutation< TP > * | m_tMutation |
Mutation. | |
EGTCrossover< TP > * | m_tCrossover |
Crossover. | |
EGMeasure | m_tMeasure |
Measure. | |
Node | m_Creator |
Node for creating new Nodes. | |
bool | m_bEvolved |
Flag indicating whether the best Graph is updated. |
It is assumed that <TP> is a subclass of EGTPopulation.
|
|
|
|
|
|
|
|
|
|
|
|
|
Operation ID number for time measurement.
|
|
Constructor.
|
|
Destructor.
|
|
Performs the overall procedure of EGG.
|
|
Initialization.
|
|
Initializes a Population by loading the data.
|
|
|
|
Evolves the Population by one generation. This function executes some evolutionary operations in the following order.
|
|
Records the best Graph data in ????th generation (in DOT file format).
File name: best????.dot (???? is the number of generations.) |
|
Records the best Graph data in ????th generation. File name: best????.log (???? is the number of generations.) |
|
Records the data for resumption.
|
|
Records the fitness values of each generation. File name: fitness.log |
|
Records all the Graph data of current population. File name: ??/??-xx.dot, ??/??-xx.log (??: The number of generations, xx: Graph ID)
|
|
Saves log files.
time.log: the execution time of each generation |
|
Records the Population data in ????th generation. File name: pop????.log (???? is the number of generations.) |
|
Records the execution time of each generation. File name: time.log |
|
Sets the crossover algorithm.
|
|
Sets the evaluation algorithm.
|
|
Sets the mutation algorithm.
|
|
Sets the selection algorithm. Sets the selection algorithm for selecting Graphs to be manipulated by evolutionary operations.
|
|
Sets the selection algorithm. Sets the selection algorithm for selecting Graphs to be in the next generation.
|
|
Flag indicating whether the best Graph is updated.
|
|
Node for creating new Nodes.
|
|
Crossover.
|
|
Evaluation.
|
|
Measure.
|
|
Mutation.
|
|
Population.
|
|
Selection.
|
|
Selection.
|