Repository navigation
Explicit Telecommute Software - #18
Open
i-am-sijia wants to merge 9 commits into
Open
i-am-sijia wants to merge 9 commits into
i-am-sijia wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical person-level indexing and moderate telework-duration issues require fixes.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds telework arrangement and duration modeling to ActivitySim, with settings integration, estimation support, and tests.
Changes:
- Adds telework arrangement and duration components.
- Registers models and settings validation.
- Updates estimation utilities and adds focused tests.
| File | Summary |
|---|---|
activitysim/estimation/larch/simple_simulate.py |
Adds estimation helpers; person-level simulation retains a critical household-index issue. |
activitysim/core/util.py |
Handles non-string expressions. |
activitysim/abm/test/test_misc/test_telework_duration.py |
Tests duration behavior. |
activitysim/abm/test/test_misc/test_telework_arrangement.py |
Tests arrangement behavior. |
activitysim/abm/models/telework_duration.py |
Adds duration simulation; unresolved settings, probability validation, NL handling, and annotation issues remain. |
activitysim/abm/models/telework_arrangement.py |
Adds arrangement simulation. |
activitysim/abm/models/settings_checker.py |
Registers new settings validation. |
activitysim/abm/models/__init__.py |
Registers new model components. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+319
to
+327
| return simple_simulate_model( | ||
| name=name, | ||
| edb_directory=edb_directory, | ||
| return_data=return_data, | ||
| choices={ | ||
| True: 1, | ||
| False: 2, | ||
| }, # True is has in-home work, false is does not have in-home work, names match spec positions | ||
| ) |
Comment on lines
+50
to
+53
| SPEC: str = "telework_duration.csv" | ||
| """MNL utility specification file.""" | ||
|
|
||
| COEFFICIENTS: str | None = "telework_duration_coeffs.csv" |
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 pull request adds two new model components to the ActivitySim ABM:
telework_arrangementandtelework_duration. These components enable the simulation of whether a worker teleworks (telecommute or work from home) on a given day and, if so, for how long. The changes also update the settings checker and model initialization to support these new components.New telework modeling components:
telework_arrangementmodel (telework_arrangement.py), which predicts for each worker whether they have in-home telework activity on the simulation day and annotates thepersonstable with ahas_in_home_work_activitycolumn.telework_durationmodel (telework_duration.py), which simulates the duration of in-home work for workers identified as teleworking, supporting both probabilistic and MNL choice models, and annotates thepersonstable withtelework_duration_categoryandtelework_duration_hourscolumns.Integration and configuration updates:
telework_arrangementandtelework_durationcomponents in the model initialization file (__init__.py).settings_checker.py) to recognize and validate settings for the new telework components, including their settings classes and YAML configuration files.