Skip to content

Ensure LFRCNP path uses actual traversed edges - #21

Merged
bnaul merged 1 commit into
mainfrom
fix_lfrcnp
Jan 30, 2026
Merged

Ensure LFRCNP path uses actual traversed edges#21
bnaul merged 1 commit into
mainfrom
fix_lfrcnp

Conversation

@bnaul

@bnaul bnaul commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

LFRCNP filtering was working during A* but we rebuilt the edge list from node pairs, so when two edges shared the same endpoints (e.g., secondary plus service), we sometimes reported the wrong one. I changed bounded_astar to remember (prev_node, edge_idx) and return the exact edges it traversed, wired find_best_path to use those edge indices directly, and deleted the node-pair reconstruction. Added a regression test ensuring parallel edges respect the LFRCNP limit.

All rust tests pass (cargo test --lib), and decoding C7yZ2hu9mhtvFAAH+8sbEA== now uses the correct secondary edge (12651516791334743440).

@bnaul
bnaul merged commit 69b437d into main Jan 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant