public class VehicleRoutingProblem extends Object
A routing problem is defined as jobs, vehicles, costs and constraints.
To construct the problem, use VehicleRoutingProblem.Builder. Get an instance of this by using the static method VehicleRoutingProblem.Builder.newInstance().
By default, fleetSize is INFINITE, transport-costs are calculated as euclidean-distance (CrowFlyCosts), and activity-costs are set to zero.
| Modifier and Type | Class and Description |
|---|---|
static class |
VehicleRoutingProblem.Builder
Builder to build the routing-problem.
|
static class |
VehicleRoutingProblem.FleetSize
Enum that characterizes the fleet-size.
|
| Modifier and Type | Method and Description |
|---|---|
List<AbstractActivity> |
copyAndGetActivities(Job job) |
List<AbstractActivity> |
getActivities(Job job) |
VehicleRoutingActivityCosts |
getActivityCosts()
Returns activityCosts.
|
Collection<Location> |
getAllLocations() |
VehicleRoutingProblem.FleetSize |
getFleetSize()
Returns type of fleetSize, either INFINITE or FINITE.
|
Collection<VehicleRoute> |
getInitialVehicleRoutes()
Returns a copy of initial vehicle routes.
|
JobActivityFactory |
getJobActivityFactory() |
Map<String,Job> |
getJobs()
Returns the unmodifiable job map.
|
Map<String,Job> |
getJobsInclusiveInitialJobsInRoutes() |
int |
getNuActivities() |
VehicleRoutingTransportCosts |
getTransportCosts()
Returns routing costs.
|
Collection<VehicleType> |
getTypes()
Returns the entire, unmodifiable collection of types.
|
Collection<Vehicle> |
getVehicles()
Returns the entire, unmodifiable collection of vehicles.
|
String |
toString() |
public VehicleRoutingProblem.FleetSize getFleetSize()
By default, it is INFINITE.
public Map<String,Job> getJobs()
public Collection<VehicleRoute> getInitialVehicleRoutes()
public Collection<VehicleType> getTypes()
VehicleTypeImplpublic Collection<Vehicle> getVehicles()
Vehiclepublic VehicleRoutingTransportCosts getTransportCosts()
VehicleRoutingTransportCostspublic VehicleRoutingActivityCosts getActivityCosts()
public Collection<Location> getAllLocations()
public List<AbstractActivity> getActivities(Job job)
job - for which the corresponding activities needs to be returnedpublic int getNuActivities()
public JobActivityFactory getJobActivityFactory()
public List<AbstractActivity> copyAndGetActivities(Job job)
job - for which the corresponding activities needs to be returnedCopyright © 2013–2016. All rights reserved.