Skip to content

Instantly share code, notes, and snippets.

View kumarsiddy's full-sized avatar

Purushotam Kumar kumarsiddy

View GitHub Profile
@kumarsiddy
kumarsiddy / raptor_test.py
Last active October 16, 2025 11:16
Raptor Implementation
#!/usr/bin/env python3
# railscape_rraptor_hubs_with_stations_epoch_v3.py
"""
rRAPTOR Runner — Full-day search (00:00 → +24h)
------------------------------------------------
Improvements:
- Removes explicit start_time (always start-of-day)
- Allows immediate boarding at origin (no min transfer)
- Maintains per-round best_arrival to avoid over-pruning
- Keeps safer leg deduplication (train_no + dep_station + arr_hub)