derhuerst / generate-gtfs-flex

Given a GTFS Static feed, add GTFS Flex v2 to model on-demand public transport service.
ISC License
6 stars 4 forks source link

Duplicate stop locations in flex trips #5

Closed leonardehrenfried closed 3 years ago

leonardehrenfried commented 3 years ago

Related to https://github.com/mfdz/OpenTripPlanner/issues/101

In order to implement Herrenberg's on demand taxi rules where you are only allowed to get on the taxi at a bus stop but off the taxi anywhere inside a 300m radius of a stop, we decided on the following implementation:

And so every stop_times row would be present twice:

/cc @flaktack @hbruch

Since this might confuse the production system, please create a new feed hbg4.

Fixes: https://github.com/stadtnavi/digitransit-ui/issues/571

derhuerst commented 3 years ago

So, to clarify, a trip trip-1 should look like this within stop_times?

trip_id stop_sequence stop_id arrival_time departure_time start_pickup_dropoff_window end_pickup_dropoff_window pickup_type drop_off_type pickup_booking_rule_id drop_off_booking_rule_id
trip-1 0 A 15:13:13 15:13:13 2 1 herrenberg-rufbusse herrenberg-rufbusse
trip-1 1 B 15:23:23 15:23:23 2 1 herrenberg-rufbusse herrenberg-rufbusse
trip-1 2 C 15:33:33 15:33:33 2 1 herrenberg-rufbusse herrenberg-rufbusse
trip-1 0 A-300m 15:12:43 15:13:43 1 3 herrenberg-rufbusse
trip-1 1 B-300m 15:22:53 15:23:53 1 3 herrenberg-rufbusse
trip-1 2 C-300m 15:33:03 15:34:03 1 3 herrenberg-rufbusse

edit: adapted to how it should be, after having a quick call

derhuerst commented 3 years ago
trip_id arrival_time departure_time stop_id stop_sequence stop_headsign pickup_type drop_off_type shape_dist_traveled pickup_booking_rule_id drop_off_booking_rule_id start_pickup_dropoff_window end_pickup_dropoff_window timepoint
1.T0.50-779-j21-1.1.H 21:51:00 21:51:00 de:08115:4512:5:F 1 Im Vogelsang 0 1 0.00 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:4512:5:F-flex 2 Im Vogelsang 1 3 0.00 herrenberg-citybus herrenberg-citybus 21:50:30 21:51:30 0
1.T0.50-779-j21-1.1.H 21:52:00 21:52:00 de:08115:3237:0:3 3 0 1 339.34 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:3237:0:3-flex 4 1 3 339.34 herrenberg-citybus herrenberg-citybus 21:51:30 21:52:30 0
1.T0.50-779-j21-1.1.H 21:53:00 21:53:00 de:08115:7055:0:3 5 0 1 798.67 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7055:0:3-flex 6 1 3 798.67 herrenberg-citybus herrenberg-citybus 21:52:30 21:53:30 0
1.T0.50-779-j21-1.1.H 21:54:00 21:54:00 de:08115:7056:0:3 7 0 1 934.77 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7056:0:3-flex 8 1 3 934.77 herrenberg-citybus herrenberg-citybus 21:53:30 21:54:30 0
1.T0.50-779-j21-1.1.H 21:55:00 21:55:00 de:08115:7057:0:3 9 Herrenberg ZOB 0 1 1186.29 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7057:0:3-flex 10 Herrenberg ZOB 1 3 1186.29 herrenberg-citybus herrenberg-citybus 21:54:30 21:55:30 0
1.T0.50-779-j21-1.1.H 21:56:00 21:56:00 de:08115:7042:0:3 11 0 1 1599.97 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7042:0:3-flex 12 1 3 1599.97 herrenberg-citybus herrenberg-citybus 21:55:30 21:56:30 0
1.T0.50-779-j21-1.1.H 21:57:00 21:57:00 de:08115:7059:0:3 13 0 1 2010.65 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7059:0:3-flex 14 1 3 2010.65 herrenberg-citybus herrenberg-citybus 21:56:30 21:57:30 0
1.T0.50-779-j21-1.1.H 21:58:00 21:58:00 de:08115:7040:0:3 15 0 1 2202.08 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:7040:0:3-flex 16 1 3 2202.08 herrenberg-citybus herrenberg-citybus 21:57:30 21:58:30 0
1.T0.50-779-j21-1.1.H 22:01:00 22:01:00 de:08115:4512:5:F 17 0 1 3193.27 herrenberg-citybus herrenberg-citybus 1
1.T0.50-779-j21-1.1.H herrenberg-citybus-300m-de:08115:4512:5:F-flex 18 1 3 3193.27 herrenberg-citybus herrenberg-citybus 22:00:30 22:01:30 0