Skip to content

Explicit Telecommute Software - #18

Open
i-am-sijia wants to merge 9 commits into
mainfrom
explicit-telecommute
Open

i-am-sijia wants to merge 9 commits into
mainfrom
explicit-telecommute

Conversation

@i-am-sijia

Copy link
Copy Markdown
Member

This pull request adds two new model components to the ActivitySim ABM: telework_arrangement and telework_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:

  • Added the telework_arrangement model (telework_arrangement.py), which predicts for each worker whether they have in-home telework activity on the simulation day and annotates the persons table with a has_in_home_work_activity column.
  • Added the telework_duration model (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 the persons table with telework_duration_category and telework_duration_hours columns.

Integration and configuration updates:

  • Registered the new telework_arrangement and telework_duration components in the model initialization file (__init__.py).
  • Updated the settings checker (settings_checker.py) to recognize and validate settings for the new telework components, including their settings classes and YAML configuration files.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 High severity · 2 Medium severity

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 thread activitysim/abm/models/telework_duration.py Outdated
Comment on lines +50 to +53
SPEC: str = "telework_duration.csv"
"""MNL utility specification file."""

COEFFICIENTS: str | None = "telework_duration_coeffs.csv"
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.

2 participants