Evaluation Process Interface. More...

Public Member Functions | |
| Evaluation () | |
| Default Constructor. | |
| virtual | ~Evaluation () |
| Destructor. | |
| virtual Evaluation * | clone () const =0 |
| Create an exact copy of Evaluation. | |
| void | evaluate () |
| It evaluate the Genotype in a single-shot calling as many times as necessary evaluateStep. | |
| void | evaluateStep () |
| Execute a single minor step and return. | |
| void | finalize () |
| Finalize the Evaluation Process. | |
| GeneticAlgo * | GA () |
| Return the GeneticAlgo used. | |
| const GeneticAlgo * | GA () const |
| Return the GeneticAlgo used (const version) | |
| Genome * | genome () |
| Return the Genome. | |
| Genotype * | genotype () |
| return the Genotype to Evaluate | |
| unsigned int | genotypeID () |
| Return the index of the Genotype into the Genome. | |
| void | initialize (Genotype *genotypeToEvaluate) |
| Initialize the Evaluation Process. | |
| bool | isEvaluationDone () |
| return true if the Evaluation Process has finish | |
| void | setGA (GeneticAlgo *g) |
| Set the GeneticAlgo used. | |
| void | setGenome (Genome *g) |
| Set the Genome where Genotypes lives. | |
Public Member Functions inherited from ParameterSettableWithConfigureFunction | |
| void | addObserver (RuntimeParameterObserver *obs) |
| virtual void | configure (ConfigurationParameters ¶ms, QString prefix)=0 |
| T | getRuntimeParameter (QString paramName) |
| virtual ParameterSettableUI * | getUIManager () |
| ParameterSettable () | |
| virtual void | postConfigureInitialization () |
| void | removeObserver (RuntimeParameterObserver *obs) |
| virtual void | save (ConfigurationParameters ¶ms, QString prefix)=0 |
| void | setRuntimeParameter (QString paramName, T newvalue) |
| QString | typeName () const |
Public Member Functions inherited from ParameterSettable | |
| void | addObserver (RuntimeParameterObserver *obs) |
| T | getRuntimeParameter (QString paramName) |
| void | removeObserver (RuntimeParameterObserver *obs) |
| void | setRuntimeParameter (QString paramName, T newvalue) |
| QString | typeName () const |
Protected Member Functions | |
| void | evaluationDone () |
| Called by developers for signaling the end of Evaluation Process. | |
| virtual void | fini ()=0 |
| Re-implemented by Users for fit to own experiments. | |
| virtual void | init ()=0 |
| Re-implemented by Users for fit to own experiments. | |
| virtual void | step ()=0 |
| Re-implemented by Users for fit to own experiments. | |
Protected Member Functions inherited from ParameterSettableWithConfigureFunction | |
| void | notifyChangesToParam (QString paramName) |
Protected Member Functions inherited from ParameterSettable | |
| void | notifyChangesToParam (QString paramName) |
Additional Inherited Members | |
Public Types inherited from ParameterSettableWithConfigureFunction | |
| enum | Property |
Static Public Member Functions inherited from ParameterSettableWithConfigureFunction | |
| static void | describe (QString type) |
| static QString | fullParameterDescriptionPath (QString type, QString param) |
| static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Public Attributes inherited from ParameterSettableWithConfigureFunction | |
| AllowMultiple | |
| Default | |
| IsList | |
| IsMandatory | |
Static Public Attributes inherited from ParameterSettableWithConfigureFunction | |
| static const double | Infinity |
| static const int | MaxInteger |
| static const int | MinInteger |
Static Protected Member Functions inherited from ParameterSettableWithConfigureFunction | |
| static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
Detailed Description
Evaluation Process Interface.
- Description
- Interface of the Evaluation Process Evalution Process consist of one or more steps for calculating the fitness of Genotype The Evaluation Process follow this schema:
- set the Genotype which do you want calculate the fitness with setGenotype
- call initialize (optional it will automatically at first step calls)
- while( ! isEvaluationDone() ) call evaluateStep()
- call finalize (optional it will automatically called when finish the evaluation
- query the fitness with Genotype::fitness() method
- Warnings
Definition at line 47 of file evaluation.h.
Constructor & Destructor Documentation
| Evaluation | ( | ) |
Default Constructor.
Definition at line 25 of file evaluation.cpp.
|
virtual |
Destructor.
Definition at line 35 of file evaluation.cpp.
Member Function Documentation
|
pure virtual |
Create an exact copy of Evaluation.
Implemented in MultiTrials.
| void evaluate | ( | ) |
It evaluate the Genotype in a single-shot calling as many times as necessary evaluateStep.
- Warning
- this is a blocking method
Definition at line 63 of file evaluation.cpp.
References Evaluation::evaluateStep(), and Evaluation::isEvaluationDone().
| void evaluateStep | ( | ) |
Execute a single minor step and return.
- Warning
- if you forget to initialize the Evaluation, this method will return a Fatal error blocking the execution of the application
Definition at line 55 of file evaluation.cpp.
References Evaluation::step().
Referenced by Evaluation::evaluate(), and StefanoSteadyStateGA::gaStep().
|
protected |
Called by developers for signaling the end of Evaluation Process.
- Warning
- this does not automatically calls finalize()
Definition at line 83 of file evaluation.cpp.
| void finalize | ( | ) |
Finalize the Evaluation Process.
Definition at line 69 of file evaluation.cpp.
References Evaluation::fini().
Referenced by StefanoSteadyStateGA::gaStep().
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::finalize().
|
inline |
Return the GeneticAlgo used.
Definition at line 91 of file evaluation.h.
|
inline |
Return the GeneticAlgo used (const version)
Definition at line 95 of file evaluation.h.
|
inline |
Return the Genome.
Definition at line 83 of file evaluation.h.
Referenced by Evaluation::initialize().
|
inline |
return the Genotype to Evaluate
Definition at line 71 of file evaluation.h.
Referenced by StefanoSteadyStateGA::gaStep().
|
inline |
Return the index of the Genotype into the Genome.
Definition at line 75 of file evaluation.h.
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::initialize().
| void initialize | ( | Genotype * | genotypeToEvaluate | ) |
Initialize the Evaluation Process.
- Parameters
-
genotypeToEvaluate is the Genotype to evaluate
Definition at line 39 of file evaluation.cpp.
References Genome::find(), Evaluation::genome(), and Evaluation::init().
Referenced by StefanoSteadyStateGA::gaStep().
| bool isEvaluationDone | ( | ) |
return true if the Evaluation Process has finish
Definition at line 79 of file evaluation.cpp.
Referenced by Evaluation::evaluate(), and StefanoSteadyStateGA::gaStep().
|
inline |
Set the GeneticAlgo used.
Definition at line 87 of file evaluation.h.
Referenced by StefanoSteadyStateGA::setEvaluation(), SimpleGA::setEvaluation(), NSGA2::setEvaluation(), ParallelGA::setEvaluation(), and LaralGA::setFitnessFunction().
|
inline |
Set the Genome where Genotypes lives.
Definition at line 79 of file evaluation.h.
Referenced by StefanoSteadyStateGA::configure(), NSGA2::configure(), SimpleGA::configure(), ParallelGA::configure(), LaralGA::configure(), SimpleGA::gaStep(), NSGA2::gaStep(), ParallelGA::gaStep(), and StefanoSteadyStateGA::initialize().
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::evaluateStep().
The documentation for this class was generated from the following files:
- ga/include/core/evaluation.h
- ga/src/core/evaluation.cpp
Public Member Functions inherited from