node-or-tools icon indicating copy to clipboard operation
node-or-tools copied to clipboard

Vehicle Specific Cost and Duration Factors

Open daniel-j-h opened this issue 9 years ago • 0 comments

At the moment we expose a single cost and duration matrix per vehicle. What we should allow for in the context of multiple vehicles is cost and duration factors on a per vehicle basis to scale the cost and duration matrix the user passes us, think

numVehicles: 3
costFactors: [1.0, 0.7, 1.5]
durationFactors: [1.0, 0.7, 1.5]

which would scale both the cost as well as the duration matrices depending on the factors for each vehicle. We need to separate cost and duration factors because users could specify e.g. distance as cost in which case costFactors would be [1.0 1.0 1.0] and durationFactors would account for slower and faster vehicles.

Related: Heterogeneous Fleets https://github.com/mapbox/node-or-tools/issues/11

cc @karenzshea

daniel-j-h avatar May 16 '17 14:05 daniel-j-h