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

Long walk and bike distance trips #432

Closed esanchez01 closed 3 years ago

esanchez01 commented 3 years ago

While summarizing the SANDAG 3 Zone example outputs, we noticed that a small portion of the walk and bike trips exceeded their 3 and 8 miles limits, respectively. Since the SANDAG example relies heavily on the MTC example's configuration files, we ran the MTC example to see if the same issue existed, and it did. After investigating, the issue seems to be due to the following two expressions in trip_mode_choice.csv:

Label Description Expression WALK BIKE
util_Walk_not_available_for_long_distances Walk not available for long distances @df.tour_mode_is_walk & (od_skims['DISTWALK'] > 3) -999
util_Bike_not_available_for_long_distances Bike not available for long distances @df.tour_mode_is_walk & (od_skims['DISTBIKE'] > 8) -999

Although the distance limits are specified, they are only applied when the tour mode is walk (should instead be 'df.tour_mode_is_bike' for the bike expression?). Is this the intended behavior? If, for example, the tour mode for a trip is Drive Alone, it would be possible for a 'long' distance intermediate trip to be set as Walk as the expression does not cover this case.

After rerunning the MTC example with the revised expressions below, the maximum walk and bike distances were at or under their limits.

Label Description Expression WALK BIKE
util_Walk_not_available_for_long_distances Walk not available for long distances @od_skims['DISTWALK'] > 3 -999
util_Bike_not_available_for_long_distances Bike not available for long distances @od_skims['DISTBIKE'] > 8 -999
jpn-- commented 3 years ago

@bstabler, this looks like maybe a technical error that came up in the MTC model that RSG built earlier, want to take a look?

bstabler commented 3 years ago

I checked the travel model one UECs (tour mode choice and trip mode choice) and the ActivitySim setup is consistent. As a result, I'm hesitant to revise the example.