Evaluation Process Interface. More...

Inheritance diagram for Evaluation:

Public Member Functions

 Evaluation ()
 Default Constructor.
 
virtual ~Evaluation ()
 Destructor.
 
virtual Evaluationclone () const =0
 Create an exact copy of Evaluation.
 
virtual void endGeneration (int generation)
 Called at the end of each generation.
 
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.
 
GeneticAlgoGA ()
 Return the GeneticAlgo used.
 
const GeneticAlgoGA () const
 Return the GeneticAlgo used (const version)
 
Genomegenome ()
 Return the Genome.
 
Genotypegenotype ()
 return the Genotype to Evaluate
 
unsigned int genotypeID ()
 Return the index of the Genotype into the Genome.
 
virtual void initGeneration (int generation)
 Called at the beginning of each generation.
 
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 &params, QString prefix)=0
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 ParameterSettable ()
 
virtual void postConfigureInitialization ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
virtual void save (ConfigurationParameters &params, QString prefix)=0
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
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(""))
 
static void setGraphicalEditor (QString type)
 

Detailed Description

Evaluation Process Interface.

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

Definition at line 45 of file evaluation.h.

Constructor & Destructor Documentation

Default Constructor.

Definition at line 25 of file evaluation.cpp.

~Evaluation ( )
virtual

Destructor.

Definition at line 35 of file evaluation.cpp.

Member Function Documentation

virtual Evaluation* clone ( ) const
pure virtual

Create an exact copy of Evaluation.

Implemented in MultiTrials.

virtual void endGeneration ( int  generation)
inlinevirtual

Called at the end of each generation.

The default implementation is empty

Definition at line 73 of file evaluation.h.

Referenced by StefanoSteadyStateGA::gaStep().

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().

void evaluationDone ( )
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().

virtual void fini ( )
protectedpure virtual

Re-implemented by Users for fit to own experiments.

Referenced by Evaluation::finalize().

GeneticAlgo* GA ( )
inline

Return the GeneticAlgo used.

Definition at line 99 of file evaluation.h.

const GeneticAlgo* GA ( ) const
inline

Return the GeneticAlgo used (const version)

Definition at line 103 of file evaluation.h.

Genome* genome ( )
inline

Return the Genome.

Definition at line 91 of file evaluation.h.

Referenced by Evaluation::initialize().

Genotype* genotype ( )
inline

return the Genotype to Evaluate

Definition at line 79 of file evaluation.h.

Referenced by StefanoSteadyStateGA::gaStep().

unsigned int genotypeID ( )
inline

Return the index of the Genotype into the Genome.

Definition at line 83 of file evaluation.h.

virtual void init ( )
protectedpure virtual

Re-implemented by Users for fit to own experiments.

Referenced by Evaluation::initialize().

virtual void initGeneration ( int  generation)
inlinevirtual

Called at the beginning of each generation.

The default implementation is empty

Definition at line 68 of file evaluation.h.

Referenced by StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().

void initialize ( Genotype genotypeToEvaluate)

Initialize the Evaluation Process.

Parameters
genotypeToEvaluateis 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().

virtual void step ( )
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: