Skip to content

Stop Models Design

Ben Stabler edited this page Apr 8, 2018 · 28 revisions

The ActivitySim example model follows TM1's design with respect to modeling immediate stops on tours (i.e. trips). In TM1, tours are first attributed with an intermediate stop frequency and then a series of sub-models are run to convert the tours + number of stops to trips. After creating a skeleton panda's data frame of all trips based on the tours and stop frequency, the trip sub-models are processed in vectorized form by adding the necessary fields in order to subset and filter records as needed.

The new sub-models, which are inserted after atwork_subtour_mode_choice, are:

The existing create_simple_trips sub-model will be deleted since it was a simple placeholder for trips. The existing trip_mode_choice_simulate sub-model will be upgraded.

Intermediate Stop frequency

  • For each tour
  • MNL model by each purpose
  • Alternatives: 16 (0 to 3 stops outbound + 0 to 3 stops inbound)
  • Notes:
    • This model should attribute each tour with a number of intermediate inbound stops and outbound stops
    • This model should create a trip table for the subsequent sub-models with the following fields: household id, person id(s), tour id, and stop/trip tour sequence identifiers such as first_trip_on_tour_inbound, intermediate_trip_on_tour_inbound, last_trip_on_tour_inbound, etc. since these are required for subsequent model expressions and for a vectorized implementation. An inbound trip for a tour with no inbound stops would have first_trip_on_tour_inbound=true, intermediate_trip_on_tour_inbound=false, and last_trip_on_tour_inbound=true.

Trip Purpose

  • For each intermediate stop on a tour (i.e. trip other than the last trip outbound to the tour primary destination or return home for the last trip inbound)
  • Each stop is assigned a purpose based on an observed frequency distribution
  • Notes:
    • The distribution is segmented by tour purpose, tour direction and person type. Work tours are also segmented by departure or arrival time period.

Trip destination choice sample

  • For each trip
  • Select X alternatives using a similar recipe as before except for two major revisions:
    • Condition the set of available alternatives by tour mode (for example, only alternatives that are within walking distance if the tour mode is walk-transit)
    • Sequentially process the trips from tour origin to destination when outbound and then tour destination to origin when inbound. When doing so, the model calculates out-of-direction distance for the stop location in two-parts: origin to alternative destination location + alternative destination location to next destination.
    • A new skim lookup key is required for this model. The existing @odt,@dot keys represent origin, destination, and time period. The @dpt key could be used to represent destination to primary destination for t, and @dht key could be used to represent destination to home for t. As a result, the out-of-direction distance trip destination choice would be @odt + @dpt for outbound and @odt + @dht for inbound. ?????
  • Alternatives: Zones

Joint tour primary destination choice sample logsums

  • For each joint tour
  • Calculate X mode choice logsums using the same recipe as work/school logsums for the sample
  • Alternatives: Sample of alternative zones
  • Notes:
    • @odt_skims - home taz, alternative taz, time period = Midday (MD)
    • @dot_skims - alternative taz, home taz, time period = Midday (MD)
    • Use the Joint tour frequency model purpose to lookup the relevant destination choice model by purpose

Joint tour primary destination final choice

  • For each joint tour
  • Select a final destination zone using the same recipe as work/school logsums for the final choice
  • Alternatives: Sample of alternative zones
  • Notes: Use the Joint tour frequency model purpose to lookup the relevant destination choice model by purpose

Joint tour time-of-day choice

  • For each joint tour
  • MNL model with new expressions file - tour_departure_and_duration_joint.csv
  • Alternatives: tour_departure_and_duration_alternatives.csv (same as the other purposes)
  • Notes:
    • Tour departure and arrival period combinations are restricted to only those available for each participant on the tour, after scheduling mandatory activities
    • Once the tour departure/arrival time combination is chosen, it is applied to all participants on the tour.

Joint tour mode choice

  • For each joint tour
  • MNL model that uses the existing expressions file - tour_mode_choice.csv
  • Alternatives: Same as the other purposes
  • Notes:
    • The next step in this task is to complete the partially implemented trip mode choice sub-model by adding walk and bike alternatives, support for all purposes, using the correct OD pairs and time periods, using actual trips instead of tours, etc.
Clone this wiki locally