This pull request introduces the new automated calibration workflow for ActivitySim, modularizing calibration logic into a dedicated package and integrating it into the main simulation runner. The changes include the addition of a comprehensive calibration package, updates to the CLI to support calibration runs and output preservation, and enhancements to model settings validation to include calibration configuration.
Calibration package introduction and integration:
Added a new activitysim.core.calibration package, splitting calibration logic into focused modules such as orchestrator.py, settings.py, component.py, and more, with a clear public API. [1][2][3]
Updated activitysim/cli/run.py to import and utilize the calibration package, including logic to determine when to preserve outputs and to run the calibration workflow before standard or multiprocess simulation. [1][2][3]
Settings and validation improvements:
Enhanced model settings validation in settings_checker.py to explicitly validate the optional calibration.yaml configuration file using the same error aggregation as other settings. [1][2]
Random number generator and reproducibility:
In initialize_households, ensured that both households and persons dataframes are registered as random number generator channels to support reproducible calibration and simulation.
Documentation:
Added a detailed README.md for the calibration package, describing its architecture, configuration, iteration/recovery semantics, and integration with the main 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
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.
This pull request introduces the new automated calibration workflow for ActivitySim, modularizing calibration logic into a dedicated package and integrating it into the main simulation runner. The changes include the addition of a comprehensive calibration package, updates to the CLI to support calibration runs and output preservation, and enhancements to model settings validation to include calibration configuration.
Calibration package introduction and integration:
Settings and validation improvements:
Random number generator and reproducibility:
Documentation: