mil.af.afit.uvr
Class EvaluatorWithPriorities

java.lang.Object
  |
  +--mil.af.afit.uvr.EvaluatorWithPriorities
All Implemented Interfaces:
HEvaluator

public class EvaluatorWithPriorities
extends java.lang.Object
implements HEvaluator

This sample HEvaluator minimizes the following:

      1) Number of vehicles that exceed their range
      2) Number of busted time windows
      3) Number of skipped orders of priority 'i'
      ... skipped orders of each priority level...
      k) Vehicles used
      k+1) Travel time plus penalties
      k+2) Wait time
 

Note that the penalties should be on the same scale as the time units. This is the default evaluator.

Since:
1.0
See Also:
HEvaluator

Constructor Summary
EvaluatorWithPriorities(HOrder[] orders)
          Constructs an HEvaluator that considers the priorities indicated in orders
 
Method Summary
 double[] getCostsForSolution(HSolution soln)
          Returns an array representing the costs of the solution.
 java.lang.String[] getNamesForCosts(HSolution soln)
          Returns names for each index in the costs array.
 java.lang.String toString()
          Returns a string representation of the evaluator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EvaluatorWithPriorities

public EvaluatorWithPriorities(HOrder[] orders)
Constructs an HEvaluator that considers the priorities indicated in orders
Parameters:
orders - HOrders that have priorities
Since:
1.0
See Also:
HOrder
Method Detail

getNamesForCosts

public final java.lang.String[] getNamesForCosts(HSolution soln)
Returns names for each index in the costs array.
Specified by:
getNamesForCosts in interface HEvaluator
Parameters:
soln - the solution in question, if known. It may be null.
Since:
1.0
See Also:
HSolution

getCostsForSolution

public final double[] getCostsForSolution(HSolution soln)
Returns an array representing the costs of the solution.
Specified by:
getCostsForSolution in interface HEvaluator
Parameters:
soln - The solution to evaluate
Returns:
costs for the solution
Since:
1.0
See Also:
HSolution

toString

public java.lang.String toString()
Returns a string representation of the evaluator.
Overrides:
toString in class java.lang.Object
Returns:
string representing the evaluator
Since:
1.0