a-b-street / a-b-street/ltn

Routing supports dead-end u-turns

Open
#137 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21
Forks
7
PR merge metrics
No merged PRs in 30d

Description

(copied from https://github.com/a-b-street/ltn/pull/119#discussion_r1954042416)

>I do not have any counter-examples and will have to think about how to force one, but this rule looks like it prohibits U-turns at a deadend. I don't think a route would ever choose to go down one, unless maybe there's a situation where it's forced to by a TR... ie:
>
>```
> D
> |
> A--*--B
>```
>
> If the route starts from B, goes to *, there's a TR preventing B->A, then the route goes to D. It needs to u-turn there to make progress. Then southbound, D->A.
>
> I don't think something this weird is likely to happen in practice, so don't block this PR on it. I've made a note to try and construct this test case later and see if it can actually occur; can file a followup issue if you agree it's possible

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue describes a potential routing edge case involving U-turns at dead-ends when turn restrictions force a route. Start by examining the routing algorithm code, likely in a module handling pathfinding or turn restrictions. Look for existing tests related to U-turns or dead-ends. The goal is to construct a test case that reproduces the scenario described (B -> * -> D -> U-turn -> A) and verify if the current algorithm handles it correctly. Understanding the graph representation and turn restriction logic is key.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.