Skip to content

exposing network_los to annotator and preprocessor - #1134

Merged
jpn-- merged 1 commit into
ActivitySim:mainfrom
TransLinkForecasting:v1.6.0-network-los-fix
Oct 22, 2026
Merged

jpn-- merged 1 commit into
ActivitySim:mainfrom
TransLinkForecasting:v1.6.0-network-los-fix

Conversation

@bwentl

@bwentl bwentl commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Fix for #1133

  • expressions.compute_columns now adds network_los to the locals used to evaluate expressions, next to skim_dict, so preprocessor and annotate-table specs can call network_los.skim_time_period_label(...) and read network_los.skim_time_periods.
  • This fixes the NameError: name 'network_los' is not defined raised when a trip_mode_choice annotate-trips spec uses network_los.
  • Tests: the test_preprocessing preprocessor spec gains a los_period column computed with network_los.skim_time_period_label(df.depart), and the fixtures register network_los and supply a depart column. test_preprocessing.py passes (2 passed).
  • No documentation change is needed. The change only makes an existing network_los object available in expression files.

@jpn--
jpn-- merged commit cc1944c into ActivitySim:main Oct 22, 2026
17 checks passed
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