Closed hopewise closed 6 years ago
depotIndex
in the example is the index for the depot into the list of locations. Say you have n locations and you want the the first location to be your depot, then set depotIndex
to 0.
The solver's world always starts at time point 0 and ends at time point timeHorizon
. You need to shift your real day start and then calculate time differences.
More here: https://github.com/mapbox/node-or-tools/blob/master/API.md
Happy routing! 🎉 🚗
Thanks for quick response! so, what if we have multiple origins?
You need to re-model your problem e.g. by adding an artificial dummy depot. See https://github.com/mapbox/node-or-tools/issues/9.
As I am reviewing the source code of node example, I did not understand the depotIndex, can you please explain it?
Also, how to define origin point? considering
locations
are all destinations?Last question please, in the example, there is:
how did you figure out the 9am ? as dayStarts equals to zero?
Thank you!