es.udc.gii.common.eaf.log.parallel
Class BestIndividualLogTool

java.lang.Object
  extended by es.udc.gii.common.eaf.log.LogTool
      extended by es.udc.gii.common.eaf.log.parallel.ParallelLogTool
          extended by es.udc.gii.common.eaf.log.parallel.BestIndividualLogTool
All Implemented Interfaces:
Configurable, java.util.Observer

public class BestIndividualLogTool
extends ParallelLogTool

A parallel log tool for logging the best individuals of a population.

Configuration:

 <Number>...</Number>
 
The Number parameter states how many individuals are logged. So if it were 3, the 3 best individuals would be logged.

The output reads as follows:

 [ GENERATION ... ]
 Best individual(s) (...)
 ...
 
The "..." are replaced by the number of generations so far, the number of individuals logged and those best individuals repectively.

In an island model this log tool logs each population of each island in an independent file. For a distributed evaluation model, only a file is needed.

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Field Summary
private  int number
           
 
Fields inherited from class es.udc.gii.common.eaf.log.parallel.ParallelLogTool
t0
 
Fields inherited from class es.udc.gii.common.eaf.log.LogTool
fileExtension, name, oldFolder, oldName
 
Constructor Summary
BestIndividualLogTool()
          Creates a new instance of BestIndividualLogTool
BestIndividualLogTool(int number)
          Creates a new instance of BestIndividualLogTool
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
 java.lang.String getLogID()
           
 int getNumber()
           
 void setNumber(int number)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class es.udc.gii.common.eaf.log.parallel.ParallelLogTool
getNodeID
 
Methods inherited from class es.udc.gii.common.eaf.log.LogTool
finalize, getLog, setFile
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

number

private int number
Constructor Detail

BestIndividualLogTool

public BestIndividualLogTool()
Creates a new instance of BestIndividualLogTool


BestIndividualLogTool

public BestIndividualLogTool(int number)
Creates a new instance of BestIndividualLogTool

Parameters:
number - The number of individuals to show.
Method Detail

getLogID

public java.lang.String getLogID()
Overrides:
getLogID in class LogTool

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Overrides:
update in class LogTool

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Specified by:
configure in interface Configurable
Overrides:
configure in class LogTool
Parameters:
conf - a Configuration object.
See Also:
Configuration

getNumber

public int getNumber()

setNumber

public void setNumber(int number)