node-or-tools
node-or-tools copied to clipboard
Time windows array must include depot?
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?