public class VehicleRoute extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
VehicleRoute.Builder
Builder that builds the vehicle route.
|
| Modifier and Type | Method and Description |
|---|---|
static VehicleRoute |
copyOf(VehicleRoute route)
Returns a deep copy of this vehicleRoute.
|
static VehicleRoute |
emptyRoute()
Returns an empty route.
|
List<TourActivity> |
getActivities()
Returns an unmodifiable list of activities on this route (without start/end).
|
double |
getDepartureTime()
Returns the departureTime of this vehicle in this route.
|
Driver |
getDriver()
Returns the driver operating this route.
|
End |
getEnd()
Returns end-activity of this route.
|
Start |
getStart()
Returns start-activity of this route.
|
TourActivities |
getTourActivities()
Returns TourActivities.
|
Vehicle |
getVehicle()
Returns the vehicle operating this route.
|
boolean |
isEmpty()
Returns tour if tour-activity-sequence is empty, i.e.
|
void |
setVehicleAndDepartureTime(Vehicle vehicle,
double vehicleDepTime)
Sets the vehicle and its departureTime from
vehicle.getStartLocationId(). |
String |
toString() |
public static VehicleRoute copyOf(VehicleRoute route)
route - route to copyIllegalArgumentException - if route is nullpublic static VehicleRoute emptyRoute()
An empty route has an empty list of tour-activities, no driver (DriverImpl.noDriver()) and no vehicle (VehicleImpl.createNoVehicle()).
public List<TourActivity> getActivities()
public TourActivities getTourActivities()
TourActivitiespublic Vehicle getVehicle()
public Driver getDriver()
public void setVehicleAndDepartureTime(Vehicle vehicle, double vehicleDepTime)
vehicle.getStartLocationId().
This implies the following:
if start and end are null, new start and end activities are created.
startActivity is initialized with the start-location of the specified vehicle (vehicle.getStartLocationId()). the time-window of this activity is initialized
such that [startActivity.getTheoreticalEarliestOperationStartTime() = vehicle.getEarliestDeparture()][startActivity.getTheoreticalLatestOperationStartTime() = vehicle.getLatestArrival()]
endActivity is initialized with the end-location of the specified vehicle (vehicle.getEndLocationId()). The time-window of the
endActivity is initialized such that [endActivity.getTheoreticalEarliestOperationStartTime() = vehicle.getEarliestDeparture()][endActivity.getTheoreticalLatestOperationStartTime() = vehicle.getLatestArrival()]
startActivity.endTime (startActivity.getEndTime()) is set to max{vehicle.getEarliestDeparture(), vehicleDepTime}.
thus, vehicle.getEarliestDeparture() is a physical constraint that has to be met.
vehicle - to be employedvehicleDepTime - of employed vehiclepublic double getDepartureTime()
IllegalArgumentException - if start is nullpublic boolean isEmpty()
public Start getStart()
public End getEnd()
Copyright © 2013–2019. All rights reserved.