Conversation
…ta.cquest.org is down
… avoid circular imports
…ration so that travel costs recompute when a new GTFS feed is added + add a GTFS builder class + integration test for time varying GTFS parameter
… GTFS when testing for GTFS changes during a simulation
…between two iterations
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #296 +/- ##
===========================================
+ Coverage 59.06% 74.38% +15.32%
===========================================
Files 129 143 +14
Lines 6738 6392 -346
===========================================
+ Hits 3980 4755 +775
+ Misses 2758 1637 -1121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR refactors how transport costs and congestion are represented across GroupDayTrips iterations.
The previous implementation relied on
TransportCostsAggregator, step-based resolution, and several dedicated snapshot classes. That made iteration-specific inspection, congestion-state persistence, and resume behavior hard to reason about. The goal of this refactor is to makeasset_for_iteration(...)the consistent mental model everywhere: transport costs, graphs, congestion, and evaluation should all resolve through the same iteration-scoped asset composition pattern.This PR also addresses a limitation of the previous design:
TransportCostsAggregatorwas anInMemoryAsset, so the transport state needed to resume a run was not persisted on disk. With the new structure, the relevant state can be reconstructed from persisted iteration artifacts and OD flow assets.See #296
Changes
Transport-cost architecture
TransportCostsAggregatorwith a first-classTransportCostsfile asset.CongestionStateManagerto build and reload persisted congestion states from OD flow assets.asset_for_iteration(...)/get_for_iteration(...)as the canonical access pattern for iteration-specific transport state.GroupDayTrips execution and resume
GroupDayTrips,Run,ModeSequences, andPlanUpdaterto use iteration-aware transport-cost assets during execution and resume.RunState.TransportCostsAggregatordid not persist the required transport state to disk.Evaluation access pattern
Tests and configuration
pyproject.toml.Example (if relevant)
AI-assisted contribution
If substantial, briefly describe:
Checklist