auc.algo
Class GeneticPlanner
java.lang.Object
|
+--auc.algo.GeneticPlanner
- All Implemented Interfaces:
- RouteAlgorithm
- public class GeneticPlanner
- extends java.lang.Object
- implements RouteAlgorithm
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EVOLUTION
public final int EVOLUTION
GENERATION
public final int GENERATION
method
protected int method
costEval
protected CostEvaluator costEval
job
protected Job job
populationSize
protected int populationSize
minCrossings
protected int minCrossings
maxCrossings
protected int maxCrossings
evolutionsCount
protected int evolutionsCount
evolutionChilds
protected int evolutionChilds
generationsCount
protected int generationsCount
generationChilds
protected int generationChilds
population
protected java.util.Vector population
- Population of routes. List of Route
genes
protected java.util.Vector genes
GeneticPlanner
public GeneticPlanner()
choose
protected auc.algo.Pair choose()
- Chooses randomly the pair of individuals from a parent population and removes them from the parent population.
randomDynamic
protected Route randomDynamic()
random
protected Route random()
initialize
protected void initialize()
generate
public void generate()
evolution
public void evolution()
planRoute
public Route planRoute(Job job)
- Searches for the optimal route and orders the points array to be in the optimal order.
The 0-th element in the array is assumed to be starting point.
No assumptions are made for ending point.
- Specified by:
planRoute in interface RouteAlgorithm
- Parameters:
job - The job structure, which contains field, observation points....
setCostEvaluator
public void setCostEvaluator(CostEvaluator ce)
- The CostEvaluator set from outside is not used.
The GridEvaluator is created in every new calculation since GridEvaluator is bounded to particular grid of observation points.
- Specified by:
setCostEvaluator in interface RouteAlgorithm
- Parameters:
ce - The cost evaluator. If not set the default cost evaluator should be used.