public class RoutingPlan extends Object
| Constructor and Description |
|---|
RoutingPlan(Distance distance,
List<Vehicle> vehicles,
Location depot,
List<Location> visits,
List<RouteWithTrack> routes)
Create a routing plan.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Location> |
depot()
The depot.
|
Distance |
distance()
Total distance traveled (sum of distances of all routes).
|
static RoutingPlan |
empty()
Create an empty routing plan.
|
boolean |
isEmpty()
Routing plan is empty when there is no depot, no vehicles and no routes.
|
List<RouteWithTrack> |
routes()
Routes of all vehicles in the depot.
|
List<Vehicle> |
vehicles()
All available vehicles.
|
List<Location> |
visits()
All visits that are part of the routing problem.
|
public RoutingPlan(Distance distance, List<Vehicle> vehicles, Location depot, List<Location> visits, List<RouteWithTrack> routes)
distance - the overall travel distancevehicles - all available vehiclesdepot - the depot (may be null)visits - all visitsroutes - routes of all vehiclespublic static RoutingPlan empty()
public Distance distance()
public List<RouteWithTrack> routes()
public List<Location> visits()
public boolean isEmpty()
true if the plan is emptyCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.