From 7a8153b2370cc3f1e7780c651170694a9cd683d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:29:05 +0000 Subject: [PATCH 01/13] Rebuild JAR for commit 0cdaab039999b8c8e4e84836a9e972be140a00a3 --- r-package/inst/jar/r5r.jar | Bin 120663 -> 120663 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/r-package/inst/jar/r5r.jar b/r-package/inst/jar/r5r.jar index f26b4eab69f717243c000ec82b6989ad375a303a..ecd66c3ede974118b0e7c63299bd441ebb097eeb 100644 GIT binary patch delta 1899 zcmZuxeN5DK82>)MLpb0d;E=a?IbP&lI4Is~ya;Ys)I=u}Woa4?gBHSUT8#zKicnPi zu{{&GFow89iM)zoTiS$phXYReC(AZ68;o?*)tW)i^Scf@=(fA(`+Z(MpU?Arzu%kf zc9`vU(B$W->^y}~t3`WPqb5S4-=sXLwX5;{5dQ6qkPKaolQFcG<8p&Aa}3n-@6{UG z8<2>MfDL zk?VT*z5`!7vS(*G*gLbQCmXJMu%}W3Ene(-Din?>f;uw5$&NjBdhm1QoZLhtFM+qFz9Y^Is4-c0I!5@zdf-jvRo*0BIO2hF%(6gmr5|v}}5b*dgcoh7l2LknD;2oQvw+htS zb#(VZf44=SAR%gVgh&vppN^VMz!jM~&f0qT?86p!A>zY@h+0h&9W^I)3NAhvrE@ty zN{Wc_8)kenaV4T-XPp`RRRd`PFPb4hK{YJ*o9{_N)Nc?X&Ia{y8dfww1Ulb>jY{gT zhxc9h-dBj`Od+CeQX|qi)e{G9Lm1O+xlPS&FOeSaF_3q?B?j7Vr1}59ET&w)90uA#QrnRBa&d zyuoErST2Lw2A7U>?=a!|9K++o5XsF}4AK7GW;{IvQM_Loqy6?)xnUpx)5bxg%uc(r zK`K%S@q&6SRXt}WtR+$IOX7LFkqtg*G6CN~ykjEd62<9_rz8kO{S-Yy()7a&MJg|G zx-V+Y7GYKFjQ*0H-uQMo-PVa2&;%RkE}hfw2rTmuA}>OS7@N)$uM2!Q4XMnRF+~9P zrYr!X8KmUI6nHRS8%JvITli8#!B0`5blQ6SX#5rGR7;(1v4MW_cm*kTZNEzlsQ$~6 z@VOpBEUl4<815oWjWyHM#j7*$bTB`LoKLl{6uJpfw^@h)8y1fc!0(13nj28lQK>E@ zg6!+M311qv%!)^=x|ITQX0F#-8RH`qb4mr=K0-a&^HZX3tJxd-GGN;X#Ii%rj_bur zT0A={=*(5+6(IlI=eha6_mGDzN2Gq0>?}l%j}U=2TH7lCr^bN)?J=F6rsP?LMP}Mt zA)yxJ9dqj;%lkij%g;^-a1tWY2J%@;g#*QX{)Vbezp_Z-HX|GfwK z`^}A!AVd#+=_;&zI%?)oVaC!4(6OAm6I5S#PH_^r3+g7pSGh}Dbv;YFNQ)zB30pxB z^uKho-I~r?>`*rW{1=WV8Eel)Yf!uP6rN|TU6-wKJFJ`pKQ6pRPfay*mBuUu<4Nv} V2A4;#LgoA|V5tehFlQD#{{hy(SnmJ; delta 1994 zcmZuyeN2^Q6hG%)gnQvaAm4U@D3VV8sHLy&5bnqXh}Ll zxXuR<3W#A^u;n!g*C;m|f*1LgzcO>R=^)hAteMQtdEeWm_uBi%`<(ZD{Lb&3=RD6l z*Y7sh@1`?nt6ls6G#c33+@y9GkpJ5I?725-V;LVZV-r)a}?5$U;CW8vN}pVHPuLywvbt4%QaK z9Urn=s}pnGcr{{i82fwHW0+{Gz?Jkd&|iV&OuK{sc%m7Q95 zuf5Gxd5v?X+MED@(L~G9&KE85kAtknsht4?Yi+!D$dgyUC#$@8)jW3REY{5LE=t8D zXmBBz6{btBT$J_w3zsE^h9fx7oGp`S>sgN*6Szw2&V9eCczw5ML0a$cPjlz*EqSq0 zqNEJnD*nzYZCB|~<){94gT=F9)Qj?A45ob+Cx&q|xrwo1OyHG_$-J7bBR5q{*if%} z2x8HOYgcoP3;M$QPuu~90s#!L{PfgbQ-PSgh3h!1Z<4~EdWx%w80BToR^)GB$T(lo zYr~f$$gD2k!hCOlhIIfT%ZSiZ+h_t&JBcw2S#h1h!e0@OQZO)130akwVEau~t^=44 z1qfF_Hd(5Cdt7#D6z`=d-CFR9?;twVtjL)qq z*enU@fUF<@>Y?MIZ5u=w~KzTixA7e{r?I2^R%lUbU4O23;!b+_4~7p=E2P@2Uxxjvr(&EmGz05l+u zr>AzqFCebY;5LrUVd^LT;Mf>xe@J;|4)yB!zd(e|VWjfJ@#w0fR4BG+Fkqc?>o;`_ zo3CgA?$VGYITCWS3MgdtP5FQx9w&^wIvInn7BMm|-Gkyswx}cQmdp3_j#>O-f-Hv< zWQ({nfqa9Abk??HI*{T-2hFZjeQUxSp=B!pvZDcF6;yg&wxi^aBmWeHH=S^Gey*fl z^IT2mUHmo;(k!E4p_#4R`Fd*J(N zO6>Xp3gZzB6-(3dbX=uVqyGIP6n922g!w&VMZ|Hm94(3xTSw7f%2Rsf!_?C%fcq-| zk`)E!o|IkB-$1?Ox>)Sd`zg6@CRb$%>8IE=(RtKj>0VRESY()T8wN-)bsPJt=jmqZ zqEi*A$XMLLu3@5XO5VqUQHpQAfTDU7Q>0i;Y|7akL}9=Mz@&)nye6m7+0a*H&7t2v DvT8IE From 8b4f9abdfbae5bb67a1a71e7c4ef5466aaaf0bd7 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Tue, 21 Nov 2023 19:06:25 -0300 Subject: [PATCH 02/13] update news --- README.md | 1 - r-package/NEWS.md | 7 +++ r-package/tests/tests_rafa/r5r_arrow.R | 71 ++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 r-package/tests/tests_rafa/r5r_arrow.R diff --git a/README.md b/README.md index 6bed1a4b..e0bbaf9f 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,6 @@ BibTeX: shorttitle = {r5r}, url = {https://findingspress.org/article/21262-r5r-rapid-realistic-routing-on-multimodal-transport-networks-with-r-5-in-r}, doi = {10.32866/001c.21262}, - abstract = {Routing is a key step in transport planning and research. Nonetheless, researchers and practitioners often face challenges when performing this task due to long computation times and the cost of licensed software. R{\textasciicircum}5{\textasciicircum} is a multimodal transport network router that offers multiple routing features, such as calculating travel times over a time window and returning multiple itineraries for origin/destination pairs. This paper describes r5r, an open-source R package that leverages R{\textasciicircum}5{\textasciicircum} to efficiently compute travel time matrices and generate detailed itineraries between sets of origins and destinations at no expense using seamless parallel computing.}, language = {en}, urldate = {2021-03-04}, journal = {Findings}, diff --git a/r-package/NEWS.md b/r-package/NEWS.md index 25039bb7..70d6bb92 100644 --- a/r-package/NEWS.md +++ b/r-package/NEWS.md @@ -1,3 +1,10 @@ +# r5r 1.1.0999 dev + +**Minor changes** + +- In the `accessibility()` function, the value of `max_trip_duration` is now capped by the max value passed to the `cutoffs` parameter. Closes [#342](https://github.com/ipeaGIT/r5r/issues/348). + + # r5r 1.1.0 **Major changes** diff --git a/r-package/tests/tests_rafa/r5r_arrow.R b/r-package/tests/tests_rafa/r5r_arrow.R new file mode 100644 index 00000000..bda86091 --- /dev/null +++ b/r-package/tests/tests_rafa/r5r_arrow.R @@ -0,0 +1,71 @@ +# allocate RAM memory to Java +options(java.parameters = "-Xmx2G") + +# 1) build transport network, pointing to the path where OSM and GTFS data are stored +library(r5r) +library(arrow) +library(dplyr) + + +path <- system.file("extdata/poa", package = "r5r") +r5r_core <- setup_r5(data_path = path, verbose = FALSE) + +# 2) load origin/destination points and set arguments +points <- read.csv(system.file("extdata/poa/poa_hexgrid.csv", package = "r5r")) +mode <- c("WALK", "TRANSIT") +max_walk_time <- 30 # minutes +max_trip_duration <- 60 # minutes +departure_datetime <- as.POSIXct("13-05-2019 14:00:00", + format = "%d-%m-%Y %H:%M:%S") + +# 3.1) calculate a travel time matrix +ttm <- travel_time_matrix(r5r_core = r5r_core, + origins = points, + destinations = points, + mode = mode, + departure_datetime = departure_datetime, + max_walk_time = max_walk_time, + max_trip_duration = max_trip_duration, + output_dir = './aaaa') + + + +csv_files <- list.files(path = './aaaa', full.names = TRUE) + +# Define the dataset +DS <- arrow::open_csv_dataset(sources = csv_files) + +# Create a scanner +O <- Scanner$create(DS) + +# Load it as Arrow Table in memory +AT <- SO$ToTable() + + +# prep land use data +jobs_df <- select(points, c('id', 'jobs', 'healthcare')) + +# merge jobs +AT <- left_join(AT, jobs_df, by = c('to_id' = 'id')) + +head(AT) |> collect() + +# calculate cumulative access in less than 20 min. +access_df <- AT |> + filter(travel_time_p50 <= 20) |> + group_by(from_id) |> + summarise(access = sum(jobs)) |> + collect() + +head(access_df) + + +# calculate access to closest healthcare facility +access_df2 <- AT |> + filter(healthcare > 0) |> + group_by(from_id) |> + summarise(access = min(jobs)) |> + collect() + +head(access_df2) + From f7dd1ae32ca51a6d1ce3851915dfee66ccaada71 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Thu, 23 Nov 2023 19:02:25 -0300 Subject: [PATCH 03/13] closes #353 --- r-package/NEWS.md | 2 ++ r-package/man/accessibility.Rd | 30 +++++++++++-------- r-package/man/detailed_itineraries.Rd | 30 +++++++++++-------- r-package/man/expanded_travel_time_matrix.Rd | 30 +++++++++++-------- r-package/man/pareto_frontier.Rd | 30 +++++++++++-------- r-package/man/r5r.Rd | 2 +- .../man/roxygen/templates/common_arguments.R | 30 +++++++++++-------- r-package/man/travel_time_matrix.Rd | 30 +++++++++++-------- 8 files changed, 111 insertions(+), 73 deletions(-) diff --git a/r-package/NEWS.md b/r-package/NEWS.md index 70d6bb92..03aa96ed 100644 --- a/r-package/NEWS.md +++ b/r-package/NEWS.md @@ -3,6 +3,8 @@ **Minor changes** - In the `accessibility()` function, the value of `max_trip_duration` is now capped by the max value passed to the `cutoffs` parameter. Closes [#342](https://github.com/ipeaGIT/r5r/issues/348). +- Updated documentation of parameter `max_walk_time` to make it clear that in walk-only trips, whenever `max_walk_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) +- Updated documentation of parameter `max_bike_time` to make it clear that in bicycle-only trips, whenever `max_bike_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) # r5r 1.1.0 diff --git a/r-package/man/accessibility.Rd b/r-package/man/accessibility.Rd index f9740759..9ed8e8f3 100644 --- a/r-package/man/accessibility.Rd +++ b/r-package/man/accessibility.Rd @@ -111,20 +111,26 @@ understand how this object is structured: calculating the fastest journey between each origin and destination pair.} \item{max_walk_time}{An integer. The maximum walking time (in minutes) to -access and egress the transit network, or to make transfers within the -network. Defaults to no restrictions, as long as \code{max_trip_duration} is -respected. The max time is considered separately for each leg (e.g. if -you set \code{max_walk_time} to 15, you could potentially walk up to 15 minutes -to reach transit, and up to \emph{another} 15 minutes to reach the destination -after leaving transit). Defaults to \code{Inf}, no limit.} +access and egress the transit network, to make transfers within the network +or to complete walk-only trips. Defaults to no restrictions (numeric value +of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_walk_time} to 15, you could get trips with an up to 15 minutes +walk leg to reach transit and another up to 15 minutes walk leg to reach +the destination after leaving transit. In walk-only trips, whenever +\code{max_walk_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_bike_time}{An integer. The maximum cycling time (in minutes) to -access and egress the transit network. Defaults to no restrictions, as long -as \code{max_trip_duration} is respected. The max time is considered separately -for each leg (e.g. if you set \code{max_bike_time} to 15 minutes, you could -potentially cycle up to 15 minutes to reach transit, and up to \emph{another} 15 -minutes to reach the destination after leaving transit). Defaults to \code{Inf}, -no limit.} +access and egress the transit network, to make transfers within the network +or to complete bicycle-only trips. Defaults to no restrictions (numeric +value of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_bike_time} to 15, you could get trips with an up to 15 minutes +cycle leg to reach transit and another up to 15 minutes cycle leg to reach +the destination after leaving transit. In bicycle-only trips, whenever +\code{max_bike_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_car_time}{An integer. The maximum driving time (in minutes) to access and egress the transit network. Defaults to no restrictions, as long diff --git a/r-package/man/detailed_itineraries.Rd b/r-package/man/detailed_itineraries.Rd index bbdde6be..96beca47 100644 --- a/r-package/man/detailed_itineraries.Rd +++ b/r-package/man/detailed_itineraries.Rd @@ -82,20 +82,26 @@ understand how this object is structured: calculating the fastest journey between each origin and destination pair.} \item{max_walk_time}{An integer. The maximum walking time (in minutes) to -access and egress the transit network, or to make transfers within the -network. Defaults to no restrictions, as long as \code{max_trip_duration} is -respected. The max time is considered separately for each leg (e.g. if -you set \code{max_walk_time} to 15, you could potentially walk up to 15 minutes -to reach transit, and up to \emph{another} 15 minutes to reach the destination -after leaving transit). Defaults to \code{Inf}, no limit.} +access and egress the transit network, to make transfers within the network +or to complete walk-only trips. Defaults to no restrictions (numeric value +of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_walk_time} to 15, you could get trips with an up to 15 minutes +walk leg to reach transit and another up to 15 minutes walk leg to reach +the destination after leaving transit. In walk-only trips, whenever +\code{max_walk_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_bike_time}{An integer. The maximum cycling time (in minutes) to -access and egress the transit network. Defaults to no restrictions, as long -as \code{max_trip_duration} is respected. The max time is considered separately -for each leg (e.g. if you set \code{max_bike_time} to 15 minutes, you could -potentially cycle up to 15 minutes to reach transit, and up to \emph{another} 15 -minutes to reach the destination after leaving transit). Defaults to \code{Inf}, -no limit.} +access and egress the transit network, to make transfers within the network +or to complete bicycle-only trips. Defaults to no restrictions (numeric +value of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_bike_time} to 15, you could get trips with an up to 15 minutes +cycle leg to reach transit and another up to 15 minutes cycle leg to reach +the destination after leaving transit. In bicycle-only trips, whenever +\code{max_bike_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_car_time}{An integer. The maximum driving time (in minutes) to access and egress the transit network. Defaults to no restrictions, as long diff --git a/r-package/man/expanded_travel_time_matrix.Rd b/r-package/man/expanded_travel_time_matrix.Rd index dbd4a921..39b57df6 100644 --- a/r-package/man/expanded_travel_time_matrix.Rd +++ b/r-package/man/expanded_travel_time_matrix.Rd @@ -64,20 +64,26 @@ time of each trip. Please note that setting this parameter to \code{TRUE} makes the function significantly slower.} \item{max_walk_time}{An integer. The maximum walking time (in minutes) to -access and egress the transit network, or to make transfers within the -network. Defaults to no restrictions, as long as \code{max_trip_duration} is -respected. The max time is considered separately for each leg (e.g. if -you set \code{max_walk_time} to 15, you could potentially walk up to 15 minutes -to reach transit, and up to \emph{another} 15 minutes to reach the destination -after leaving transit). Defaults to \code{Inf}, no limit.} +access and egress the transit network, to make transfers within the network +or to complete walk-only trips. Defaults to no restrictions (numeric value +of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_walk_time} to 15, you could get trips with an up to 15 minutes +walk leg to reach transit and another up to 15 minutes walk leg to reach +the destination after leaving transit. In walk-only trips, whenever +\code{max_walk_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_bike_time}{An integer. The maximum cycling time (in minutes) to -access and egress the transit network. Defaults to no restrictions, as long -as \code{max_trip_duration} is respected. The max time is considered separately -for each leg (e.g. if you set \code{max_bike_time} to 15 minutes, you could -potentially cycle up to 15 minutes to reach transit, and up to \emph{another} 15 -minutes to reach the destination after leaving transit). Defaults to \code{Inf}, -no limit.} +access and egress the transit network, to make transfers within the network +or to complete bicycle-only trips. Defaults to no restrictions (numeric +value of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_bike_time} to 15, you could get trips with an up to 15 minutes +cycle leg to reach transit and another up to 15 minutes cycle leg to reach +the destination after leaving transit. In bicycle-only trips, whenever +\code{max_bike_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_car_time}{An integer. The maximum driving time (in minutes) to access and egress the transit network. Defaults to no restrictions, as long diff --git a/r-package/man/pareto_frontier.Rd b/r-package/man/pareto_frontier.Rd index 381f1c22..784043bd 100644 --- a/r-package/man/pareto_frontier.Rd +++ b/r-package/man/pareto_frontier.Rd @@ -71,20 +71,26 @@ specified at a time. For more details, please see R5 documentation at \url{https://docs.conveyal.com/analysis/methodology#accounting-for-variability}.} \item{max_walk_time}{An integer. The maximum walking time (in minutes) to -access and egress the transit network, or to make transfers within the -network. Defaults to no restrictions, as long as \code{max_trip_duration} is -respected. The max time is considered separately for each leg (e.g. if -you set \code{max_walk_time} to 15, you could potentially walk up to 15 minutes -to reach transit, and up to \emph{another} 15 minutes to reach the destination -after leaving transit). Defaults to \code{Inf}, no limit.} +access and egress the transit network, to make transfers within the network +or to complete walk-only trips. Defaults to no restrictions (numeric value +of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_walk_time} to 15, you could get trips with an up to 15 minutes +walk leg to reach transit and another up to 15 minutes walk leg to reach +the destination after leaving transit. In walk-only trips, whenever +\code{max_walk_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_bike_time}{An integer. The maximum cycling time (in minutes) to -access and egress the transit network. Defaults to no restrictions, as long -as \code{max_trip_duration} is respected. The max time is considered separately -for each leg (e.g. if you set \code{max_bike_time} to 15 minutes, you could -potentially cycle up to 15 minutes to reach transit, and up to \emph{another} 15 -minutes to reach the destination after leaving transit). Defaults to \code{Inf}, -no limit.} +access and egress the transit network, to make transfers within the network +or to complete bicycle-only trips. Defaults to no restrictions (numeric +value of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_bike_time} to 15, you could get trips with an up to 15 minutes +cycle leg to reach transit and another up to 15 minutes cycle leg to reach +the destination after leaving transit. In bicycle-only trips, whenever +\code{max_bike_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_car_time}{An integer. The maximum driving time (in minutes) to access and egress the transit network. Defaults to no restrictions, as long diff --git a/r-package/man/r5r.Rd b/r-package/man/r5r.Rd index 72931e97..b9558377 100644 --- a/r-package/man/r5r.Rd +++ b/r-package/man/r5r.Rd @@ -44,7 +44,7 @@ Authors: \item Marcus Saraiva \email{marcus.saraiva@gmail.com} (\href{https://orcid.org/0000-0001-6218-2338}{ORCID}) \item Daniel Herszenhut \email{dhersz@gmail.com} (\href{https://orcid.org/0000-0001-8066-1105}{ORCID}) \item Carlos Kaue Vieira Braga \email{kaue@kauebraga.dev} (\href{https://orcid.org/0000-0002-6104-7297}{ORCID}) - \item Matthew Wigginton Conway \email{mwconway@asu.edu} (\href{https://orcid.org/0000-0002-1210-2982}{ORCID}) + \item Matthew Wigginton Bhagat-Conway \email{mwbc@unc.edu} (\href{https://orcid.org/0000-0002-1210-2982}{ORCID}) } Other contributors: diff --git a/r-package/man/roxygen/templates/common_arguments.R b/r-package/man/roxygen/templates/common_arguments.R index 7cf2d6aa..0bcb8d3c 100644 --- a/r-package/man/roxygen/templates/common_arguments.R +++ b/r-package/man/roxygen/templates/common_arguments.R @@ -12,19 +12,25 @@ #' for valid dates. Please see details for further information on how #' datetimes are parsed. #' @param max_walk_time An integer. The maximum walking time (in minutes) to -#' access and egress the transit network, or to make transfers within the -#' network. Defaults to no restrictions, as long as `max_trip_duration` is -#' respected. The max time is considered separately for each leg (e.g. if -#' you set `max_walk_time` to 15, you could potentially walk up to 15 minutes -#' to reach transit, and up to _another_ 15 minutes to reach the destination -#' after leaving transit). Defaults to `Inf`, no limit. +#' access and egress the transit network, to make transfers within the network +#' or to complete walk-only trips. Defaults to no restrictions (numeric value +#' of `Inf`), as long as `max_trip_duration` is respected. When routing +#' transit trips, the max time is considered separately for each leg (e.g. if +#' you set `max_walk_time` to 15, you could get trips with an up to 15 minutes +#' walk leg to reach transit and another up to 15 minutes walk leg to reach +#' the destination after leaving transit. In walk-only trips, whenever +#' `max_walk_time` differs from `max_trip_duration`, the lowest value is +#' considered. #' @param max_bike_time An integer. The maximum cycling time (in minutes) to -#' access and egress the transit network. Defaults to no restrictions, as long -#' as `max_trip_duration` is respected. The max time is considered separately -#' for each leg (e.g. if you set `max_bike_time` to 15 minutes, you could -#' potentially cycle up to 15 minutes to reach transit, and up to _another_ 15 -#' minutes to reach the destination after leaving transit). Defaults to `Inf`, -#' no limit. +#' access and egress the transit network, to make transfers within the network +#' or to complete bicycle-only trips. Defaults to no restrictions (numeric +#' value of `Inf`), as long as `max_trip_duration` is respected. When routing +#' transit trips, the max time is considered separately for each leg (e.g. if +#' you set `max_bike_time` to 15, you could get trips with an up to 15 minutes +#' cycle leg to reach transit and another up to 15 minutes cycle leg to reach +#' the destination after leaving transit. In bicycle-only trips, whenever +#' `max_bike_time` differs from `max_trip_duration`, the lowest value is +#' considered. #' @param max_car_time An integer. The maximum driving time (in minutes) to #' access and egress the transit network. Defaults to no restrictions, as long #' as `max_trip_duration` is respected. The max time is considered separately diff --git a/r-package/man/travel_time_matrix.Rd b/r-package/man/travel_time_matrix.Rd index 930c00f3..401e6aa9 100644 --- a/r-package/man/travel_time_matrix.Rd +++ b/r-package/man/travel_time_matrix.Rd @@ -80,20 +80,26 @@ understand how this object is structured: calculating the fastest journey between each origin and destination pair.} \item{max_walk_time}{An integer. The maximum walking time (in minutes) to -access and egress the transit network, or to make transfers within the -network. Defaults to no restrictions, as long as \code{max_trip_duration} is -respected. The max time is considered separately for each leg (e.g. if -you set \code{max_walk_time} to 15, you could potentially walk up to 15 minutes -to reach transit, and up to \emph{another} 15 minutes to reach the destination -after leaving transit). Defaults to \code{Inf}, no limit.} +access and egress the transit network, to make transfers within the network +or to complete walk-only trips. Defaults to no restrictions (numeric value +of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_walk_time} to 15, you could get trips with an up to 15 minutes +walk leg to reach transit and another up to 15 minutes walk leg to reach +the destination after leaving transit. In walk-only trips, whenever +\code{max_walk_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_bike_time}{An integer. The maximum cycling time (in minutes) to -access and egress the transit network. Defaults to no restrictions, as long -as \code{max_trip_duration} is respected. The max time is considered separately -for each leg (e.g. if you set \code{max_bike_time} to 15 minutes, you could -potentially cycle up to 15 minutes to reach transit, and up to \emph{another} 15 -minutes to reach the destination after leaving transit). Defaults to \code{Inf}, -no limit.} +access and egress the transit network, to make transfers within the network +or to complete bicycle-only trips. Defaults to no restrictions (numeric +value of \code{Inf}), as long as \code{max_trip_duration} is respected. When routing +transit trips, the max time is considered separately for each leg (e.g. if +you set \code{max_bike_time} to 15, you could get trips with an up to 15 minutes +cycle leg to reach transit and another up to 15 minutes cycle leg to reach +the destination after leaving transit. In bicycle-only trips, whenever +\code{max_bike_time} differs from \code{max_trip_duration}, the lowest value is +considered.} \item{max_car_time}{An integer. The maximum driving time (in minutes) to access and egress the transit network. Defaults to no restrictions, as long From b633665af87209bdc0938556f25ca5887dd19a07 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Thu, 23 Nov 2023 19:17:38 -0300 Subject: [PATCH 04/13] documentation of output_dir --- r-package/man/accessibility.Rd | 6 +++--- r-package/man/detailed_itineraries.Rd | 6 +++--- r-package/man/expanded_travel_time_matrix.Rd | 6 +++--- r-package/man/pareto_frontier.Rd | 6 +++--- r-package/man/r5r.Rd | 1 + r-package/man/roxygen/templates/common_arguments.R | 6 +++--- r-package/man/travel_time_matrix.Rd | 6 +++--- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/r-package/man/accessibility.Rd b/r-package/man/accessibility.Rd index 9ed8e8f3..32b6aeff 100644 --- a/r-package/man/accessibility.Rd +++ b/r-package/man/accessibility.Rd @@ -184,9 +184,9 @@ among all active threads.} \code{NULL} (the default), the function will write one \code{.csv} file with the results for each origin in the specified directory. In such case, the function returns the path specified in this parameter. This parameter is -particularly useful when running estimates on memory-constrained settings, -because writing the results to disk prevents \code{r5r} from storing them in -memory.} +particularly useful when running on memory-constrained settings because +writing the results directly to disk prevents \code{r5r} from loading them to +RAM memory.} } \value{ A \code{data.table} with accessibility estimates for all origin points. diff --git a/r-package/man/detailed_itineraries.Rd b/r-package/man/detailed_itineraries.Rd index 96beca47..ff95f1e8 100644 --- a/r-package/man/detailed_itineraries.Rd +++ b/r-package/man/detailed_itineraries.Rd @@ -162,9 +162,9 @@ geometry column in the result.} \code{NULL} (the default), the function will write one \code{.csv} file with the results for each origin in the specified directory. In such case, the function returns the path specified in this parameter. This parameter is -particularly useful when running estimates on memory-constrained settings, -because writing the results to disk prevents \code{r5r} from storing them in -memory.} +particularly useful when running on memory-constrained settings because +writing the results directly to disk prevents \code{r5r} from loading them to +RAM memory.} } \value{ When \code{drop_geometry} is \code{FALSE}, the function outputs a \verb{LINESTRING sf} with detailed information on the itineraries between the specified diff --git a/r-package/man/expanded_travel_time_matrix.Rd b/r-package/man/expanded_travel_time_matrix.Rd index 39b57df6..b9937106 100644 --- a/r-package/man/expanded_travel_time_matrix.Rd +++ b/r-package/man/expanded_travel_time_matrix.Rd @@ -137,9 +137,9 @@ among all active threads.} \code{NULL} (the default), the function will write one \code{.csv} file with the results for each origin in the specified directory. In such case, the function returns the path specified in this parameter. This parameter is -particularly useful when running estimates on memory-constrained settings, -because writing the results to disk prevents \code{r5r} from storing them in -memory.} +particularly useful when running on memory-constrained settings because +writing the results directly to disk prevents \code{r5r} from loading them to +RAM memory.} } \value{ A \code{data.table} with travel time estimates (in minutes) and the diff --git a/r-package/man/pareto_frontier.Rd b/r-package/man/pareto_frontier.Rd index 784043bd..1db487fa 100644 --- a/r-package/man/pareto_frontier.Rd +++ b/r-package/man/pareto_frontier.Rd @@ -158,9 +158,9 @@ among all active threads.} \code{NULL} (the default), the function will write one \code{.csv} file with the results for each origin in the specified directory. In such case, the function returns the path specified in this parameter. This parameter is -particularly useful when running estimates on memory-constrained settings, -because writing the results to disk prevents \code{r5r} from storing them in -memory.} +particularly useful when running on memory-constrained settings because +writing the results directly to disk prevents \code{r5r} from loading them to +RAM memory.} } \value{ A \code{data.table} with the travel time and monetary cost Pareto frontier diff --git a/r-package/man/r5r.Rd b/r-package/man/r5r.Rd index b9558377..4b6fe2d1 100644 --- a/r-package/man/r5r.Rd +++ b/r-package/man/r5r.Rd @@ -49,6 +49,7 @@ Authors: Other contributors: \itemize{ + \item Luyu Liu \email{luyuliu@ufl.edu} (\href{https://orcid.org/0000-0002-6684-5570}{ORCID}) [contributor] \item Ipea - Institute for Applied Economic Research [copyright holder, funder] } diff --git a/r-package/man/roxygen/templates/common_arguments.R b/r-package/man/roxygen/templates/common_arguments.R index 0bcb8d3c..5af75c06 100644 --- a/r-package/man/roxygen/templates/common_arguments.R +++ b/r-package/man/roxygen/templates/common_arguments.R @@ -63,6 +63,6 @@ #' `NULL` (the default), the function will write one `.csv` file with the #' results for each origin in the specified directory. In such case, the #' function returns the path specified in this parameter. This parameter is -#' particularly useful when running estimates on memory-constrained settings, -#' because writing the results to disk prevents `r5r` from storing them in -#' memory. +#' particularly useful when running on memory-constrained settings because +#' writing the results directly to disk prevents `r5r` from loading them to +#' RAM memory. diff --git a/r-package/man/travel_time_matrix.Rd b/r-package/man/travel_time_matrix.Rd index 401e6aa9..14da7ea6 100644 --- a/r-package/man/travel_time_matrix.Rd +++ b/r-package/man/travel_time_matrix.Rd @@ -153,9 +153,9 @@ among all active threads.} \code{NULL} (the default), the function will write one \code{.csv} file with the results for each origin in the specified directory. In such case, the function returns the path specified in this parameter. This parameter is -particularly useful when running estimates on memory-constrained settings, -because writing the results to disk prevents \code{r5r} from storing them in -memory.} +particularly useful when running on memory-constrained settings because +writing the results directly to disk prevents \code{r5r} from loading them to +RAM memory.} } \value{ A \code{data.table} with travel time estimates (in minutes) between From d6447c9aedbdb26a9a98d07d6d312aa96fb93adb Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Thu, 23 Nov 2023 21:41:51 -0300 Subject: [PATCH 05/13] update news and add Luyu Liu as contributor --- r-package/DESCRIPTION | 4 +++- r-package/NEWS.md | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/r-package/DESCRIPTION b/r-package/DESCRIPTION index 815dc195..4b2f5052 100644 --- a/r-package/DESCRIPTION +++ b/r-package/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: r5r Title: Rapid Realistic Routing with 'R5' -Version: 1.1.0 +Version: 1.1.0999 Authors@R: c( person("Marcus", "Saraiva", , "marcus.saraiva@gmail.com", role = "aut", comment = c(ORCID = "0000-0001-6218-2338")), @@ -13,6 +13,8 @@ Authors@R: c( comment = c(ORCID = "0000-0002-6104-7297")), person("Matthew Wigginton", "Bhagat-Conway", , "mwbc@unc.edu", role = "aut", comment = c(ORCID = "0000-0002-1210-2982")), + person("Luyu", "Liu", , "luyuliu@ufl.edu", role = "ctb", + comment = c(ORCID = "0000-0002-6684-5570")), person("Ipea - Institute for Applied Economic Research", role = c("cph", "fnd")) ) Description: Rapid realistic routing on multimodal transport networks diff --git a/r-package/NEWS.md b/r-package/NEWS.md index 03aa96ed..4f03fcca 100644 --- a/r-package/NEWS.md +++ b/r-package/NEWS.md @@ -6,6 +6,12 @@ - Updated documentation of parameter `max_walk_time` to make it clear that in walk-only trips, whenever `max_walk_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) - Updated documentation of parameter `max_bike_time` to make it clear that in bicycle-only trips, whenever `max_bike_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) +**Bug Fixes** +- Fixed bug that prevented the using the `output_dir`parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu. + +**New contributors to r5r** +- [Luyu Liu](https://github.com/luyuliu) + # r5r 1.1.0 From 90d2f04b2a794b7a019fb3de559ca0ebbd7d4a73 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Fri, 24 Nov 2023 19:10:58 -0300 Subject: [PATCH 06/13] fix vignette time_window --- r-package/vignettes/time_window.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r-package/vignettes/time_window.Rmd b/r-package/vignettes/time_window.Rmd index 8e0f3e00..e95b3b5a 100644 --- a/r-package/vignettes/time_window.Rmd +++ b/r-package/vignettes/time_window.Rmd @@ -102,7 +102,7 @@ acc <- r5r::accessibility(r5r_core = r5r_core, cutoffs = 45, departure_datetime = departure_datetime, progress = FALSE, - time_window = 30, + time_window = 60, percentiles = c(10, 20, 50, 70, 80) ) @@ -149,7 +149,7 @@ ttm <- travel_time_matrix(r5r_core = r5r_core, max_trip_duration = max_trip_duration, departure_datetime = departure_datetime, progress = TRUE, - time_window = 20, + time_window = 60, percentiles = c(10, 20, 50, 70, 80) ) From 77fdf323138ba4e576a550aaaf6b517a4a3dbd2f Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Fri, 24 Nov 2023 21:34:24 -0300 Subject: [PATCH 07/13] include explanation of time window in detailed_itin. vignette --- r-package/vignettes/time_window.Rmd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/r-package/vignettes/time_window.Rmd b/r-package/vignettes/time_window.Rmd index e95b3b5a..f3c5e578 100644 --- a/r-package/vignettes/time_window.Rmd +++ b/r-package/vignettes/time_window.Rmd @@ -182,6 +182,14 @@ head(ettm, n = 10) ``` +### 3.5 Detailed itineraries with `time_window`. + +In the `detailed_itineraries()` function, the number of Monte Carlo draws per minute is hardcoded to 1. This means that the function simulates only one departure per minute within the `time_window`. So if you set a `time_window` of 10 minutes, it would simulate 10 departures, one in each minute. This is largely because the `time_window` behaves slightly differently here. + +See, functions like `travel_time_matrix()` or `accessibility()`, for example, return estimates of travel times or accessibility. In these cases, when we use the `time_window` parameter, these functions output selected percentiles of those estimates generated based on the distribution of all estimates that result from the multiple trip simulations. + +The `detailed_itineraries()`, on the other hand, does not return travel times or accessibility estimates. It returns alternatives of trip journeys. In this case, when we use the `time_window` parameter, the function will return the optimal trip itinerary found within the time window. It can also return the optimal route along with multiple sub-optimal journey alternatives found within the time window if the the user sets `shortest_path = FALSE`. + ### Cleaning up after usage From efc2f1ca83446833bf1f0fb037cf960eb7f72ffd Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Fri, 24 Nov 2023 22:04:14 -0300 Subject: [PATCH 08/13] fix behavior of detailed_itineraries to work with frequency-based gtfs feeds --- r-package/R/detailed_itineraries.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-package/R/detailed_itineraries.R b/r-package/R/detailed_itineraries.R index 9fe5826e..d54625bf 100644 --- a/r-package/R/detailed_itineraries.R +++ b/r-package/R/detailed_itineraries.R @@ -131,7 +131,7 @@ detailed_itineraries <- function(r5r_core, mode_list <- assign_mode(mode, mode_egress) # detailed itineraries via public transport cannot be computed on frequencies-based GTFS - if (mode_list$transit_mode != "" & r5r_core$hasFrequencies()) { + if (!(mode_list$transit_mode != "" & r5r_core$hasFrequencies())) { stop( "Assertion on 'r5r_core' failed: None of the GTFS feeds used to create ", "the transit network can contain a 'frequencies' table. Try using ", From 625d638fb586cc72e6f45123080acf7377904ab8 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Sat, 25 Nov 2023 08:11:48 -0300 Subject: [PATCH 09/13] fix error from previous commit --- r-package/R/detailed_itineraries.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r-package/R/detailed_itineraries.R b/r-package/R/detailed_itineraries.R index d54625bf..9fe5826e 100644 --- a/r-package/R/detailed_itineraries.R +++ b/r-package/R/detailed_itineraries.R @@ -131,7 +131,7 @@ detailed_itineraries <- function(r5r_core, mode_list <- assign_mode(mode, mode_egress) # detailed itineraries via public transport cannot be computed on frequencies-based GTFS - if (!(mode_list$transit_mode != "" & r5r_core$hasFrequencies())) { + if (mode_list$transit_mode != "" & r5r_core$hasFrequencies()) { stop( "Assertion on 'r5r_core' failed: None of the GTFS feeds used to create ", "the transit network can contain a 'frequencies' table. Try using ", From ba1f15da1a95272472633522efd439dd332a2971 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Sat, 25 Nov 2023 08:12:20 -0300 Subject: [PATCH 10/13] add info on detailed itineraries in the time_window vignette --- r-package/NEWS.md | 3 ++- r-package/vignettes/time_window.Rmd | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/r-package/NEWS.md b/r-package/NEWS.md index 4f03fcca..703c269c 100644 --- a/r-package/NEWS.md +++ b/r-package/NEWS.md @@ -7,7 +7,8 @@ - Updated documentation of parameter `max_bike_time` to make it clear that in bicycle-only trips, whenever `max_bike_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) **Bug Fixes** -- Fixed bug that prevented the using the `output_dir`parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu. +- Fixed bug that prevented the using the `output_dir` parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu. +- Fixed bug that prevented `detailed_itineraries` from working with frequency-based GTFS feeds. It should ONLY work with frequency-based GTFS feeds. **New contributors to r5r** - [Luyu Liu](https://github.com/luyuliu) diff --git a/r-package/vignettes/time_window.Rmd b/r-package/vignettes/time_window.Rmd index f3c5e578..6a092158 100644 --- a/r-package/vignettes/time_window.Rmd +++ b/r-package/vignettes/time_window.Rmd @@ -82,7 +82,7 @@ departure_datetime = as.POSIXct("13-05-2019 14:00:00", format = "%d-%m-%Y %H:%M:%S") ``` -ps. Please keep in mind that the `time_window` only affects the results when the GTFS feeds contain a `frequencies.txt` table. +ps. Please keep in mind that the Monte Carlo draws in `time_window` only affects the results when the GTFS feeds contain a `frequencies.txt` table. @@ -186,10 +186,15 @@ head(ettm, n = 10) In the `detailed_itineraries()` function, the number of Monte Carlo draws per minute is hardcoded to 1. This means that the function simulates only one departure per minute within the `time_window`. So if you set a `time_window` of 10 minutes, it would simulate 10 departures, one in each minute. This is largely because the `time_window` behaves slightly differently here. -See, functions like `travel_time_matrix()` or `accessibility()`, for example, return estimates of travel times or accessibility. In these cases, when we use the `time_window` parameter, these functions output selected percentiles of those estimates generated based on the distribution of all estimates that result from the multiple trip simulations. +See, functions like `travel_time_matrix()` or `accessibility()`, for example, return estimates of travel times or accessibility. In these cases, when we use the `time_window` parameter, these functions output selected percentiles of those values generated based on the distribution of all estimates that result from the multiple trip simulations. The `detailed_itineraries()`, on the other hand, does not return travel times or accessibility estimates. It returns alternatives of trip journeys. In this case, when we use the `time_window` parameter, the function will return the optimal trip itinerary found within the time window. It can also return the optimal route along with multiple sub-optimal journey alternatives found within the time window if the the user sets `shortest_path = FALSE`. +*obs.* Mind you that `detailed_itineraries()` cannot be computed for public transport trips if the the network uses a frequencies-based GTFS feed. In these cases, we suggest using `gtfstools::frequencies_to_stop_times()` to create a suitable feed. + + + + ### Cleaning up after usage From 1fcf301712cb848ed689622b4bd6fb36d7bf5be7 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Sat, 25 Nov 2023 08:19:19 -0300 Subject: [PATCH 11/13] improved documentation of suboptimal_minutes --- r-package/R/detailed_itineraries.R | 13 ++++++++----- r-package/man/detailed_itineraries.Rd | 13 ++++++++----- r-package/vignettes/detailed_itineraries.Rmd | 2 ++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/r-package/R/detailed_itineraries.R b/r-package/R/detailed_itineraries.R index 9fe5826e..593d6618 100644 --- a/r-package/R/detailed_itineraries.R +++ b/r-package/R/detailed_itineraries.R @@ -26,11 +26,14 @@ #' function: `vignette("time_window", package = "r5r")`. #' @param suboptimal_minutes A number. The difference in minutes that each #' non-optimal RAPTOR branch can have from the optimal branch without being -#' disregarded by the routing algorithm. This argument emulates the real-life -#' behaviour that makes people want to take a path that is technically not -#' optimal (in terms of travel time, for example) for some practical reasons -#' (e.g. mode preference, safety, etc). In practice, the higher this value, -#' the more itineraries will be returned in the final result. +#' disregarded by the routing algorithm. If, for example, users set +#' `suboptimal_minutes = 10`, the routing algorithm will consider sub-optimal +#' routes that arrive up to 10 minutes after the arrival of the optimal one. +#' This argument emulates the real-life behaviour that makes people want to +#' take a path that is technically not optimal in terms of travel time, for +#' example, for some practical reasons (e.g. mode preference, safety, etc). +#' In practice, the higher this value, the more itineraries will be returned +#' in the final result. #' @param shortest_path A logical. Whether the function should only return the #' fastest itinerary between each origin and destination pair (the default) #' or multiple alternatives. diff --git a/r-package/man/detailed_itineraries.Rd b/r-package/man/detailed_itineraries.Rd index ff95f1e8..9cb65533 100644 --- a/r-package/man/detailed_itineraries.Rd +++ b/r-package/man/detailed_itineraries.Rd @@ -66,11 +66,14 @@ function: \code{vignette("time_window", package = "r5r")}.} \item{suboptimal_minutes}{A number. The difference in minutes that each non-optimal RAPTOR branch can have from the optimal branch without being -disregarded by the routing algorithm. This argument emulates the real-life -behaviour that makes people want to take a path that is technically not -optimal (in terms of travel time, for example) for some practical reasons -(e.g. mode preference, safety, etc). In practice, the higher this value, -the more itineraries will be returned in the final result.} +disregarded by the routing algorithm. If, for example, users set +\code{suboptimal_minutes = 10}, the routing algorithm will consider sub-optimal +routes that arrive up to 10 minutes after the arrival of the optimal one. +This argument emulates the real-life behaviour that makes people want to +take a path that is technically not optimal in terms of travel time, for +example, for some practical reasons (e.g. mode preference, safety, etc). +In practice, the higher this value, the more itineraries will be returned +in the final result.} \item{fare_structure}{A fare structure object, following the convention set in \code{\link[=setup_fare_structure]{setup_fare_structure()}}. This object describes how transit fares diff --git a/r-package/vignettes/detailed_itineraries.Rmd b/r-package/vignettes/detailed_itineraries.Rmd index 39285f56..116521e9 100644 --- a/r-package/vignettes/detailed_itineraries.Rmd +++ b/r-package/vignettes/detailed_itineraries.Rmd @@ -67,6 +67,8 @@ poi <- fread(file.path(data_path, "poa_points_of_interest.csv")) In this example below, we want to know some alternative routes between a single origin/destination pair. To get multiple route alternatives, we need to set `shortest_path = FALSE`. +Note that in the example below we set `suboptimal_minutes = 8`. In this case, `r5r` will consider sub-optimal routes that arrive up to 10 minutes after the arrival of the optimal route. + ```{r, message = FALSE} # set inputs origins <- poi[10,] From 2ecb6eba1bc8af5189145dec055b57b2bff877f4 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Sat, 25 Nov 2023 08:20:54 -0300 Subject: [PATCH 12/13] update news --- r-package/NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r-package/NEWS.md b/r-package/NEWS.md index 703c269c..578950ae 100644 --- a/r-package/NEWS.md +++ b/r-package/NEWS.md @@ -5,6 +5,8 @@ - In the `accessibility()` function, the value of `max_trip_duration` is now capped by the max value passed to the `cutoffs` parameter. Closes [#342](https://github.com/ipeaGIT/r5r/issues/348). - Updated documentation of parameter `max_walk_time` to make it clear that in walk-only trips, whenever `max_walk_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) - Updated documentation of parameter `max_bike_time` to make it clear that in bicycle-only trips, whenever `max_bike_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353) +- Improved documentation of parameter `suboptimal_minutes` in the `detailed_itineraries()` function. +- Updated the vignette on time window to explain how this parameter behaves when used in the `detailed_itineraries()` function. **Bug Fixes** - Fixed bug that prevented the using the `output_dir` parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu. From c78a98a514321ee5b27c15fa703c0e6e76bfac33 Mon Sep 17 00:00:00 2001 From: rafapereirabr Date: Sat, 25 Nov 2023 08:24:36 -0300 Subject: [PATCH 13/13] automate dev version in pkgdown --- r-package/pkgdown/_pkgdown.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/r-package/pkgdown/_pkgdown.yml b/r-package/pkgdown/_pkgdown.yml index 06ec4cbb..4974da35 100644 --- a/r-package/pkgdown/_pkgdown.yml +++ b/r-package/pkgdown/_pkgdown.yml @@ -1,8 +1,13 @@ destination: ../docs + +development: + mode: auto + repo: url: home: https://github.com/ipeaGIT/r5r/ source: https://github.com/ipeaGIT/r5r/tree/master/r-package/ + reference: - title: "Setup" - contents: