Class VehicleRoutingTransportCostsMatrix

java.lang.Object
com.graphhopper.jsprit.core.problem.cost.AbstractForwardVehicleRoutingTransportCosts
com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix
All Implemented Interfaces:
BackwardTransportCost, BackwardTransportTime, ForwardTransportCost, ForwardTransportTime, TransportCost, TransportDistance, TransportTime, VehicleRoutingTransportCosts

public class VehicleRoutingTransportCostsMatrix extends AbstractForwardVehicleRoutingTransportCosts
CostMatrix that allows pre-compiled time and distance-matrices to be considered as VehicleRoutingTransportCosts in the VehicleRoutingProblem.

Note that you can also use it with distance matrix only (or time matrix). But ones you set a particular distance, this expects distance-entries for all relations. This counts also for a particular time. If the method getTransportCosts(...) is then invoked for a relation, where no distance can be found, an IllegalStateException will be thrown. Thus if you want to only use distances only, do not use addTransportTime(...).

Author:
schroeder