Add complete destination-plan search - #404
Merged
Merged
Conversation
FlxPo
changed the base branch from
feature/survey-zero-duration-correction
to
main
July 30, 2026 16:04
…lan-search # Conflicts: # mobility/trips/group_day_trips/plans/destination_sequences.py # tests/back/unit/domain/group_day_trips/test_012_destination_sequences.py
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
==========================================
+ Coverage 82.97% 82.99% +0.02%
==========================================
Files 232 233 +1
Lines 15978 16039 +61
==========================================
+ Hits 13257 13312 +55
- Misses 2721 2727 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6 tasks
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
Mobility currently samples destinations one activity at a time. A destination can be plausible for one trip while producing an implausible complete day when combined with the other destinations.
For example:
home → work → shopping → homeThe work and shopping locations may each appear reasonable on their own, while the travel between them leaves no meaningful time for shopping—or makes the schedule impossible. These candidates consume destination and mode sampling work before being corrected or discarded later.
This PR adds a destination search that evaluates the complete daily chain. It considers all consecutive trips, representative OD travel times, and minimum activity durations before returning a plan. This reduces wasted candidates and gives the model several coherent destination alternatives for the same activity schedule.
It also improves tour-level destination choice: each location is evaluated through its effect on the complete chain, including both the trip used to reach it and the following trip.
Feasibility at this stage uses representative travel times. A specific mode selected later may still make a plan infeasible; mode-specific feasibility remains a separate modelling step.
Changes
use_destination_plan_search.k_destination_sequenceshigh-scoring destination chains for each activity schedule.experiments/.Example
The step-by-step destination sampler remains the default.
AI-assisted contribution
If substantial, briefly describe:
Checklist