Skip to content

Changes to support park_and_ride_lot_choice estimation. - #1136

Draft
stefancoe wants to merge 1 commit into
ActivitySim:mainfrom
psrc:pnr_estimation2
Draft

stefancoe wants to merge 1 commit into
ActivitySim:mainfrom
psrc:pnr_estimation2

Conversation

@stefancoe

Copy link
Copy Markdown
Contributor

This pull request updates the run_park_and_ride_lot_choice function in park_and_ride_lot_choice.py to fully implement estimation mode for this model.

Estimation mode changes

  • In estimation mode, choosers are filtered to those with a valid pnr_zone_id in the survey data.
  • After the choosers are written, the chooser index is added as a column to trn_accessible_choosers. The alternative and chooser IDs are set, and the axis name is removed from pnr_alts, which matches the approach used in other interaction models.
  • Choices and override choices are now written only for choosers that have alternatives. Choices are replaced with survey values before estimation ends.

Code cleanup

  • Some comments were removed.
  • Writing of the coefficients template is disabled, because this model doesn't use it.
  • Untested legacy code was removed from the estimation block, along with the writing of choices for choosers without alternatives.
  • Added an estimation notebook.

@stefancoe

stefancoe commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR is currently failing CI tests after estimation data bundles are built. Since an estimation notebook exists, CI expects the corresponding estimation files to be present as well. One option is to exclude the notebook from this test, but perhaps a better solution would be to modify the survey data to support park-and-ride estimation testing. Maybe we can discuss this at next week’s engineering meeting.

@i-am-sijia

Copy link
Copy Markdown
Member

This PR is currently failing CI tests after estimation data bundles are built. Since an estimation notebook exists, CI expects the corresponding estimation files to be present as well. One option is to exclude the notebook from this test, but perhaps a better solution would be to modify the survey data to support park-and-ride estimation testing. Maybe we can discuss this at next week’s engineering meeting.

Hi @stefancoe, I ran into the same issue when uploading the estimation notebooks for the telework arrangement and duration models that Amir requested. In addition to what you suggested, I think the following questions are worth discussing with the group:

  1. When a new component is added to ActivitySim, do we always require an example estimation notebook? Do we add more estimation notebooks if the content is nearly identical with the existing ones and they simply call LARCH methods?
    • Exception: the park-and-ride lot choice estimation notebook contains some bespoke code so the value of having it is obvious and uncontested.
  2. If the answer to No.1 is yes, does the new notebook also need to be included in the CI test?
  3. If the answer to No.2 is yes, should we add the necessary estimation files (fake survey data, configs) to the existing example MTC dataset, or create a new set for the SANDAG example? The current CI tests use the MTC example data.

@joecastiglione @ActivitySim/engineering

This branch has not been deployed

No deployments
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