mil.af.afit.uvr
Interface HVehicle

All Superinterfaces:
java.lang.Cloneable

public interface HVehicle
extends java.lang.Cloneable

This is the interface that sets up the information that gets passed to and from the vehicle and the Universal Vehicle Router.

Since:
1.0
See Also:
HOrder

Method Summary
 void addProductForOrderType(int amount, HOrder order)
          Put product back for the specified order type.
 java.lang.Object clone()
          Copy the vehicle being careful to keep the product tracking variables separate.
 int getCurrentAmountAvailableForOrderType(HOrder order)
          The amount of product that remains for this order type.
 double getEarliestDepartureTime()
          Return the first time that the vehicle is available to start its journey.
 double getPenaltyForTravel(HOrder from, HOrder to)
          Return the penalty for traveling from from to to.
 double getRange()
          Return the range of the vehicle, in time units.
 double getTimeToService(HOrder order)
          Return the time it takes to service the order.
 double getTimeToTravel(HOrder from, HOrder to)
          Return the time it takes to travel from from to to.
 void removeProductForOrderType(int amount, HOrder order)
          Remove product for the specified order type.
 void resetProductsForAllOrderTypes()
          Reset the vehicle to have all its products for all order types.
 boolean supportsHOrderType(HOrder order)
          Whether or not this vehicle supports this order.
 

Method Detail

supportsHOrderType

public boolean supportsHOrderType(HOrder order)
Whether or not this vehicle supports this order. This is primarily intended to check the type of order: dog food, infrared imagery, etc.
Parameters:
order - order to check for support
Returns:
whether or not this vehicle supports this order
Since:
1.0
See Also:
HOrder

getCurrentAmountAvailableForOrderType

public int getCurrentAmountAvailableForOrderType(HOrder order)
The amount of product that remains for this order type.
Parameters:
orderType - order type in question
Returns:
amount of product left
Since:
1.0
See Also:
HOrder

removeProductForOrderType

public void removeProductForOrderType(int amount,
                                      HOrder order)
Remove product for the specified order type.
Parameters:
amount - amount to remove
orderType - order type in qustion
Since:
1.0
See Also:
HOrder

addProductForOrderType

public void addProductForOrderType(int amount,
                                   HOrder order)
Put product back for the specified order type.
Parameters:
amount - amount to put back
orderType - order type in question
Since:
1.0
See Also:
HOrder

resetProductsForAllOrderTypes

public void resetProductsForAllOrderTypes()
Reset the vehicle to have all its products for all order types. This is called right before HTours revalidate themselves.
Returns:
ret
Since:
1.0
See Also:
HTour, HOrder

getEarliestDepartureTime

public double getEarliestDepartureTime()
Return the first time that the vehicle is available to start its journey.
Since:
1.0

getTimeToTravel

public double getTimeToTravel(HOrder from,
                              HOrder to)
Return the time it takes to travel from from to to. A null value represents the starting point (often the depot) for the first argument and the ending point (also often the depot) for the second argument.
Parameters:
from - where the vehicle travels from
to - where the vehicle travels to
Returns:
time to travel betwen from and to
Since:
1.0
See Also:
HOrder

getTimeToService

public double getTimeToService(HOrder order)
Return the time it takes to service the order.
Parameters:
order - order to service
Returns:
time to service the order
Since:
1.0
See Also:
HOrder

getPenaltyForTravel

public double getPenaltyForTravel(HOrder from,
                                  HOrder to)
Return the penalty for traveling from from to to. A null value represents the starting point (often the depot) for the first argument and the ending point (also often the depot) for the second argument. The penalty should be in the same scale since it will likely be added to the time value to evaluate the solution.
Parameters:
from - where the vehicle travels from
to - where the vehicle travels to
Returns:
penalty for traveling betwen from and to
Since:
1.0
See Also:
HOrder

getRange

public double getRange()
Return the range of the vehicle, in time units.
Returns:
vehicle range
Since:
1.0

clone

public java.lang.Object clone()
Copy the vehicle being careful to keep the product tracking variables separate.
Overrides:
clone in class java.lang.Object
Returns:
a copy of this vehicle
Since:
1.0