Multiple time windows per location

Open
#8 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, node.js
Domain
backend

Research direction

Start by locating the location time-window handling in the C++ routing bindings and the uses of CumulVar(n). Review how intervals are currently represented, then implement the stated sorting, non-overlap assertion, range restriction, and removal of gaps. Done means a location can accept multiple non-overlapping windows such as 9am–11am and 1pm–3pm.

Written by the indexing model from the issue text.

Description

We should expose the possibility to specify multiple time windows per location.

Use-case: you can service a location between 9am--11am and between 1pm--3pm.


Implementation:

  • Sort intervals per location by start then stop, assert for non-overlapping
  • Take the min and max and set CumulVar(n)->SetRange(minStart, maxStop)
  • Walk over adjacent intervals and remove in between CumulVar(n)->RemoveInterval(stop, start).
Dominant language
C++
Stars
155
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/node-or-tools

All issues in mapbox/node-or-tools

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.