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

Stops with single arrivals in both direction within hour are currently pruned #139

Closed kuanb closed 5 years ago

kuanb commented 5 years ago

Default stop cost calculation returns NaN for any stop where number of arrival times are less than 2.

Proposing this be modified. Since we now include the time frame being considered that is also assisting in calc'ing wait time. In addition, wait times for single arrival schedules should utilize the set fallback cost for the node, rather than being assigned NaN. This would also prevent a situation in which the node was receiving a NaN in both directions, thereby causing it to be pruned.

https://github.com/kuanb/peartree/blob/0c5073d8b62a49ea299e8e2c2df1369fc4dcb3ea/peartree/summarizer.py#L154-L163