|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mil.af.afit.uvr.HTour
A tour contains a vehicle and a list of customers to visit. If it is changed,
the associated HSolution
object should be invalidate
ed.
HOrder
,
HVehicle
,
HSolution
Field Summary | |
protected HList |
route
|
Constructor Summary | |
HTour(HTour copyThis)
Constructs a copy of the tour based on the passed tour. |
|
HTour(HVehicle vehicle)
Constructs a tour based on the given vehicle |
|
HTour(HVehicle vehicle,
HOrder[] orders)
Constructs a tour based on the given vehicle and places the orders in the tour in the same order as in the array. |
Method Summary | |
void |
addHOrder(HOrder order)
Adds the order to the end of the tour. |
java.lang.Object |
clone()
|
HOrder |
firstHOrder()
Returns the first order in the tour. |
int |
getBustedTimeWalls()
Returns the number of busted time walls for the tour. |
int |
getBustedTimeWindows()
Returns the number of busted time windows for the tour. |
double |
getDepartureTime()
Returns the departure time for the tour. |
double |
getEstimatedArrivalTime(int i)
Return the estimated arrival time at the order in position i. |
double |
getEstimatedDepartureTime(int i)
Return the estimated departure time at the order in position i. |
double |
getEstimatedWaitTime(int i)
Return the estimated wait time at the order in position i. |
HOrder |
getHOrderAt(int position)
Returns the order at the positionth position. |
HVehicle |
getHVehicle()
Returns the vehicle associated with the tour. |
double |
getReturnTime()
Returns the estimated return time for the tour. |
double |
getTotalPenalty()
Returns the penalty for the tour. |
double |
getTotalTravelTime()
Returns the total travel time for the tour. |
double |
getTotalWaitingTime()
Returns the waiting time for the tour. |
void |
insertHOrderAt(HOrder order,
int position)
Inserts the given order into position. |
void |
invalidate()
Indicates that the tour costs are no longer valid. |
boolean |
isValid()
Whether or not the costs and such associated with the tour are valid with respect to the latest changes. |
void |
removeHOrderAt(int position)
Removes the given order from position. |
boolean |
serviced(int i)
Returns true if the order has been serviced. |
int |
size()
Number of orders in the tour. |
java.lang.String |
toString()
|
void |
validateTour()
Validate the tour. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected HList route
Constructor Detail |
public HTour(HVehicle vehicle)
vehicle
- the vehicle to associate with the tourHVehicle
public HTour(HVehicle vehicle, HOrder[] orders)
vehicle
- vehicle for the tourorders
- orders to put in the arrayHVehicle
,
HOrder
public HTour(HTour copyThis)
copyThis
- tour to copyMethod Detail |
public HVehicle getHVehicle()
HVehicle
public final double getTotalTravelTime()
isValid()
to see if the value is meaningful.public final double getTotalWaitingTime()
isValid()
to see if the value is meaningful.public final double getTotalPenalty()
isValid()
to see if the value is meaningful.
The penalty should be in the same units as time.public final int getBustedTimeWindows()
isValid()
to see if the value is meaningful.public final int getBustedTimeWalls()
isValid()
to see if the value is meaningful.public final double getDepartureTime()
isValid()
to see if the value is meaningful.public final double getReturnTime()
isValid()
to see if the value is meaningful.public final HOrder getHOrderAt(int position)
position
- position of order to returnHOrder
public final HOrder firstHOrder()
position
- position of order to returnHOrder
public final double getEstimatedArrivalTime(int i)
i
- position of order in questionHOrder
public final double getEstimatedDepartureTime(int i)
i
- position of order in questionHOrder
public final double getEstimatedWaitTime(int i)
i
- position of order in questionHOrder
public final boolean serviced(int i)
i
- position of order in questionHOrder
public final void validateTour()
HOrder
,
HVehicle
public int size()
HOrder
public final boolean isValid()
public void insertHOrderAt(HOrder order, int position)
size()
the order is
appended to the end of the tour. The tour costs are then invalidated.order
- order to insertposition
- where to put the orderHOrder
public void removeHOrderAt(int position)
order
- order to removeposition
- where the order is coming fromHOrder
public void addHOrder(HOrder order)
order
- order to addHOrder
public final void invalidate()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |