From daab5e3dba100718a927b354c7a7a9c2231aa080 Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 17 Aug 2022 10:15:43 +0200 Subject: [PATCH] rm transfers from start stations; fixes #88 --- DESCRIPTION | 2 +- codemeta.json | 2 +- src/traveltimes.cpp | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index efadbac9..7213c75c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: gtfsrouter Title: Routing with GTFS (General Transit Feed Specification) Data -Version: 0.0.5.099 +Version: 0.0.5.100 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), person("Marcin", "Stepniak", , "marcinstepniak@ucm.es", role = "aut", diff --git a/codemeta.json b/codemeta.json index 6b264363..a15de8ae 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ATFutures/gtfs-router", "issueTracker": "https://github.com/ATFutures/gtfs-router/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.0.5.099", + "version": "0.0.5.100", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/src/traveltimes.cpp b/src/traveltimes.cpp index 5e40b9c6..2760bb58 100644 --- a/src/traveltimes.cpp +++ b/src/traveltimes.cpp @@ -24,8 +24,12 @@ void iso::trace_forward_traveltimes ( if (departure_time [i] < start_time_min) continue; // # nocov - these lines already removed in R fn. - const bool is_start_stn = iso::is_start_stn (start_stations_set, - departure_station [i]); + // connections can also arrive at one of the departure stations, and + // these are also flagged as start stations to prevent transfers being + // constructed from the arrival/start station. + const bool is_start_stn = + iso::is_start_stn (start_stations_set, departure_station [i]) || + iso::is_start_stn (start_stations_set, arrival_station [i]); if (is_start_stn && departure_time [i] > start_time_max) continue;