Repository navigation
Releases
Releases ยท ipea/r5r
v2.5.0
Major changes
- Faster routing 1. Compared with r5r 2.4.0 on the Porto Alegre and Sรฃo Paulo sample data, car-only
travel_time_matrix(),arrival_travel_time_matrix(),accessibility()andpareto_frontier()are 2 to 4 times faster, bicycle-only routing 1.3 to 2.8 times, andexpanded_travel_time_matrix()1.5 to 2.6 times. Public transport routing in these functions takes about as long as before. - Faster routing 2.
detailed_itineraries()withshortest_path = TRUE(the default) and nofare_structurenow routes public transport with R5's RAPTOR algorithm, astravel_time_matrix()does, instead of McRAPTOR. It is 28 to 225 times faster on the Porto Alegre sample data, with the same output columns. See #603. Results can differ slightly:- departures are routed every minute of
time_windowinstead of at random seconds; - transfer walks are limited by
max_walk_time; - GTFS
pickup_type/drop_off_typerestrictions are respected; - ties between equally fast trips may resolve to a different route.
- Alternative routes (
shortest_path = FALSE) and fares still use McRAPTOR, and a pair that RAPTOR cannot route falls back to McRAPTOR. Closed #464.
- departures are routed every minute of
- New
seedargument intravel_time_matrix(),expanded_travel_time_matrix(),arrival_travel_time_matrix(),accessibility(),isochrone(),travel_time_surface()andpareto_frontier(). It makes the random departure offsets of frequency-based GTFS routes, and the departure times McRAPTOR samples withintime_window, reproducible across runs andn_threads. The defaultseed = NULLkeeps random draws. Inexpanded_travel_time_matrix()the trips of each minute are now numbered by total travel time, soarrival_travel_time_matrix()returns the fastest trip of the latest departure that arrives in time. Closes #593. See #597. - Uses R5 v7.6. Less than 1% of origin-destination pairs change on the Porto Alegre sample data, mostly with shorter public transport times. See #598:
- stops and points are linked to the nearest street even along long segments;
transfer_time(withbreakdown = TRUE) is now R5's transfer walking time, and waiting at the transfer stop is counted inwait_time;get_gtfs_errors()names some files without the.txtextension.- Networks built with earlier versions are rebuilt automatically.
- r5r requires R >= 4.1.0.
Bug fixes
- Java memory set with
options(java.parameters = "-Xmx...")beforelibrary(r5r)was ignored since r5r 2.2.0. It takes effect again. - With McRAPTOR (a
fare_structure,pareto_frontier(),detailed_itineraries()withshortest_path = FALSE), almost every origin was routed at the same departure times withintime_window. This was caused by an overflow in R5's random seed (conveyal/r5#1026). Each origin now gets its own reproducible sample, so results change slightly. Closes #601. accessibility()with thelogistic,exponentialandlineardecay functions ignored trips longer thanmax(cutoffs), which underestimated accessibility. Only thestepfunction now capsmax_trip_durationatmax(cutoffs).- #549 Public transport routing now requires an explicit
departure_datetime, since results depend on it. Without public transport, the current time is used.arrival_travel_time_matrix()requiresarrival_datetimefor all modes. Closed #486. pareto_frontier()now requiresfare_structureandfare_cutoffs. Withoutfare_cutoffsit failed, and withoutfare_structureit ignored fares.- Origins/destinations with duplicated
ids raise an error in one-to-many functions. Repeated ids are still allowed indetailed_itineraries()withall_to_all = FALSE. - A finite
max_farewithout afare_structureraises an error instead of being ignored. travel_time_matrix(),expanded_travel_time_matrix()andarrival_travel_time_matrix()swappedfrom_idandto_idwith walk-only routing and no elevation data, both in memory (fewer origins than destinations, a regression in 2.4.0, #501) and inoutput_dirfiles (more origins than destinations).arrival_travel_time_matrix():- for walk-, bike- or car-only trips with
max_walk_time,max_bike_timeormax_car_timebelowmax_trip_duration, it searched the wrong departure window; - it stopped searching at the first minute without a trip, missing pairs that could still arrive in time (#586);
- it compared arrivals using rounded durations (#586).
- for walk-, bike- or car-only trips with
expanded_travel_time_matrix()andarrival_travel_time_matrix()mixed up transit trips departing at 00:00:00 with street-only trips, and failed with walk-only routing and more than 5000 origins (#586).detailed_itineraries():- transfer walks took a duration different from the one used for routing, giving impossible timelines on networks with elevation data; they now take distance /
walk_speed; - transfer walks at the first stop had straight-line geometries;
- leg geometries repeated vertices, so they were invalid under s2 (#586);
- egress legs now keep the final partial street segment and the connection to the destination, with costs on the correct street endpoint (#607). Results can change, mainly for destinations on long street segments;
- zero-row
originsordestinationsreturn an empty result instead of crashing.
- transfer walks took a duration different from the one used for routing, giving impossible timelines on networks with elevation data; they now take distance /
isochrone():- polygons were shifted half a grid cell to the north-west;
- the polygon of the largest cutoff was cut short, so it depended on the other cutoffs; it is now complete and larger;
- line-based output (
polygon_output = FALSE) assigned segments to the wrong band with unsortedcutoffs; - line-based output now returns an
idcolumn,idis always character, and thest_centroidwarning is gone.
- #578 A call that failed after applying a scenario (
new_carspeeds,carspeed_scale,new_lts) left it active for the next call. Routing settings are now reset on exit, including on error. - Output files (
output_dir)- Text values containing commas are quoted (RFC 4180). This fixes every
detailed_itineraries()file, whosegeometry,osm_id_listandedge_id_listcolumns always contain commas. - Trips longer than
max_trip_durationare empty fields, asNAin memory, instead of2147483647(#586). detailed_itineraries()raises an error for repeated origin-destination pairs, which overwrote each other, and for ids that are not valid file names.
- Text values containing commas are quoted (RFC 4180). This fixes every
Minor changes
- r5r is dual-licensed under
GPL (>= 3) | MIT + file LICENSE. - The repository moved to https://github.com/ipea/r5r. #569 fixes the source links on the website. Closed #527.
accessibility()accepts fractional opportunities instead of truncating them to integers. Missing values count as 0 with a warning, and infinite values raise an error.- Progress (#596):
progressdefaults toTRUEin all routing functions;- the counter is printed by R, so it shows in every console, and reports every 1% of origins;
isochrone()no longer ignoresprogress.
- #596 Routing can be interrupted with Esc / Ctrl+C. The "Using cached R5 version" message now shows only with
verbose = TRUE. - #594
check_transit_availability()finds the operating dates, including calendar exceptions, when no dates are given. - Large matrices are passed from Java to R about 6 times faster.
- McRAPTOR itineraries in
detailed_itineraries()are found faster and with less memory. Withsuboptimal_minutes > 0, theoptionnumbers of two exactly tied itineraries can be swapped. - Logging when building networks with several GTFS feeds (#571) and in the direct trip router (#568, closed #557).
- Integer arguments (
max_walk_time,max_bike_time,max_car_time,max_trip_duration,time_window,percentiles,n_threads,max_rides,max_lts,draws_per_minute,cutoffs,suboptimal_minutes, andzoominisochrone()) reject non-integer values instead of truncating them. max_car_timenow caps car-only trips, not only the car legs of transit trips. Car-only trips can no longer end with a walk unbounded bymax_walk_time, so 3% of car travel times on the Porto Alegre sample are 1 to 8 minutes longer, now consistent withisochrone().- Input combinations that R5's McRAPTOR cannot handle now raise informative errors instead of hanging, running out of memory or failing with a cryptic Java error (#602):
- too many departure draws for
time_windowwith afare_structure(e.g. 8 draws per minute in 10 minutes, or the default 5 in 150 minutes or more); - exactly 200 draws (e.g.
time_window = 200inpareto_frontier()).
- too many departure draws for
percentilesandcutoffsare sorted, andcutoffsare validated (whole numbers from 1 to 120, no duplicates). They used to crash inside R5 or duplicate rows.- The
lineardecaydecay_valuemust be a whole number of minutes from 1 to 59. - Missing
lon/latnow trigge...
v2.4.0
Major changes
- Using new version of R5 v7.5.1. Closed #373
and #970 - The
isochrone()function has gone through major changes which substantially
improved polygon-based isochrones. The function now builds on top of a travel
time surface that uses a regular grid of points across the network (specifically
a grid of Web Mercator pixels) and then uses the marching squares algorithm to
generate the isochrone polygons. See detailed in the updated vignette. Closed
#455 and Closed #495. - New support function
get_gtfs_errors()to help diagnose eventual errors in
the GTFS data that prevent building the network. Closed #431 and #541.
Minor changes
- New support function
check_transit_availability()that checks the number and
proportion of public transport services from the GTFS feeds that are active on
specified dates. - New support function
street_network_bbox()that efficiently extracts the
geographic bounding box of the transport network. - More informative messages in case of Java error in R5. Closed #515.
- When direct routing fails the log now mentions the name of the origin and
destination points to help the user debug. Closed #519.
Bug fixes
- Revert back the order of origins destinations for Direct Modes. Fix implemented
in travel_time_matrix(),arrival_travel_time_matrix()andexpanded_travel_time_matrix().
Closes #501. - Reverse search optimization is now only applicable to walking. Closes #517.
- r5r now uses walking speed from request location to snapped point on the road
network. This was a fix upstream in R5. Closed #373 - Elevation data does not affect carspeeds anymore. This was a fix upstream in
R5. Closed #970 - Fixed a bug that was introduced in r5r {2.3.0} and which led to ignore elevation
when building the network. Closed #555.
Elevation data is still ignored when creating scenarios of LTS, but this is a know
bug that will throw warning messages while we work a way to fix it in a future
update.
New contributors to r5r
v2.3.0
Major changes
- New function
build_network()to replacesetup_r5(), which is being deprecated. Idiomaticallyr5r_coreis nowr5r_network. - New function
arrival_travel_time_matrix()to calculate travel time matrix between origin destination pairs considering the time of arrival, instead of a depature time. Closes #291 - We have now implemented a reverse search optimization for direct transport modes (walking and cycling) in the functions
travel_time_matrix(),expanded_travel_time_matrix()andarrival_travel_time_matrix(). In practice, this means that these functions are now much faster when there are multiple origins to few destinations but only when there is no elevation.tiffile in the data path. Closes #450 - All routing and accessibility functions in
r5rhave new parametersnew_carspeeds,carspeed_scaleandnew_ltswhich allow one to use custom car speeds and LTS levels for cycling. These parameters provide convient and efficient ways to build different scenarios of traffic congestion, road closure and interventions in cycling infrastructure. Closes #289
Minor changes
- The routable transport network built with
build_network()andsetup_r5()now have their own class"r5r_network", making the package more consistent and safer from errors #472. - Routing properties within r5r jar (aka little jar) are reset to default after a routing execution #453
- Less cluttering messages in r5r dialogue. Removed logback startup messages.
Verbose=Fnow completly silences java output.Verbose=Tonly reports messages up to INFO level as opposed to up to DEBUG #456. - Removed date from r5r-log. You no longer have to delete the previous day's log! #456
- Improved warning and error messages.
- r5r developers can now set
options(r5r.r5jar=...)to use a local JAR instead of the R5 jar downloaded by r5r.
Bug fixes
- Fixed a bug where
network_settings.jsonwasn't showing the right version numbers #459. Version number now dynamically updated #456.
New co-authors
- Alex Magnus
v2.2.0
Major changes
- r5r now uses the latest version of R5 V7.4. Closed #436
- The
detailed_itineraries()now has a new parameterosm_link_ids. A logical. Whether the output should include the additional columns with the OSM ids of the road segments used along the trip geometry Defaults toFALSE. Closes issues #298
Minor changes
- r5r now throws an informative error message when the geographic extent of input data exceeds limit of 975000 km2. Closes issues #389, #405, #406, #407, #412 and #421. Thanks to PR #426 by Alex Magnus.
- removed JRI dependency in r5r little jar. This helps debugging issues in Java without the need of using R. The side effect is that r5r now creates an
r5rlogfile in the data path.
Bug fixes
- Fixed a bug that prevented the package to check the availability of transit services in specific days when there is no service at all.
- Fixed a bug in the isochrone function that was throwing false error message regarding cutoff being too short. Closed #434 and #433
New contributors
- Alex Magnus
- Luyu Liu
- Daniel Snow
- Funding from the Department of Geography & Planning, University of Toronto via the Bousfield Visitorship.
r5r v2.1.0
Minor changes
- The
isochrone()function has a new boolean parameterpolygon_outputthat allows users to choose whether the output should be a polygon- or line-based isochrone. Closed #382 - When using public transit modes, the package now automatically detects whether there are any transit services operation on the seleced departure date. If there are no services, the package will return an error message. Closed #326
r5r v2.0
Breaking changes
- r5r uses now JDK 21 or higher (Breaking changes). Closed #350.
- r5r now uses the latest version of R5 V7.1. Closed #350
Major changes
- r5r now stores R5 Jar file at user dir using
tools::R_user_dir() - New function
r5r_cache()to manage the cache of the R5 Jar file. - By using the JDK 21, this version of r5r also fixed an incompatibility with MAC ARM processors. Closed #315
Minor changes
- In the
accessibility()function, the value ofmax_trip_durationis now capped by the max value passed to thecutoffsparameter. Closes #342. - Updated documentation of parameter
max_walk_timeto make it clear that in walk-only trips, whenevermax_walk_timediffers frommax_trip_duration, the lowest value is considered. Closes #353 - Updated documentation of parameter
max_bike_timeto make it clear that in bicycle-only trips, whenevermax_bike_timediffers frommax_trip_duration, the lowest value is considered. Closes #353 - Improved documentation of parameter
suboptimal_minutesin thedetailed_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 use the
output_dirparameter in thedetailed_itineraries(all_to_all = TRUE)function. Closes #327 with a contribution (PR #354) from Luyu Liu. - Fixed bug that prevented
detailed_itinerariesfrom working with frequency-based GTFS feeds. It should ONLY work with frequency-based GTFS feeds.
New contributors to r5r
r5r v1.1.0
r5r v1.1.0
Major changes
- New
isochrone()function. Closes #123, and addresses requrests in issues #164 and #328. - New vignette about calculating / visualizing isochrones with
r5r. - New vignette with responses to frequently asked questions (FAQ) from
r5rusers.
Minor changes
- The default value of
time_windowis not set to10minutes in all functions to avoid weird results reported upstream in R5. Closes #342. - Removed any mention to
percentilesparameter in theexpanded_travel_time_matrix()because this function does not expose this parameter to users. Closes #343. - Updated vignette on calculating / visualizing accessibility with
r5r.
r5r v1.0.1
Bug fixes
- Updated to R5 version 6.9. This fixed a few bugs upstream, one of which often prevented users to build a network using cropped OSM data. Closes #325.
v1.0.0
r5r v1.0.0
Breaking changes
- Replaced
max_walk_distandmax_bike_distparameters withmax_walk_timeandmax_bike_timeto better align with R5 inputs. Closes #273. r5rnow usesR5's native elevation weighting for walking and cycling impedance functions. As a resultr5rdoes not have raster or rgdal package dependencies anymore. Closes #243 and #233.- Parameters
breakdownandbreakdown_statintravel_time_matrix()were removed. New functionexpanded_travel_time_matrix()should be used to retrieve detailed information of travel time matrices. r5rnow throws an error if users simultaneously pass more than one of the following modesc('WALK','CAR','BICYCLE')to thetransport_modeparameter. This is because these modes are understood as mutually exclusive.- Function
setup_r5()no longer has aversionparameter.
New functions
- New function
expanded_travel_time_matrix()to calculate minute-by-minute travel times between origin destination pairs and get additional information on public transport routes, number of transfers, and total access, waiting, in-vehicle and transfer times. - New function
pareto_frontier()to compute of travel time and monetary cost Pareto frontier. - New function
r5r_sitrep()to generate anr5rsituation report to help debug code errors - New functions to account for monetary costs:
setup_fare_structure()to setup a fare structure to calculate the monetary costs of tripsread_fare_structure()to read a fare structure object from a filewrite_fare_structure()to write a fare structure object to disk
Major changes
- Now using R5 latest version
6.8. - The
detailed_itineraries()has been substantially improved. The new vesion is faster than previous ones. It also includes new parameters listed below. Closes #265.- New
time_windowparameter - New
suboptimal_minutesparameter, which extends the search space and returns a larger number of trips beyond the fastest ones; - Support for fare calculator and new
max_fareparameter; - Routing in frequencies GFTS, including support for Monte Carlo draws
- New
- New parameter
draws_per_minutetotravel_time_matrix(),accessibility()andpareto_frontier()functions. Closes #230. - New parameter
output_dirto all routing functions, which can be used to specify a directory in which the results should be saved as.csvfiles (one file for each origin). This parameter is particularly useful when running estimates on memory-constrained settings, because writing the results to disk preventsR5from storing them in memory. - The accessibility estimates from
accessibility()are now of returned as doubles / classnumeric, except when using astepdecay function. Closes #235. - The
detailed_itineraries()function has a new parameterall_to_all, which allows users to set whether they want to query routes between all origins to all destinations (all_to_all = TRUE) or to query routes between the 1st origin to the 1st destination, then the 2nd origin to the 2nd destination, and so on (all_to_all = FALSE, the default). Closes #224.
Minor changes
- Package documentation has been extensively updated and expanded.
- Improved documentation of the
cutoffsparameter inaccessibility(), clarifying the function only accepts up to 12 cutoff values. Closes #216. - Improved documentation of the
percentilesparameter inaccessibility()andtravel_time_matrix(), clarifying these function only accepts up to 5 values. Closes #246. - r5r now downloads R5 Jar directly from Conveyal's github, making the package more stable. Closes #226.
- All functions now use
verbose = FALSEandprogress = FALSEby default. - Routing functions now require users to be non-ambiguous when specifying the modes, raising errors when it cannot disambiguate them. This new behaviour replaces the old one, in which the functions could end up trying to "guess" which mode was to be used in some edge cases.
- Information on bicycle 'level of traffic stress' is now added to the output of
street_network_to_sf(). Closes #251. - New columns with info on population, schools and jobs in the example data sets for Sao Paulo and Porto Alegre
Bug fixes
- Fixed bug that
transit_network_to_sf()generated some routes with invalid geometries. Closes #256. - Fixed bug that prevented
setup_r5(path, overwrite = TRUE)to work.
v0.7.1
Minor change
- Replaced the
akimapackage withinterppackage in r5rSuggests, as requested by CRAN.