public class SolutionUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CUSTOMER_DEMAND |
(package private) static int |
DEFAULT_VEHICLE_CAPACITY |
| Modifier and Type | Method and Description |
|---|---|
(package private) static org.optaplanner.examples.vehiclerouting.domain.Customer |
addCustomer(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location)
Add customer with zero demand.
|
(package private) static org.optaplanner.examples.vehiclerouting.domain.Customer |
addCustomer(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location,
int demand)
Add customer with demand.
|
(package private) static org.optaplanner.examples.vehiclerouting.domain.Depot |
addDepot(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location)
Add depot.
|
(package private) static org.optaplanner.examples.vehiclerouting.domain.Vehicle |
addVehicle(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
long id)
Add vehicle with zero capacity.
|
(package private) static Long |
depot(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution)
Get solution's depot ID.
|
static org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution |
emptySolution()
Create an empty solution.
|
(package private) static org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution |
initialSolution()
Create an initial solution with no locations and some vehicles.
|
(package private) static void |
moveAllVehiclesTo(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.Depot depot)
Move all vehicles to the specified depot.
|
(package private) static org.optaplanner.examples.vehiclerouting.domain.location.RoadLocation |
planningLocation(Location location)
Translate domain location to a planning location.
|
(package private) static List<ShallowRoute> |
routes(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution)
Extract routes from the solution.
|
public static final int DEFAULT_CUSTOMER_DEMAND
static final int DEFAULT_VEHICLE_CAPACITY
public static org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution emptySolution()
static org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution initialSolution()
static org.optaplanner.examples.vehiclerouting.domain.Vehicle addVehicle(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
long id)
solution - solutionid - vehicle idstatic List<ShallowRoute> routes(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution)
solution - solutionstatic org.optaplanner.examples.vehiclerouting.domain.location.RoadLocation planningLocation(Location location)
location - domain locationstatic Long depot(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution)
solution - the solution in which to look for the depotnull if there are no depotsstatic org.optaplanner.examples.vehiclerouting.domain.Depot addDepot(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location)
solution - solutionlocation - depot's locationstatic org.optaplanner.examples.vehiclerouting.domain.Customer addCustomer(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location)
solution - solutionlocation - customer's locationstatic org.optaplanner.examples.vehiclerouting.domain.Customer addCustomer(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.location.Location location,
int demand)
solution - solutionlocation - customer's locationdemand - customer's demandstatic void moveAllVehiclesTo(org.optaplanner.examples.vehiclerouting.domain.VehicleRoutingSolution solution,
org.optaplanner.examples.vehiclerouting.domain.Depot depot)
solution - solutiondepot - new vehicles' depot. May be null.Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.