trRouting
trRouting copied to clipboard
Handle GTFS Trips block_id values
block_id is used to broadcast sequential trips made using the same vehicle. The field is often used in suburban pendular looping routes where the last stop is a regular stop. In those cases, the operator considers that stop a terminus only for the purpose of setting the "destination" of the loop line. In reality, the vehicle just keeps going until it gets back to the main terminal. As of now, trRouting make a passenger drop off the vehicle at this stop and makes him wait for the next trip if the minimum waiting time value is more than 0 (as it is considered a transfer).
Handling of block_id values would fix this and return the real trip as it is provided by the operator, resulting in more accurate results.
This is rather complicatd because after a transfer, trRouting doesn't know how it reached the stop, and the path to reach the stop can change afterward, so we cannot look at matching block ids in the current implementation. This needs further analysis.
Idea: when reaching the last connection of a trip 1 that has the same block_id as a trip 2, we could simply activate trip 2 first connection.