Ability to control the allowed state transitions during a simulation#284
Open
Ability to control the allowed state transitions during a simulation#284
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
===========================================
+ Coverage 59.06% 74.60% +15.53%
===========================================
Files 129 146 +17
Lines 6738 6406 -332
===========================================
+ Hits 3980 4779 +799
+ Misses 2758 1627 -1131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…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
d0dbe83 to
48cca99
Compare
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
See: #283
GroupDayTripspreviously allowed all plan transitions at every simulation step, with transitions driven only by utility differences. That means all forms of behavioral adjustment happened on the same timescale, even though some changes are much easier than others in reality.This PR adds an explicit way to stage behavioral adaptation over iterations. It allows us to reproduce simplified adjustment dynamics, for example by allowing mode changes first, then destination changes, then full daily programme changes, while we work toward a more complete transition-cost model (see #196).
Changes
Added a staged behavior-change API to
GroupDayTripsparameters:BehaviorChangeScopeFULL_REPLANNINGDESTINATION_REPLANNINGMODE_REPLANNINGBehaviorChangePhase(start_iteration, scope)behavior_change_phasesget_behavior_change_scope(iteration)Implemented scope-aware behavior in the
GroupDayTripsflow:DestinationSequencesPlanUpdaterBehavior by scope:
FULL_REPLANNINGDESTINATION_REPLANNINGMODE_REPLANNINGStay-home behavior is defined explicitly:
FULL_REPLANNINGMODE_REPLANNINGandDESTINATION_REPLANNINGArchitecture changes:
core/parameters.pyplans/destination_sequences.pyplans/plan_updater.pyAdded tests for:
GroupDayTripsrunExample
This means:
1-4: full replanning5-7: mode replanning only, from the active plans at iteration 48-10: destination + mode replanning, from the active plans at iteration 711-12: full replanning againIf
behavior_change_phasesis omitted, all iterations useBehaviorChangeScope.FULL_REPLANNINGby default.