GeneticAlgorithm  0.5 (beta)
A python framework for rapid GA prototyping
GeneticAlgorithm.LoggingOperators.BestLogger Class Reference

This class stores the best individual of the population, if it is better than the last individual found. More...

+ Inheritance diagram for GeneticAlgorithm.LoggingOperators.BestLogger:
+ Collaboration diagram for GeneticAlgorithm.LoggingOperators.BestLogger:

List of all members.

Public Member Functions

def __init__
 Base periodic logger constructor.
def logCallback
 Add a new individual to the log if it is different to the best logged so far.
def addToLog
def getBest
 Get the best individual out of the list containing the population and the best individual found so far.
def finalize
 This function is called once at the end of the algorithm run.

Public Attributes

 bestLog
 numEvaluations
 criterion
 maximize
 iterationFrequency

Static Public Attributes

 iterationCallback = logCallback
 evaluationCallback = logCallback

Detailed Description

This class stores the best individual of the population, if it is better than the last individual found.

Definition at line 6 of file LoggingOperators.py.


Constructor & Destructor Documentation

Base periodic logger constructor.

Parameters:
iterationCounterAn initial value for the iteration counter
evaluationCounterAn initial value for the individual evaluation counter
iterationFrequencyThis parameter controls how many iterations have to pass between iterationCallback calls
evaluationFrequencyThis parameter controls how many individuals are evaluated between evaluationCallback calls

Reimplemented from GeneticAlgorithm.Core.BasePeriodicOperator.

Definition at line 7 of file LoggingOperators.py.


Member Function Documentation

Definition at line 29 of file LoggingOperators.py.

References GeneticAlgorithm.Core.BasePeriodicOperator.evaluationCounter.

Referenced by GeneticAlgorithm.LoggingOperators.BestLogger.logCallback().

+ Here is the caller graph for this function:

This function is called once at the end of the algorithm run.

Parameters:
populationThe population object to operate upon

Reimplemented from GeneticAlgorithm.Core.GeneticOperator.

Reimplemented in GeneticAlgorithm.PlottingOperators.PlotBestLogger.

Definition at line 58 of file LoggingOperators.py.

References GeneticAlgorithm.LoggingOperators.BestLogger.bestLog, and GeneticAlgorithm.LoggingOperators.BestLogger.numEvaluations.

Get the best individual out of the list containing the population and the best individual found so far.

Definition at line 35 of file LoggingOperators.py.

References GeneticAlgorithm.LoggingOperators.BestLogger.bestLog, GeneticAlgorithm.LoggingOperators.BestLogger.criterion, GeneticAlgorithm.LoggingOperators.BestLogger.maximize, and GeneticAlgorithm.GraphLibrary.BestPathPlotLogger.maximize.

Referenced by GeneticAlgorithm.LoggingOperators.BestLogger.logCallback().

+ Here is the caller graph for this function:

Add a new individual to the log if it is different to the best logged so far.

Definition at line 17 of file LoggingOperators.py.

References GeneticAlgorithm.LoggingOperators.BestLogger.addToLog(), and GeneticAlgorithm.LoggingOperators.BestLogger.getBest().

Referenced by GeneticAlgorithm.PlottingOperators.PlotBestLogger.plotCallback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables