Comments (7)
I've added functions to set walk and bike speed to the R5R core class.
r5_core$setWalkSpeed(double speed)
and r5_core$setBikeSpeed(double speed)
Those speeds are in metres per second. Now, we need to add R wrapper functions around those, probably using km/h as units.
Edit: I've added this comment here because our R wrapper functions will have to convert walking speeds and distance into walking times to pass to the Java api.
from r5r.
Is there a routing-config json in r5 similar to otp? If I recall correctly you can set these speeds in the file. Correct me if I'm wrong.
If that's the case, I think a function to create such a file could be handy and could save us time.
from r5r.
related to #29
from r5r.
I've implmented the paremeter max_walk_dist
in the travel_time_matrix
function. This implementation is based on a new support function set_max_walk_distance
, which works as follows:
#' Set max walking distance
#'
#' @param max_walk_dist numeric, Maximum walking distance (in Km) for the whole
#' trip. Passed from routing functions.
#' @param walk_speed numeric, Average walk speed in Km/h. Defaults to 3.6 Km/h.
#' Passed from routing functions.
#' @export
#' @family support functions
#'
set_max_walk_distance <- function(max_walk_dist, walk_speed, max_trip_duration){
if (is.null(max_walk_dist)) {
max_street_time = as.integer(max_trip_duration)
return(max_street_time)
} else if (!is.numeric(max_walk_dist)) {
stop("max_walk_dist must be numeric")
} else {
max_street_time = as.integer(3600 * max_walk_dist / walk_speed)
return(max_street_time)
}
}
from r5r.
@mvpsaraiva , could you please add a max_trip_duration
paremeter to the detailed_itineraries
function ? We would need this to implement max_walk_dist
.
from r5r.
Done! But... max_trip_duration
in detailed_itinerary
only affects trips with public transport segments. Walking, driving and cycling trips are only affected by the max_street_time
parameter. We can check the user's inputs in the R side, since it doesn't make sense max_street_time
to be higher than max_trip_duration
.
from r5r.
Parameter max_walk_distance
now added to detailed_itinerary
.
As it stands, the user only passes values to the parameters max_trip_duration
and max_walk_distance
. The value of max_street_time
will be calculated from that. If no max_walk_distance
is passed, then max_street_time
will be equal to max_trip_duration.
from r5r.
Related Issues (20)
- Distinguish between waiting time and transfer time HOT 1
- Default value for departure_time_window HOT 1
- Remove any mention to percentiles in expanded_travel_time_matrix()
- Modifying max bike speeds HOT 1
- java.io.IOException: Wrong index checksum, store was not closed properly and could be corrupted. HOT 3
- isochrone() -> cannot read properties of undefined (reading '0') HOT 8
- Fix documentation of parameter output_dir HOT 1
- max_trip_duration should be limited by cutoffs HOT 1
- Comparability of transfer allowances HOT 12
- Update r5r to use latest version of JDK v20 HOT 13
- Travel time at the same point have minutes ? HOT 1
- Assertion on 'r5r_core' failed HOT 9
- max_walk_time overwrites max_trip_duration in travel_time_matrix when mode = "WALK" HOT 12
- Inconsistent example in "Using the time_window parameter" Vignettes and more on time_window HOT 3
- Error in setup_r5() java.lang.NoClassDefFoundError: com/conveyal/file/FileStorage HOT 28
- segment_duration is not equal to distance/walkSpeed for walk trip legs HOT 3
- User chooses to take a long boomerang transfer at a far away station rather than walk across the street HOT 4
- Java NullPointerException for new version with JDK 21 for Mac HOT 1
- No results for certain areas - issue with snapping? HOT 4
- The package displays a message that Java 11 is required, although Java 21 is installed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r5r.