art.ga
Class GaManager

java.lang.Object
  extended byart.ga.GaManager
Direct Known Subclasses:
CsManager

public class GaManager
extends java.lang.Object

This is the only class that have to by accessed directly by the user in order to easily manage ART as a black box; it hides the internal structure of the genetic algorithm.

Author:
Marco Lamieri and Gianluigi Ferraris
See Also:
GaSolution, Fitness

Constructor Summary
GaManager(java.lang.String ConfigurationFileName, java.lang.String project)
          Constructor of the class
 
Method Summary
 GaSolution computeBestSolution(Fitness aFitnessFunction)
           
 int getGenerationNumber()
          Get the generation currently computed by the ga.
 GaSolution getNextSolution()
          Get the next GaSolution generated by the genetic algorithm.
 void setFitness(GaSolution gaStrategy, double fitness)
          Set the fitness (reward) for a given GaSolution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaManager

public GaManager(java.lang.String ConfigurationFileName,
                 java.lang.String project)
Constructor of the class

Parameters:
ConfigurationFileName - Parameter's file
project - Parameter's project
Method Detail

computeBestSolution

public GaSolution computeBestSolution(Fitness aFitnessFunction)

getGenerationNumber

public int getGenerationNumber()
Get the generation currently computed by the ga.

Returns:
Current generation number

getNextSolution

public GaSolution getNextSolution()
Get the next GaSolution generated by the genetic algorithm. This method is used in combination with setFitness(GaSolution, double) in AB simulations or in dynamic problems evolving over time for which is not possible define a fitness function implementing the Fitness interface.

Returns:
A solution that have to be evaluated

setFitness

public void setFitness(GaSolution gaStrategy,
                       double fitness)
Set the fitness (reward) for a given GaSolution. This method is used in combination with getNextSolution() in AB simulations or in dynamic problems evolving over time for wich is not possible define a fitness function implementing the Fitness interface.

Parameters:
gaStrategy - Startegy evaluated
fitness - Reward of the startegy