Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

how to declare demands ? #75

Copy link
Copy link

Description

@hamdi-islam
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.