Repository navigation
Add fixed-work-schedule classification and plan downstream enforcement - #25
Merged
Merged
Conversation
ActivitySim multiprocessing expects extensions in the project root folder where activitysim is being executed: https://github.com/ActivitySim/activitysim/blob/e23bb128b314f5f6f6d24e26334c15edfb88cdc2/activitysim/core/mp_tasks.py#L931-L937
multiprocessing currently expects extensions in the root dir where activitysim is called: https://github.com/ActivitySim/activitysim/blob/e23bb128b314f5f6f6d24e26334c15edfb88cdc2/activitysim/core/mp_tasks.py#L931-L937
Use direct single-period availability lookups and skip Sharrow for adjacent-window evaluations. Update non-mandatory tour frequency expressions to use precomputed alternative fields.
Add configurable worker counts and timestamped output paths. Summarize model inputs and outputs in JSON and HTML reports.
Recode pipeline zone IDs only for Sharrow runs so legacy skims retain original IDs and correctly apply shuffled OMX mappings.
Support configurable household samples, reuse compatible completed jobs, and preserve incomplete runs when resuming. Persist per-job results and surface reused runs in benchmark reports and metadata.
Split mode-choice annotations and reduce intermediate columns to bound full-scale memory use. Add 64 GiB configuration overrides and a containerized production benchmark with memory qualification and reporting.
Bound destination and mode-choice chunks for full-scale runs. Build benchmark images from local ActivitySim and Sharrow sources and improve worker timing collection.
Update the supported dependency versions and clarify that ActivitySim 1.6 accepts the optional trip-mode chunk overlay. Record passing contract tests and exact non-logsum parity in the upgraded 2,000-household backend comparison, keeping earlier validation identified by version.
add naics_code to population input, remove duplicate MA households and employments
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…xed-work-schedule
i-am-sijia
approved these changes
Sep 29, 2026
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.
This PR adds a coherent, registered model step that decides who has a recurring fixed work schedule. It does not implement the downstream assignment or enforcement of fixed work hours. The new attribute currently has no effect on mandatory tour scheduling, mode choice, trip scheduling, or other activity availability.
Implemented: fixed-schedule worker classification
constraint_fixed_work_scheduleruns in both single-process and multiprocess model sequences and persists a person-levelworks_fixed_scheduleattribute. It uses a binary logit with industry intercepts and an income effect. The coefficients are explicitly labeled prototype assumptions, not estimated or validated survey parameters.num_workersfield is unchanged.“Fixed” means the same recurring required work hours across days, not merely a preference for regular hours. Someone outside this category is not necessarily free to change hours: employer-controlled rotating schedules, for example, are distinct from recurring fixed schedules.
Planned, not implemented: schedule assignment and enforcement
The design document proposes approximately 32 shared work start/end pairs and a separate probability table by industry and full-/part-time status. These are conditional distributions among people already classified as fixed, not another model of whether they are fixed. No runtime schedule catalog, schedule draws, scheduling wrapper, timetable reservations, or downstream enforcement has been added in this PR.
The intended implementation would draw and persist required work hours, reserve fixed obligations first, take fixed work tours out of the ordinary mandatory scheduling choice set, and run the existing scheduling model for the remaining tours. Remote workers would receive a work reservation without an artificial commute.
Why the downstream work is more complicated than filtering a chooser set
work2andwork_and_school. The one-episode assumption must be enforced before tour creation, preserving consistent IDs, counts, and person frequency attributes; deleting a second tour afterward is insufficient.Confirmed policy for the first scheduling prototype
Decisions needed before successful downstream implementation
The detailed proposal and example schedules are in
docs/fixed-work-scheduling-plan.md; implemented behavior and limitations are indocs/fixed-work-schedule.md.Validation
Branch scope / inherited changes
This is the requested PR from
wsp-sag:feature/fixed-work-scheduletoCTPSSTAFF:main. The feature branch was created from localworkshoppe, not upstreammain. At opening it contains 73 commits ahead of upstream, including inherited telework, other constraints, developer tooling, model-test infrastructure, execution/backend changes, and input updates. Several have separate open upstream PRs (#17, #18, #19, #20, #21, #23, and #24); this PR is not an isolated four-commit diff against current upstream main.The fixed-work-schedule work itself consists of:
2050809— design and prototype assumptions15c9466— classification component and initial tests0d3b310— validation and operational documentation6fb4fb3— downstream scheduling integration planThese four commits can be reviewed as the feature-specific increment; the larger inherited diff needs coordination with the existing upstream work before merging.