-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accessibilty() always returns an integer #235
Comments
Hi @c-voulgaris. Sorry for the late reply. Thanks for pointing this out. Indeed, r5 does all calculations using real numbers, but converts the results to integers before passing them along to r5r. I guess the rationale from Conveyal is that, in practice, you can't access a fraction of a school or job. I'll open an issue in r5's repository to check if they can change this behaviour in future versions. Meanwhile, you'll need to work around this by applying the decay function outside r5r, as you suggested. Unfortunately, this is much more resource intensive, as you need to load the full travel time matrix in memory. Another 'hackish' solution that would allow you to use the |
…erent decay functions, fixing issue #235 Obs.: managed to access floating point accessibility values via reflection.
I've found a solution for this issue, which is implemented now in the |
Thank you @mvpsaraiva . @c-voulgaris , the accessibility estimates from |
Thanks!! |
Brief description of the problem:
I love the ability to specify a non-step decay function in the accessibility function, but we lose some of the benefit when the resulting accessibility values are apparently rounded to the integer.
In the example below, I think I've specified a decay function that should decrease linearly from 1 to zero as travel time increases from 0 to 20 minutes. Since opportunities are never fully-weighted in this case, it seems like the accessibility values should vary continuously and return very few, if any, whole numbers. But with the rounding that's apparently happening, the results are mostly the same as what I'd get with a step function with a cutoff at 10 minutes.
I realize this is almost definitely an r5/Conveyal issue rather than an r5r issue, so maybe there's nothing to be done (other than maybe calculating travel times with r5, but applying the decay function outside of r5).
Reproducible example here
The text was updated successfully, but these errors were encountered: