auc.algo
Class GeneticPlanner

java.lang.Object
  |
  +--auc.algo.GeneticPlanner
All Implemented Interfaces:
RouteAlgorithm

public class GeneticPlanner
extends java.lang.Object
implements RouteAlgorithm


Field Summary
protected  CostEvaluator costEval
           
 int EVOLUTION
           
protected  int evolutionChilds
           
protected  int evolutionsCount
           
 int GENERATION
           
protected  int generationChilds
           
protected  int generationsCount
           
protected  java.util.Vector genes
           
protected  Job job
           
protected  int maxCrossings
           
protected  int method
           
protected  int minCrossings
           
protected  java.util.Vector population
          Population of routes.
protected  int populationSize
           
 
Constructor Summary
GeneticPlanner()
           
 
Method Summary
protected  auc.algo.Pair choose()
          Chooses randomly the pair of individuals from a parent population and removes them from the parent population.
 void evolution()
           
 void generate()
           
protected  void initialize()
           
 Route planRoute(Job job)
          Searches for the optimal route and orders the points array to be in the optimal order.
protected  Route random()
           
protected  Route randomDynamic()
           
 void setCostEvaluator(CostEvaluator ce)
          The CostEvaluator set from outside is not used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

GeneticPlanner

public GeneticPlanner()
Method Detail

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.