public class FastVehicleRoutingTransportCostsMatrix extends AbstractForwardVehicleRoutingTransportCosts
VehicleRoutingTransportCosts
in the VehicleRoutingProblem.
Note that you can also use it with distance matrix only (or time matrix).
| Modifier and Type | Class and Description |
|---|---|
static class |
FastVehicleRoutingTransportCostsMatrix.Builder
Builder that builds the matrix.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDistance(int fromIndex,
int toIndex)
Returns the distance from to to.
|
double |
getDistance(Location from,
Location to,
double departureTime,
Vehicle vehicle) |
double[][][] |
getMatrix()
First dim is from, second to and third indicates whether it is a distance value (index=0) or time value (index=1).
|
int |
getNoLocations() |
double |
getTransportCost(Location from,
Location to,
double departureTime,
Driver driver,
Vehicle vehicle) |
double |
getTransportTime(Location from,
Location to,
double departureTime,
Driver driver,
Vehicle vehicle) |
getBackwardTransportCost, getBackwardTransportTimepublic double[][][] getMatrix()
public double getTransportTime(Location from, Location to, double departureTime, Driver driver, Vehicle vehicle)
getTransportTime in interface ForwardTransportTimegetTransportTime in class AbstractForwardVehicleRoutingTransportCostspublic double getDistance(int fromIndex,
int toIndex)
fromIndex - from location indextoIndex - to location indexpublic double getDistance(Location from, Location to, double departureTime, Vehicle vehicle)
getDistance in interface TransportDistancegetDistance in class AbstractForwardVehicleRoutingTransportCostspublic double getTransportCost(Location from, Location to, double departureTime, Driver driver, Vehicle vehicle)
getTransportCost in interface ForwardTransportCostgetTransportCost in class AbstractForwardVehicleRoutingTransportCostspublic int getNoLocations()
Copyright © 2013–2024. All rights reserved.