Repository navigation
Conversation
|
Thanks Peter for providing also a summary of API changes in changelog, it helps studying the new code better. |
|
If you find something you do not understand, please let me know! Also this is now different and needs to be changed:
to "GraphHopperStorage implements now the Graph interface and delegates all necessary methods to the underlying base graph. To do routing you call getGraph(LevelGraph.class or Graph.class) where the parameter Graph.class currently returns the base graph and the behaviour is identical to GraphHopperStorage itself" (this is the convenient change I mentioned in the other issue) |
…yet working tests for CH
…ecution, all test pass
|
The additional refactoring for #339 will be done in a separate step, also fixing the documentation. Now finalizing before like improving readability, fixing TODOs and performance checks. Also to all: as all tests pass please review. An open question is: move the BaseGraph implementation back into GraphHopperStorage to make everything simpler? |
And what about |
CHGraph will stay separate. But moving BaseGraph back would have the advantage of avoiding the method delegation in GraphHopperStorage to the BaseGraph. Although I like the separation of storage and traversal stuff... but CHGraph currently also mixes storage and traversal :) |
|
Ok you're probably right here. |
|
You mean moving it back into GraphHopperStorage? Just asking again as I'm still unsure ... probably I'll let if for now as it is until we find a reason pro or contra? |
Yes. I'm a bit sceptical about |
What do you mean? Or what do you think could improve the situation? Keep in mind that we'll need in the near future multiple chGraphs managed by the GraphHopperStorage. But via ghstorage.getGraph(class) it should be very simple to extend for more purposes or even other algorithms.
Yes, this would be a bit uglier design-wise but simpler. |
|
I'm fine with current PR implementation.
Here I had second design thoughts but as you said it'll be simpler, so it's ok. |
|
Well I suppose (depending on ram) it could work. |
|
Some numbers for the area 'Germany': 15% less storage and therefor RAM - as expected :) ! |
|
👍 |
|
Yes, to better compare CH and none-CH I've picked bidir dijkstra in both cases -> See the measurement class (or graphhopper.sh measurement area.pbf) |
…pacity, problems found in #447
|
Although I only slightly improved the speed situation I'll merge this request soon as there are many advantages. Disadvantages (higly likely due to the additional EdgeAccess layer):
Advantages:
|
|
I follow your code changes, so 👍 for that. |
|
@devemux86 thanks for the feedback! BTW: It would be now also possible to revert the speed we lost with #338 but we would need to introduce two integers for additional BTW2: The levels should not be removed (although no longer needed then). Instead we should just avoid to load them into RAM. Because when edge weights change and we need to recreate the CH profile the levels could then be reused and the CH preparation could be a lot faster then - at least from what I know from papers. |
|
Peter I started playing with latest GH code. |
|
Yes, because there is now a separate shortcuts and edges storage. Any problems I didn't think about with this :) ? |
|
I try all the cases (e.g. loading a CH graph with a non CH config) and I see the same error message, let me conclude my tests and come back. |
|
Yes I think something is not right (or I'm doing wrong!). I have created a CH graph and I'm able to load it with |
|
That is like it should be :) You can now run without performance lost normal routing algorithms even if CH is enabled, which means you can also load the graph without the ch datastructure and everything should work - at least in theory ;) |
|
Oh I missed that step. |
|
Since now we cannot be notified if a graph has CH or not, do we need always using Because the |
|
Ah, okay. I see what you mean.
That is a problem which we should indeed fix! Either we automatically detect CH and configure everything accordingly like we do partially for the flagEncoders, or we should throw an exception. Feel free to create an issue!
That is not such a big problem IMO as the results should be still correct, but yes this should be fixed probably at the same time. |
This pull request is a major rewrite of some core parts of GraphHopper (storage and access of CHGraph, old name LevelGraph). This fixes #111. E.g. GraphHopperStorage now contains graphs like base graph and a ch graph which will allow for the physical separation of edges and shortcuts.
Currently there are the following steps before we can merge this:
Later we can also have multiple ch graphs -> #464
Some bugs uncovered while refactoring:
(where marked they are fixed in the pull request but not master yet)