Skip to content

Commit 482793f

Browse files
committed
revert stop time extraction to full stops values
1 parent 1a0cdc4 commit 482793f

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: m4ra
22
Title: Many-to-Many Multi-Modal Routing Aggregator
3-
Version: 0.1.1.054
3+
Version: 0.1.1.055
44
Authors@R:
55
person(given = "Mark",
66
family = "Padgham",

R/gtfs.R

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ m4ra_gtfs_traveltimes <- function (gtfs,
122122
res_i [res_i == .Machine$integer.max] <- NA_integer_
123123

124124
rownames (res_i) <- stops
125-
colnames (res_i) <- gtfs$stop_ids$stop_id
125+
colnames (res_i) <- gtfs$stops$stop_id
126126

127127
# diag (res_i) <- 0L # diagonals set in "prepare-data" routines
128128

@@ -140,13 +140,6 @@ m4ra_gtfs_traveltimes <- function (gtfs,
140140

141141
#' Main function to calculate intervals to next fastest connection, called from
142142
#' `m4ra_gtfs_traveltimes()` if `next_interval = TRUE`.
143-
#'
144-
#' @param res Result of rcpp_traveltimes as a list of matrices (n, 3), where n
145-
#' is the number of "stop_id" values in gtfs$stops. The 'gtfs_next_start_times'
146-
#' routine returns a matrix with number of rows equal to 'nrow(gtfs$stop_ids)',
147-
#' which is generally less, because that is unique IDs only. The two have to
148-
#' reconciled below.
149-
#'
150143
#' @noRd
151144
gtfs_next_intervals <- function (gtfs, stops, res, start_time_limits) {
152145

@@ -189,7 +182,7 @@ gtfs_next_intervals <- function (gtfs, stops, res, start_time_limits) {
189182
# diag (next_interval) <- NA_integer_
190183

191184
rownames (next_interval) <- stops
192-
colnames (next_interval) <- gtfs$stop_ids$stop_id
185+
colnames (next_interval) <- gtfs$stops$stop_id
193186

194187
return (next_interval)
195188
}
@@ -242,7 +235,7 @@ gtfs_next_start_times <- function (gtfs, stops, start_times, start_interval) {
242235
start_times [start_times == .Machine$integer.max] <- NA_integer_
243236

244237
rownames (start_times) <- stop_names
245-
colnames (start_times) <- gtfs$stop_ids$stop_id
238+
colnames (start_times) <- gtfs$stops$stop_id
246239

247240
# diag (start_times) <- 0L # diagonals set in prepare-data routines:
248241

R/prepare-data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ times_gtfs_to_gtfs_batch <- function (gtfs,
334334
fname_gtfs_intervals,
335335
quiet) {
336336

337-
stops <- unique (gtfs$stops$stop_id)
337+
stops <- gtfs$stops$stop_id
338338
nstops <- length (stops) # used only in progress bar
339339
index <- rep (
340340
seq (1L, ceiling (length (stops) / batch_size)),

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"codeRepository": "https://github.com/UrbanAnalyst/m4ra",
88
"issueTracker": "https://github.com/UrbanAnalyst/m4ra/issues",
99
"license": "https://spdx.org/licenses/GPL-3.0",
10-
"version": "0.1.1.054",
10+
"version": "0.1.1.055",
1111
"programmingLanguage": {
1212
"@type": "ComputerLanguage",
1313
"name": "R",

0 commit comments

Comments
 (0)