Skip to content

add trip scheduling choice explicit chunking - #1102

Merged
jpn-- merged 3 commits into
ActivitySim:mainfrom
driftlesslabs:codex/pr-1041-refresh
Aug 8, 2026
Merged

add trip scheduling choice explicit chunking#1102
jpn-- merged 3 commits into
ActivitySim:mainfrom
driftlesslabs:codex/pr-1041-refresh

Conversation

@jpn--

@jpn-- jpn-- commented Aug 7, 2026

Copy link
Copy Markdown
Member

Replaces and advances #1041.

This pull request adds support for explicit chunk sizing in the trip_scheduling_choice model, allowing users to control how data is split during processing. It also introduces comprehensive tests to ensure that explicit chunking works correctly and does not affect model results.

Explicit chunking support:

  • Added an explicit_chunk parameter to TripSchedulingChoiceSettings, enabling users to specify a fixed chunk size or a fraction of the dataset for chunking.
  • Updated run_trip_scheduling_choice to pass the explicit_chunk setting to chunk.adaptive_chunked_choosers, ensuring the chunking behavior follows user configuration.

Testing enhancements:

  • Refactored the test for run_trip_scheduling_choice to use deep copies and proper random-number management, ensuring reproducibility when chunking is enabled. [1] [2]
  • Added a test to verify that explicit chunking divides the data as expected and that results are identical to the default adaptive chunking.

m-richards and others added 3 commits August 7, 2026 13:42
# Conflicts:
#	activitysim/abm/test/test_misc/test_trip_scheduling_choice.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jpn--
jpn-- requested a balanced review from Copilot August 7, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit chunk sizing to trip scheduling while preserving deterministic results.

Changes:

  • Adds the explicit_chunk model setting and forwards it to the chunker.
  • Adds coverage for chunk sizes and result equivalence.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
activitysim/abm/models/trip_scheduling_choice.py Implements explicit chunk configuration.
activitysim/abm/test/test_misc/test_trip_scheduling_choice.py Tests deterministic explicit chunking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jpn--
jpn-- merged commit 16ab111 into ActivitySim:main Aug 8, 2026
17 checks passed
@jpn--
jpn-- deleted the codex/pr-1041-refresh branch August 8, 2026 02:26
@m-richards

Copy link
Copy Markdown
Contributor

Thanks @jpn-- for following up on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants