auc.algo
Class GridPlanner

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

public class GridPlanner
extends java.lang.Object
implements RouteAlgorithm

Route algorithm for grid layout.


Field Summary
protected  CostEvaluator evaluator
          Default CostEvaluator is a GridEvaluator.
protected  Vector2D[][] M
           
protected  Vector2D[] R
           
protected  int visitPointNumber
           
 
Constructor Summary
GridPlanner()
           
 
Method Summary
 Route planRoute(Job job)
          Searches for the optimal route and orders the points array to be in the optimal order.
 void setCostEvaluator(CostEvaluator ce)
          Sets the cost evaluator object to evaluate the basic route cost travelling between two points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluator

protected CostEvaluator evaluator
Default CostEvaluator is a GridEvaluator.

visitPointNumber

protected int visitPointNumber

M

protected Vector2D[][] M

R

protected Vector2D[] R
Constructor Detail

GridPlanner

public GridPlanner()
Method Detail

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:
field - The field structure.
points - The array of points to be visited.
Returns:
The optimal route through all of the points.

setCostEvaluator

public void setCostEvaluator(CostEvaluator ce)
Sets the cost evaluator object to evaluate the basic route cost travelling between two points.
Specified by:
setCostEvaluator in interface RouteAlgorithm
Parameters:
ce - The cost evaluator. If not set the distance is assumed to be the cost.