Skip to content

Incorrect origin TAZ for non-home tours in 2 zone models #1099

Description

@jpn--

There was a bug found in the identification of origin TAZs in at-work subtours. The at-work subtour’s MAZ origin was already identified correctly. The bug was in the derived TAZ used for two-zone destination presampling.

The bug was discovered in the SANDAG at-work subtour destination model. It correctly configures both ORIG_ZONE_ID and CHOOSER_ORIG_COL_NAME as workplace_zone_id. The merged chooser table at this model retained a TAZ representing the traveler’s home. The code reused that column instead of mapping workplace_zone_id to the correct origin TAZ. Consequently, at-work subtours could use:

  • the correct workplace MAZ as their configured origin, but
  • the traveler’s home TAZ as the coarse origin used for TAZ-level presampling.

PR #1094 now always maps the configured origin MAZ to its TAZ, replacing any unrelated same-named TAZ column.

Regression impact

In the 100-household SANDAG test model:

  • 16 of the 23 at-work subtours receive corrected destination_logsum values.
  • The modeled origins and chosen destinations remain unchanged.
  • One of the 229 tour logsums differs enough to exceed the regression tolerance, causing test to fail.
  • Both test_sandag_abm3_progressive[False] and [True] fail on final_tours.csv.
  • The failure is limited to the destination_logsum column.

See the [failing ActivitySim CI job](https://github.com/ActivitySim/activitysim/actions/runs/30858703676/job/91836994032).

Required SANDAG updates

  1. Regenerate test/regress/final_tours.csv with an ActivitySim revision containing the fix. All corrected at-work logsum values should be accepted, rather than updating only the one value that currently exceeds the comparison tolerance.

  2. Refresh the two reference pipelines:

    • reference-pipeline-hh100.parquetpipeline
    • reference-pipeline-hh100-recode.parquetpipeline

    Their existing rtol=1e-4 comparison tolerates the changes, so they are not causing the red CI result, but their at-work destination checkpoints still represent the old calculation.

  3. After ActivitySim Deprecate SIMULATE_CHOOSER_COLUMNS and LOGSUM_CHOOSER_COLUMNS settings #1094 is merged, refresh uv.lock so standalone SANDAG environments resolve an ActivitySim commit containing the fix.

No changes are expected to the at-work destination specification, coefficients, ORIG_ZONE_ID, or CHOOSER_ORIG_COL_NAME.

cc @bhargavasana

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working/bug f

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions