Cost matrix for different vehicle types

Hi, I am trying to solve a VRP with different vehicle types using jsprit. Here is my problem…
When I have a VRP that contains different vehicle types (e.g. car, bicycle), obviously distances to destinations are different for a car and for a bicycle, what trtansport distance should i add to cost matrix for jsprit ? Thank you in advance.

Hello Nane_Petrosyan,

a relatively straightforward way to implement this, is to modify the FastVehicleRoutingTransportCostsMatrix in jsprit to allow different routing profiles (e.g. bicycle, car). For example, you could create a key for each vehicle or routing category and then extend the existing double[][][] matrix by one more dimension. Consequently, whenever a distance or time is added or requested from the matrix you have to add the new routing/vehicleType key.

Powered by Discourse