Comments (5)
Hi Peter,
this summation is used in the compareTo method of MultiTreeSPEntry. The sum is used here to be consistent with SPTEntry.compareTo. I do not really recall where this was used, but I'm sure it is used somewhere. In SPTEntry, the weights are compared. In MultiTreeSPEntry, there are multiple weights, but we need one boolean as result of the comparison, therefore we sum over all weights of the MultiTreeSPEntry and compare the sums. If you have a good idea, I'm happy to avoid this. Need to look into the code too to check where the compare is actually used.
from openrouteservice.
Try removing this and it will still work.
Need to look into the code too to check where the compare is actually used
I didn't find anything
from openrouteservice.
The compareTo method is used when inserting entries into the prioQueue in java.util. The SPEntry uses this as well. Not sure about the inner workings of the queue, but shouldn't this be done correctly? What happens when the prioQueue is not ordered by weight? Would it be possible to remove the compareTo method of SPTEntry then as well?
from openrouteservice.
I don't think we need a queue as we explore "everything" reachable with CH (I might be wrong here) and as long as we have a proper update mechanism of suboptimal weights (which we seem to have).
We could use a simple stack or list. IMO the weight does not matter. Again you can try if you replace the totalWeight with something completely different and it will still work correctly (the tests would be handy here ;)).
I first thought "hey summation of something completely unrelated (weights to different locations) does not make sense and max(weight_i) is more meaningful". And yes, value=max(weight_i) was working but so do all other procedures including value=0...
from openrouteservice.
Sorry, I have to take back the argument that nothing changes if we change the order (or replace the queue with a list). With max(weight) it gets slower (1.2x) and with weight=0 it gets significantly slower (7x), but correctness seems not affected. Will have to read again the papers why this is necessary for a speedup, probably the update state skips lots of uninteresting sitations? But why not weight+=weight*weight or something else?
from openrouteservice.
Related Issues (20)
- Preparation mode does not exit successfully after mapgen is complete HOT 1
- CVE-2024-22243 org.springframework:spring-web (ors.jar) HOT 1
- CVE-2024-22259 org.springframework:spring-web (ors.jar) HOT 1
- Migration info printed even if using yaml HOT 1
- Application startup fails org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Is a directory HOT 2
- Not ready after ten a week of creating graph HOT 7
- Review configuration
- Improve track grade parsing
- Cannot find routable point HOT 1
- Extra Info - Surface returns paved instead of grass HOT 3
- Consider side of road for departure and destination points HOT 1
- Support bicycle=destination for bike profiles HOT 3
- Matrix endpoint returning null for all locations when one route does not exist HOT 4
- Confusing error message in isochrones api
- fix: Fix some CVEs
- Dead link in docs
- Example mentions non-existent way category "Tunnel"
- Unify snapping behaviour across services HOT 1
- Wrong caculation bus
- Ways tagged as `highway=construction` not considered for bike profiles HOT 1
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 openrouteservice.