Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part D - Via search, implement feature. (Depend on: A) #4494

Closed
Tracked by #3183
t2gran opened this issue Oct 3, 2022 · 1 comment
Closed
Tracked by #3183

Part D - Via search, implement feature. (Depend on: A) #4494

t2gran opened this issue Oct 3, 2022 · 1 comment
Labels
Stale This issue is stale, no activity for 90 days. Remove stale label or comment within 30 days.
Milestone

Comments

@t2gran
Copy link
Member

t2gran commented Oct 3, 2022

Requirements

  1. Via location can be a Station, Stop or coordinate. This should work the same way as the from/to
    fields in the current routing endpoint. Use Stop/Station ID if the stop/station exist, if not use
    the coordinate. Each location should have:
    1. minSlack : Duration = 10 minutes
    2. maxSlack : Duration = 60 minutes
  2. Will have to perform multiple searches. We can start with doing them in sequence, and if needed
    optimize and run them in parallel. Running the searches in parallel, will require an initial
    search for each viaTrip to find minTravelTime. Then perform searches for different viaTrips in
    parallel.
  3. How should answer look? (same answer for initial implementation probably)
  4. Different query endpoint (same answer but different input params)

Implement in multiple steps:

  1. Support for intermediate searches (simplest way). Only allow 2 via points. Constants for min and max slack.
  2. min- & maxSlack adjustable
  3. Parallel searches

Initial solution:

  1. No passThrough points (we do not need to do extra searches for that. will be implemented in separate issue)
  2. Do search for each via point. For example:
    a) via points Station A, Station B:
    first search start - Station A,
    second search Station A - end
  3. minSlack is a parameter for how much time we need to have at each transfer
  4. maxSlack is a parameter for max time we need at each transfer and how long searchWindow we should have
  5. Both minSlack and maxSlack are hardcoded at the beginning
  6. Example:

Search:
startAt 12:00, searchWindow 60min, minSlack 10 min, maxSlack 30 min
via points:
Station A

Search 1, startAt 12:00, searchWindow 60 min, give results:
result 1, arrive at 13:00
result 2, arrive at 14:00

searchWindow for search 2 is last arrival - first arrival + maxSlack: 90min
startAt for search 2 is first arrival + minSlack: 13:10

Search 2, startAt 13:10, searchWindow 90min, give results:
result 1, departure at 13:15
result 2, departure at 13:45
result 3, departure at 14:30

Combine results together. For each result from search 2 find matching result from search 1. (departure >= (arrival + minSlack)):
search1.result1 + search2.result1
search1.result2 + search2.result3

search1.result1 + search2.result2 will be excluded because the departure time for search2.result2 is after the allowed arrival + maxSlack = 13:30

@t2gran t2gran added this to the 2.3 milestone Nov 1, 2022
TimMickelsonSkanetrafiken added a commit to Skanetrafiken/OpenTripPlanner that referenced this issue Nov 8, 2022
TimMickelsonSkanetrafiken added a commit to Skanetrafiken/OpenTripPlanner that referenced this issue Nov 10, 2022
TimMickelsonSkanetrafiken added a commit to Skanetrafiken/OpenTripPlanner that referenced this issue Nov 16, 2022
TimMickelsonSkanetrafiken added a commit to Skanetrafiken/OpenTripPlanner that referenced this issue Nov 16, 2022
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days

@github-actions github-actions bot added the Stale This issue is stale, no activity for 90 days. Remove stale label or comment within 30 days. label Jan 31, 2023
@hannesj hannesj closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This issue is stale, no activity for 90 days. Remove stale label or comment within 30 days.
Projects
None yet
Development

No branches or pull requests

2 participants