mapbox / mapbox/node-or-tools

how to declare demands ?

Open
#75 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
155
Forks
47
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with the documentation's description of demands and the `vrpSolverOpts` example, especially its `demands` array. Clarify how each value maps to a location and add a worked example for the five delivery locations and vehicle capacities described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript, node.js
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.