kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

Allow for custom logic to handle unbalanced arrival distributions #109

Closed kuanb closed 5 years ago

kuanb commented 5 years ago

Multi-peak, or multimodal, distribution can occur when evaluation a route schedule's arrival time to a given stop. In such situations, a user should allowed to pass in a custom function to be applied in handling the calculation of that stop time.

By default, the wait time calculation should be preserved as just the mean wait time (time between arrivals), halved. But, the user could pass in a more nuanced method that could capture, say, clustering around a bimodal distribution, instead to optimistically compute a lower wait cost.