Skip to content

2025-10-09 Engineering Team #31

@jpn--

Description

@jpn--

@ActivitySim/engineering

Agenda

  • PopulationSim release prep: what version? Latest release was 0.5.1, pyproject.toml now says 0.9.2
  • Implementation review on TransLink & ODOT's park-and-ride solution ActivitySim#965 ActivitySim#1001
  • Recommend next steps (cost, schedule, expected value) on EET.
    • random number generation
    • simple random sampling for destinations
    • stratified random sampling for destinations
    • other?
  • Updates on 11B tasks
    • Consolidated Error Definitions (CS) -- Opened ActivitySim#1000
    • Trace files consistent hash (CS)
    • UV Support (WSP + All)
    • Clean up loggging (CS)
    • Consistent Alternatives File Formatting (RSG)
    • Trip Scheduling Choice Reproducible Random (RSG)
    • Fix Shadow Price Zones Reopening (RSG)
    • Global Option to Skip Households on Fail (WSP)
    • Example SANDAG Model Update (WSP) -- Opened sandag-abm3-example#37
    • SANDAG Sharrow Performance Optimization (DL)

Meeting Notes: Zephyr Foundation Engineering Call

Date: 2025-10-09
Duration: 1 hour 1 minute
Attendees: Joe Castiglione, Sijia Wang, Jeff Newman, David Hensle, Stefan Coe, Sumit, Joel Freedman, Guy Rousseau, Jilan Chen, Cherry Liu

1. Population Sim Release Version Discussion

Discussion

  • Last consortium release was numbered 0.5.1
  • Recent pull request from RSG shows version 0.9.2 in pyproject.toml
  • Concern about version number conflicts and maintaining clarity across users

Decision

  • Skip to version 0.10 for next release to avoid confusion
  • Release notes will explain the version number skip
  • No objections from team members

2. Explicit Error Term (EET) Runtime Optimization

Current Issues

  • Runtime is the primary concern with EET implementation
  • Location choice models now account for disproportionate share of overall runtime
  • EET destination choice models require random number draws plus two exponentiations per alternative (22,000 alternatives at MAZ level)

Three Proposed Approaches

A. Random Number Generation Modernization

  • Current system uses expensive re-seeding method (Mersenne Twister)
  • Modern NumPy generators use only 128-bit state (2 doubles) vs. kilobyte-sized state
  • Could store random number generator state per tour/household/trip
  • Status: Prototyping and testing needed
  • Concerns: Memory implications need assessment; implementation complexity

B. Sampling Method Changes

  • Switch from importance sampling to simple random sampling or stratified random sampling
  • Expected to significantly reduce runtime for destination choice
  • Status: Joel indicates high confidence this would solve EET runtime issues
  • Concerns:
    • Not just a software issue - requires extensive testing for model sensitivities
    • Implications for existing calibrated models unclear
    • Could require more substantial changes than anticipated

C. Disaggregate Accessibilities Investigation

  • Address unexplained changes in unaffected zones
  • Status: Lower priority; needs scoping

External Input

  • Sumit reported Bentley (Momo conference) claims to have solved runtime explosion issue
  • Team will reach out to inquire about their approach before committing to direction

Action Items

  • Engineering team to write discrete scopes for:
    1. Random number generation prototyping (3-month timeframe)
    2. Sampling method investigation and testing
    3. Disaggregate accessibilities (if prioritized)
  • Submit scopes to product/community team and executive team for prioritization
  • Contact Bentley/Peter about their EET implementation approach

Consensus

  • Random number generation: Broadly supported for prototyping
  • Sampling methods: High potential but requires careful testing of model impacts
  • Disaggregate accessibilities: Deferred pending scoping and resource availability

3. Park and Ride (P&R) Methodology and Implementation

Presenter: David Hensle

Current P&R Implementation (Most ActivitySim Models)

  • Assignment software handles P&R via hyperpaths across multiple lots
  • Cannot distinguish actual parking location
  • Generates expensive inbound/outbound P&R skims (doubled transit skims)
  • Capacity constraints difficult/impossible to implement in demand model
  • Stops not allowed on P&R tours (car location unknown)
  • Trip mode choice either restricts to P&R or allows inconsistent modes

Proposed New Methodology

Core Concept

  • Add P&R lot choice model before tour mode choice
  • Explicitly select parking lot based on:
    • Auto time from origin to lot
    • Walk transit time from lot to destination
    • Calculated for both directions and all P&R locations

Benefits

  • Eliminate dedicated P&R skims (use auto + walk transit skims instead)
  • Direct control over utility specifications (terminal time, costs, etc.)
  • Enable capacity tracking and constraints
  • Support iterative capacity enforcement

Capacity Constraint Mechanism

  1. Run P&R lot choice to determine which lot would be used
  2. Calculate tour mode choice utilities using selected lot
  3. Count tours actually selecting P&R at each lot
  4. Turn off capacitated lots
  5. Re-simulate tours that can't fit (switch to alternative mode or lot)
  6. Iterate until convergence

Time-of-Day Handling

  • Tours simulated simultaneously throughout day
  • When lot fills, tours departing after fill time are re-simulated
  • Lots remain full for entire day (don't reopen) - reasonable for planning purposes per Jeff Newman

Implementation Details

  • Filter destinations without transit access to reduce computation
  • Land use file specifies formal and informal parking capacity per zone
  • Iteration settings include:
    • On/off toggle for capacity constraints
    • Maximum iterations before timeout
    • Tolerance threshold for convergence
    • Resample strategy (latest tours vs. random)
  • Output: Park and ride zone ID in tours table

Questions Raised

Joe (Zephyr Foundation)

  • Runtime implications need confirmation, especially with re-simulation
  • Time-of-day mechanics need clearer documentation
  • Convergence properties critical (referenced DaySim implementation that never converged - ended up using arbitrarily high capacities)
  • Need path to integration testing with example dataset

Guy Rousseau

  • Cardinal orientation handled through utilities (drive time + transit time naturally optimizes location selection)

Stefan Coe

  • Behavioral approach more sensible than shadow pricing
  • P&R zones can be own MAZ or within existing MAZ

Jilan Chen

  • Lot choice runs for each tour initially, then only for re-simulation
  • Informal parking can be included via land use fields (formal + informal capacity)

Sijia Wang

  • Transit mode variety between lots (walk premium vs. walk local) - David confirmed both would be in utilities like regular tour mode choice

Cherry Liu

  • In/out tracking - Clarified lots stay full for day once capacitated (planning vs. operational model)

Limitations

  • Tours can only change mode during iteration (not destination or time-of-day)
  • Minimal runtime impact expected (only re-simulating constrained tours)
  • Requires running P&R lot choice during logsum calculations

Status

  • Implementation complete
  • Full-scale testing in progress
  • Need to validate: convergence, runtime performance, lot filling behavior

Next Steps

  • Continue extensive testing
  • Discuss integration into consortium examples
  • Future session: utility building details

4. 11B Tasks Status Check (Deferred)

Decision

  • Not enough time to cover in this meeting
  • Next week's meeting (Thursday) canceled - Jeff Newman and David Hensle unavailable
  • Team members to provide asynchronous status updates on 11B tasks via meeting thread
  • Updates encouraged before next scheduled meeting

Action Items Summary

Owner Action Timeline
Engineering Team Write scopes for EET tasks (random number generation, sampling methods, disaggregate accessibilities) TBD
Team Contact Bentley/Peter about EET runtime solution ASAP
David Hensle Continue full-scale P&R testing (convergence, runtime, behavior) Ongoing
All Post 11B task status updates to meeting thread Before next meeting
Joe (Zephyr) Cancel next week's engineering call Complete

Next Meeting

  • Next scheduled call: Two weeks from this meeting
  • Format: Regular synchronous meeting

Metadata

Metadata

Assignees

No one assigned

    Labels

    meetingMeeting notes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions