-
Notifications
You must be signed in to change notification settings - Fork 0
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
Custom cost routing #1
Conversation
…, added osmid helsinki double and zero test datas
…also list of OsmId's
…m costs and custom cost routing, some minor conditionals to the existing 'base' classes, added file for custom cost related conversions
some rather major changes coming still to this PR soon |
…mainly adding osmids and checking them differently to prevent crashing when they are absent
… e.g. tests for negative values
…mes, sensitivities and custom_cost_dicts, removed custom cost related code from parent TransportNetwork.py, made conversions work with current changes, added checking for r5 version for support of custom costs
fixes and improvements added in previous commits |
…rent present, added support for getting base travel times and addition travel cost seconds
…d addition travel cost seconds
Edit 2: nevermind, I’m tired and should go home :-D |
Bit confused with the PR, as GitHub shows file changes that are not there in the repo, if I compare the branches on the command line (e.g., the changes to docs/user-guide/user-manual/travel-time-matrices.md)
https://github.com/DigitalGeographyLab/r5py_gp2/compare/main..custom-cost-routing Give me a bit more time to investigate this |
@roopehub: While I figure out what’s up with GitHub’s diff, could you maybe change the tests to run on a subset of the data, only? Having 15 MiB of test data added is quite a lot |
And yes for the test data size. I agree that is should be smaller so going to make it smaller. I could cut the test pbf network to smaller one and make sure that the OD coordinates are inside that. The difficulty is that every edge needs to have the custom cost value added (if the routing goes that way) otherwise the R5 routing will thrown an error. That's why the huge test files having all the edges for the network. This is debatable, we also could allow no values for edges but this could make it possible to run CustomCost routing without custom cost values -> so "normal" routing. Therefore I would suggest to always init a value for each edge, and if no value is found, add 0. But I guess all edges should have some values e.g. for greenery or noise or emissions? Whats your take @christophfink? |
actually inspired from this conversation, I will add a optional flag which will allow nulls for edges to R5 java code. This will still require custom cost dict which is not empty. |
* typo in docs [skip-ci] * a few minor tweaks * Use r5py’s patched build of r5 7.0, by default * Mention that Java version requirements have changed * force column types before pandas.concat() * adapt tests to use SAVE_SHAPE==True custom R5 * tests (missing from previous commit) * linted * require Java>=21 for tests * updated r5 jar url + hash also in tests * workaround for Java==21 not in Ubuntu-22.04, remember to revert * we’re not allowed to change system files on RTD VMs ;) * use a fixed version of jre instead of ubuntu-22.04’s default (that’s too old) * change the wording of the SAVE_SHAPES warning * typed no-data values for detailed trips, updated test comparison data * linted * catch also empty linestrings in TripLeg.__repr__() * compiled R5 with Java 17 (class file version 61) * use existing jre for rtd * update r5 jar hash in tests * use openjdk 17 * investigate java env on rtd [skip-ci] * investigate java env on rtd [skip-ci] * investigate java env on rtd [skip-ci] * revert to original rtd config * detailed itineraries works with our own r5 * RTD: conda + local installaion * use mambaforge * require openjdk>=21 * update jar checksums * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * debugging RTD * set JAVA_HOME if running within conda env (and it is not set) * linted * debug RTD env vars * debugging RTD * fixed CONDA_PREFIX and JAVA_HOME for conda on RTD * Move env var handling to separate file, add PROJ_LIB
* typo in docs [skip-ci] * a few minor tweaks * Use r5py’s patched build of r5 7.0, by default * Mention that Java version requirements have changed * force column types before pandas.concat() * adapt tests to use SAVE_SHAPE==True custom R5 * tests (missing from previous commit) * linted * require Java>=21 for tests * updated r5 jar url + hash also in tests * workaround for Java==21 not in Ubuntu-22.04, remember to revert * we’re not allowed to change system files on RTD VMs ;) * use a fixed version of jre instead of ubuntu-22.04’s default (that’s too old) * change the wording of the SAVE_SHAPES warning * typed no-data values for detailed trips, updated test comparison data * linted * catch also empty linestrings in TripLeg.__repr__() * compiled R5 with Java 17 (class file version 61) * use existing jre for rtd * update r5 jar hash in tests * use openjdk 17 * investigate java env on rtd [skip-ci] * investigate java env on rtd [skip-ci] * investigate java env on rtd [skip-ci] * revert to original rtd config * detailed itineraries works with our own r5 * RTD: conda + local installaion * use mambaforge * require openjdk>=21 * update jar checksums * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * RTD debugging, [ci-skip] * debugging RTD * set JAVA_HOME if running within conda env (and it is not set) * linted * debug RTD env vars * debugging RTD * fixed CONDA_PREFIX and JAVA_HOME for conda on RTD * Move env var handling to separate file, add PROJ_LIB
…ing of type CustomCostTransportNetwork for it's always TransportNetwork
…t and osmid_ways.csv all to same file
Created the foundation for custom cost routing. Modified existing code to handle (optional) osmid's in the results and to take in account (optional) custom costs and CustomCostTransportNetwork. Added new subclass of TransportNetwork for enabling and handling the custom cost logic to be added to the network and used during routing. Added tests for custom cost routing logic and components.
More details can be found from commit messages.
These additions rely on the custom cost logic modified r5 version (https://github.com/DigitalGeographyLab/r5_gp2).