auc.algo
Class InsertionPlanner
java.lang.Object
|
+--auc.algo.InsertionPlanner
- All Implemented Interfaces:
- RouteAlgorithm
- public class InsertionPlanner
- extends java.lang.Object
- implements RouteAlgorithm
DynamicPlanner algorithm. Description:
1) creates a short tour of two first points.
2) calculates the minimum cost of insertion of any point left:
a) calculates the minimal insertion cost of any posible position in tour
3) inserts the best point into the best position.
4) continues insertions from step 2 until all points are inserted.
Very bad property when exclusion zone blocks the way and the CostEvaluator cannot find a way around:
if the last point is blocked, it does not know where to include it!
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
costEval
protected CostEvaluator costEval
costMatrix
protected Segment[][] costMatrix
InsertionPlanner
public InsertionPlanner()
calcRoute
public Route calcRoute(java.util.Vector list,
CostEvaluator costEval,
Field field)
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.