public class FastVehicleRoutingTransportCostsMatrix extends AbstractForwardVehicleRoutingTransportCosts implements TransportDistance
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).
|
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 TransportDistancepublic double getTransportCost(Location from, Location to, double departureTime, Driver driver, Vehicle vehicle)
getTransportCost in interface ForwardTransportCostgetTransportCost in class AbstractForwardVehicleRoutingTransportCostsCopyright © 2013–2016. All rights reserved.