feat: Implement lazy hub expansion depth limiting with MaxTransfers support

- Add transfer depth limiting in BFS/Dijkstra (MaxTransfers field in SearchOptions)
- Track transfer count at each step; stop when depth > 5
- Synthetic edge fallback on expansion failure
- Add TestLazyExpansionDepthLimit and TestFindRouteMaxTransfers tests

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-16 18:59:48 +03:00
parent 7c6fe4a99c
commit 026b779cb3
4 changed files with 109 additions and 16 deletions

View File

@@ -163,11 +163,11 @@ Implement the complete multimodal trip planning service as specified in `docs/sp
## Implementation Steps
### Task 14: Lazy hub expansion depth 4-5 [x]
- [ ] Implement BFS/Dijkstra with explicit depth limiting
- [ ] Track transfer count at each step; stop when depth > 5
- [ ] On expansion failure, add synthetic edges as fallback
- [ ] Write tests: TestLazyExpansionDepthLimit, TestFindRouteMaxTransfers
- [ ] Run tests - must pass before task 15
- [x] Implement BFS/Dijkstra with explicit depth limiting
- [x] Track transfer count at each step; stop when depth > 5
- [x] On expansion failure, add synthetic edges as fallback
- [x] Write tests: TestLazyExpansionDepthLimit, TestFindRouteMaxTransfers
- [x] Run tests - must pass before task 15
### Task 15: Pareto-front ranking integration [ ]
- [ ] Integrate multi-criteria ranking into route search results