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

how to declare demands ?

Open hamdi-islam opened this issue 5 years ago • 1 comments

Hello, i'm really confused about how to declare demands, in the documentation it states that there is a from-to locations pair of values, and in this example i see 3 values inside a single array, i'm confused which one is which:

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]], demands: [[0, 0, 0], [1, 1, 1], [1, 1, 1]] };

Let's say i have 3 vehicles with capacity of 15 each. All goods are loaded from the depot. and 5 locations to deliver to with the following demands : location A demands 5 location B demands 3 location C demands 2 location D demands 7 location E demands 10

How can I specify the demands in such case ? Thank you.

hamdi-islam avatar Feb 02 '20 13:02 hamdi-islam

any help please ?

hamdi-islam avatar Mar 16 '20 14:03 hamdi-islam