Class RoutingProblem
- java.lang.Object
-
- org.optaweb.vehiclerouting.domain.RoutingProblem
-
public class RoutingProblem extends Object
Definition of the vehicle routing problem instance.
-
-
Constructor Summary
Constructors Constructor Description RoutingProblem(String name, List<? extends VehicleData> vehicles, LocationData depot, List<? extends LocationData> visits)Create routing problem instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<LocationData>depot()Get the depot.Stringname()Get routing problem instance name.List<VehicleData>vehicles()Vehicles that are part of the problem definition.List<LocationData>visits()Get locations that should be visited.
-
-
-
Constructor Detail
-
RoutingProblem
public RoutingProblem(String name, List<? extends VehicleData> vehicles, LocationData depot, List<? extends LocationData> visits)
Create routing problem instance.- Parameters:
name- the instance namevehicles- list of vehicles (notnull)depot- the depot (may benullif there is no depot)visits- list of visits (notnull)
-
-
Method Detail
-
name
public String name()
Get routing problem instance name.- Returns:
- routing problem instance name
-
depot
public Optional<LocationData> depot()
Get the depot.- Returns:
- depot (never
null)
-
visits
public List<LocationData> visits()
Get locations that should be visited.- Returns:
- visits
-
vehicles
public List<VehicleData> vehicles()
Vehicles that are part of the problem definition.- Returns:
- vehicles
-
-