ActivitySim / activitysim

An Open Platform for Activity-Based Travel Modeling
https://activitysim.github.io
BSD 3-Clause "New" or "Revised" License
194 stars 99 forks source link

Improve Joint Tour Participation Model #569

Open i-am-sijia opened 2 years ago

i-am-sijia commented 2 years ago

Joint tour frequency model generates household joint tours. Then joint tour composition model determines if a joint tour is: 1 = Adult-only, 2 = Children-only, 3 = Mixed. Lastly, joint tour participation model is applied to household members independently to determine if each member is participating in joint tours or not. Number of participants of a joint tour is an outcome of the tour participation model.

There are availability rules in the participation model, for example, adults cannot participate in children-only tours, and children cannot participate in adult-only tours. Such availability rules are implemented in joint tour participation UEC.

Because the participation model is applied to each person independently, a tour satisfaction step is implemented after persons' choices being made to check:

  1. A joint tour always has at least 2 participants
  2. A mixed joint tour has at least one adult and one child

For joint tours that do not satisfy those two criteria, the participation model will generate new random numbers and re-simulate persons' choices, until all joint tours are satisfied, or until it reaches max number of simulation, whichever condition is met first. If there are still joint tours unsatisfied when max number of simulation is reached, then the model crashes with warning: joint_tour_participation.eval_mnl.participants_chooser max iterations exceeded (5000). The default max number of simulation for participation model is 5000 in the current Activitysim code, users can change it in yaml file.

Some shortcomings of the tour participation model:

  1. doing monte carlo simulations over and over again adds run time, esp. when the probability to be chosen is low
  2. the participation model is very fragile when calibration constants are added/changed

Ideas for improvements:

  1. Set the max simulation to a smaller number, discard the tours that are unsatisfied in the end, instead of crashing the model
  2. Add a tour occupancy model that pre-determines the number of participants of each joint tour, which will be run before the tour participation model. Then in the tour participation model, pick the eligible household members ranked by utilities from high to low, up to the number of tour participants.

@jfdman feel free to add.

jfdman commented 2 years ago

A third option would be to build a choice set from household members and make a choice instead of using the utility ranking procedure. This would provide a lot of flexibility in terms of specifying the utility function (with interaction terms), and also eliminate the need for a party type model. For a 5 person household there would be 26 alternatives, for a 6-person household 56 alternatives. Certainly doable.