org.dbe.eve.ga
Interface GeneticAlgorithm

All Known Implementing Classes:
DefaultGeneticAlgorithmImpl

public interface GeneticAlgorithm

This is the GenericAlgoritm interface. All Genetic Algorithms must implement this interface. The constructor doesn't matter, because it is created by an interface, usually also provided by the programer of the algorithm. Take into account that the Habitat service deployed in the servent will only call this two methods: start will be called possibly only once, to store the fitnessFunction and the stop condition into member varialbles getSolutions will be called more often, each time somebody wants to know the current solution set. Notice that this can be implemented as a thread that executes the FitnessFunction.evaluate () methods in background. While executing, clients can access at the Best solution stored at the moment, but possibly not the best one.

Author:
bob

Method Summary
 SolutionSet getSolutions()
          Return the solutions stored at the moment.
 void start(FitnessFunction function, StopCondition condition, ServicePool pool)
          Start the Genetic Algorithm using the indicated Fitness function.
 

Method Detail

start

void start(FitnessFunction function,
           StopCondition condition,
           ServicePool pool)
Start the Genetic Algorithm using the indicated Fitness function. The evalutation will finish when one of the StopCondicion will be acomplished. TODO: At the moment is not necessary, but in the future this "start" method must start or restart the evaluation of a new Thread, so the evaluation can run in background

Parameters:
function - fitnessFuncion
condition - stop condition
pool - ServicePool to be used for this GA run

getSolutions

SolutionSet getSolutions()
Return the solutions stored at the moment. Notice that the GeneticAlgorithm can be still running an probably best solutions can be found later

Returns:
the solution set