Skip to content

Fix park-and-ride skim validation with Sharrow - #1113

Merged
jpn-- merged 1 commit into
ActivitySim:mainfrom
driftlesslabs:fix/1111-pnr-sharrow-skim-validation
Sep 9, 2026
Merged

Fix park-and-ride skim validation with Sharrow#1113
jpn-- merged 1 commit into
ActivitySim:mainfrom
driftlesslabs:fix/1111-pnr-sharrow-skim-validation

Conversation

@jpn--

@jpn-- jpn-- commented Sep 9, 2026

Copy link
Copy Markdown
Member

Park-and-ride lot choice crashes with Sharrow when TRANSIT_SKIMS_FOR_ELIGIBILITY is configured because validation accesses skim_info, which SkimDataset does not expose.

In this PR, we add a common membership interface to SkimDict and SkimDataset and use it to validate eligibility skims before lookup. Both backends now accept 2D names and valid (name, time period) keys while retaining the actionable settings error for invalid keys.

Add 44 parameterized unit/regression cases using concrete NumPy and Sharrow skim backends. Coverage includes 2D and AM/PM skims, combined accessibility across lots and skims, repeated destinations and output order, missing/negative values, no accessible destinations, and invalid skim names or periods.

Validation:

  • 81 tests passed across test_pnr_skim_eligibility.py, test_park_and_ride_models.py, test_skim.py, and test_los.py.
  • All configured pre-commit hooks passed.
  • Restoring the original validation in memory reproduced AttributeError: 'SkimDataset' object has no attribute 'skim_info' in all five Sharrow filtering regression cases.

The original password-protected inputs were unavailable; validation uses synthetic skims rather than a full run of the reported model.

Fixes #1111.

Note: This PR authored by GPT-6-Astra-Medium.

@jpn--

jpn-- commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@bricegnichols Can you confirm if this PR address the problem?

@bricegnichols

Copy link
Copy Markdown
Contributor

Yes, @jpn-- this solves the issue. Thank you!

@jpn--
jpn-- merged commit 5c6fae2 into ActivitySim:main Sep 9, 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.

park_and_ride_lot_choice fails with sharrow

2 participants