mapbox / node-or-tools

Node.js bindings for or-tools vehicle routing problems
MIT License
147 stars 48 forks source link

Time windows array must include depot? #61

Open carlosen14 opened 6 years ago

carlosen14 commented 6 years ago

In your example..

var vrpSolverOpts = {
  numNodes: 3,
  costs: [[0, 10, 10], [10, 0, 10], [10, 10, 0]],
  durations: [[0, 2, 2], [2, 0, 2], [2, 2, 0]],
  timeWindows: [[0, 9], [2, 3], [2, 3]], //<<<< here
  demands: [[0, 0, 0], [1, 1, 1], [1, 1, 1]]
};

timeWindows variable is including a value for the depot index, it must be a full time window? It is represented as hour?