conveyal / gtfs-lib

A library for loading and saving GTFS feeds of arbitrary size with disk-backed storage
BSD 2-Clause "Simplified" License
71 stars 38 forks source link

Pattern reconciliation refactor #349

Closed br648 closed 2 years ago

br648 commented 2 years ago

Checklist

Description

This PR addresses the issue of pattern stops and pattern locations being processed in series as part of the parent/child update in JDBCTableWriter. Pattern reconciliation (as well as pattern frequencies update) require all pattern stops and pattern locations to correctly update the stop times table.

JDBCTableWriter has been updated to collate pattern stops/locations and then triggers pattern reconciliation after the parent/child updates have been carried out. If pattern frequencies require updating this is triggered after pattern reconciliation so the cummulative travel times are correctly applied according to the updated pattern sequence.

This also addresses this bug: https://github.com/conveyal/gtfs-lib/pull/335#issuecomment-1079137841. See changes in src/main/java/com/conveyal/gtfs/model/StopTime.java.