mil.af.afit.router
Class UVRVehicle

java.lang.Object
  |
  +--mil.af.afit.router.UVRVehicle
All Implemented Interfaces:
java.lang.Cloneable, mil.af.afit.uvr.HVehicle

public class UVRVehicle
extends java.lang.Object
implements mil.af.afit.uvr.HVehicle

Vehicles are converted to this for the Universal Vehicle Router. You can get back to the original vehicle by calling getParentVehicle().

Since:
1.0
See Also:
Vehicle, HVehicle

Constructor Summary
UVRVehicle(UVRVehicle copyThis)
          Constructs a copy of the specificed UVRVehicle.
UVRVehicle(Vehicle fromThis, Site[] sites, Kernel kernel)
          Constructs a UVRVehicle based on the specified vehicle.
 
Method Summary
 void addProductForOrderType(int amount, mil.af.afit.uvr.HOrder order)
          Does nothing since this problem does not deliver any goods.
 java.lang.Object clone()
          Makes a copy of the vehicle.
 int getCurrentAmountAvailableForOrderType(mil.af.afit.uvr.HOrder order)
          Returns Integer.MAX_VALUE.
 double getEarliestDepartureTime()
          Returns the first time when the vehicle can takeoff.
 double getEndingLatitude()
          Returns vehicle's ending latitude
 double getEndingLongitude()
          Returns vehicle's ending longitude
 int getID()
          Returns id.
 int[] getMapSiteIDtoArrayIndex()
          Returns a mapping array.
 Vehicle getParentVehicle()
          Returns parent vehicle.
 double getPenaltyForTravel(mil.af.afit.uvr.HOrder from, mil.af.afit.uvr.HOrder to)
          Returns the penalty to travel between two sites (or depot and a site).
 double[][] getPenaltyMatrix()
          Returns the penalty matrix in use.
 double getRange()
          Returns the vehicle's range.
 double getStartingLatitude()
          Returns vehicle's starting latitude
 double getStartingLongitude()
          Returns vehicle's starting longitude
 int[] getSupportedDemands()
          Returns vehicle capabilities.
 double[][] getTimeMatrix()
          Returns the time matrix in use.
 double getTimeToService(mil.af.afit.uvr.HOrder from)
          Returns the service time.
 double getTimeToTravel(mil.af.afit.uvr.HOrder from, mil.af.afit.uvr.HOrder to)
          Returns the time to travel between two sites (or depot and a site).
 void removeProductForOrderType(int amount, mil.af.afit.uvr.HOrder order)
          Does nothing since this problem does not deliver any goods.
 void resetProductsForAllOrderTypes()
          Does nothing since this problem does not deliver any goods.
 boolean supportsHOrderType(mil.af.afit.uvr.HOrder order)
          Returns whether or not the vehicle supports the given order.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UVRVehicle

public UVRVehicle(Vehicle fromThis,
                  Site[] sites,
                  Kernel kernel)
Constructs a UVRVehicle based on the specified vehicle. Travel matrices are constructed based on the sites given.
Parameters:
fromThis - vehicle to base it on
sites - sites to use for calculating travel matrices
kernel - kernel being used
Since:
1.0
See Also:
Vehicle, Site, Kernel

UVRVehicle

public UVRVehicle(UVRVehicle copyThis)
Constructs a copy of the specificed UVRVehicle.
Parameters:
copyThis - vehicle to copy
Since:
1.0
Method Detail

getID

public final int getID()
Returns id.
Returns:
id
Since:
1.0

getParentVehicle

public final Vehicle getParentVehicle()
Returns parent vehicle.
Returns:
parent vehicle
Since:
1.0
See Also:
Vehicle

getSupportedDemands

public final int[] getSupportedDemands()
Returns vehicle capabilities.
Returns:
vehicle capabilities
Since:
1.0

getTimeMatrix

public final double[][] getTimeMatrix()
Returns the time matrix in use.
Returns:
the time matrix in use
Since:
1.0

getPenaltyMatrix

public final double[][] getPenaltyMatrix()
Returns the penalty matrix in use.
Returns:
the penalty matrix in use
Since:
1.0

getMapSiteIDtoArrayIndex

public final int[] getMapSiteIDtoArrayIndex()
Returns a mapping array. Tracks site id's in matrices.
Returns:
mapping array
Since:
1.0

getStartingLatitude

public final double getStartingLatitude()
Returns vehicle's starting latitude
Returns:
vehicle's starting latitude
Since:
1.0

getStartingLongitude

public final double getStartingLongitude()
Returns vehicle's starting longitude
Returns:
vehicle's starting longitude
Since:
1.0

getEndingLatitude

public final double getEndingLatitude()
Returns vehicle's ending latitude
Returns:
vehicle's ending latitude
Since:
1.0

getEndingLongitude

public final double getEndingLongitude()
Returns vehicle's ending longitude
Returns:
vehicle's ending longitude
Since:
1.0

supportsHOrderType

public final boolean supportsHOrderType(mil.af.afit.uvr.HOrder order)
Returns whether or not the vehicle supports the given order.
Specified by:
supportsHOrderType in interface mil.af.afit.uvr.HVehicle
Returns:
whether or not the vehicle supports the given order
Since:
1.0

getCurrentAmountAvailableForOrderType

public final int getCurrentAmountAvailableForOrderType(mil.af.afit.uvr.HOrder order)
Returns Integer.MAX_VALUE.
Specified by:
getCurrentAmountAvailableForOrderType in interface mil.af.afit.uvr.HVehicle
Returns:
Integer.MAX_VALUE
Since:
1.0

removeProductForOrderType

public final void removeProductForOrderType(int amount,
                                            mil.af.afit.uvr.HOrder order)
Does nothing since this problem does not deliver any goods.
Specified by:
removeProductForOrderType in interface mil.af.afit.uvr.HVehicle
Since:
1.0

addProductForOrderType

public final void addProductForOrderType(int amount,
                                         mil.af.afit.uvr.HOrder order)
Does nothing since this problem does not deliver any goods.
Specified by:
addProductForOrderType in interface mil.af.afit.uvr.HVehicle
Since:
1.0

resetProductsForAllOrderTypes

public final void resetProductsForAllOrderTypes()
Does nothing since this problem does not deliver any goods.
Specified by:
resetProductsForAllOrderTypes in interface mil.af.afit.uvr.HVehicle
Since:
1.0

getEarliestDepartureTime

public final double getEarliestDepartureTime()
Returns the first time when the vehicle can takeoff.
Specified by:
getEarliestDepartureTime in interface mil.af.afit.uvr.HVehicle
Returns:
the first time when the vehicle can takeoff
Since:
1.0

getTimeToTravel

public final double getTimeToTravel(mil.af.afit.uvr.HOrder from,
                                    mil.af.afit.uvr.HOrder to)
Returns the time to travel between two sites (or depot and a site).
Specified by:
getTimeToTravel in interface mil.af.afit.uvr.HVehicle
Returns:
time to travel
Since:
1.0

getTimeToService

public final double getTimeToService(mil.af.afit.uvr.HOrder from)
Returns the service time.
Specified by:
getTimeToService in interface mil.af.afit.uvr.HVehicle
Returns:
the service time
Since:
1.0

getPenaltyForTravel

public final double getPenaltyForTravel(mil.af.afit.uvr.HOrder from,
                                        mil.af.afit.uvr.HOrder to)
Returns the penalty to travel between two sites (or depot and a site).
Specified by:
getPenaltyForTravel in interface mil.af.afit.uvr.HVehicle
Returns:
penalty to travel
Since:
1.0

getRange

public final double getRange()
Returns the vehicle's range.
Specified by:
getRange in interface mil.af.afit.uvr.HVehicle
Returns:
penalty to travel
Since:
1.0

clone

public java.lang.Object clone()
Makes a copy of the vehicle.
Specified by:
clone in interface mil.af.afit.uvr.HVehicle
Overrides:
clone in class java.lang.Object
Returns:
copy of the vehicle
Since:
1.0

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object