Skip to content

Fixes missing best path update for bidir algos when there is a loop at the meeting point (#1592) - #1606

Merged
easbar merged 10 commits into
masterfrom
bidir_turn_restrictions_bug
May 6, 2019
Merged

easbar merged 10 commits into
masterfrom
bidir_turn_restrictions_bug

Conversation

@easbar

@easbar easbar commented May 3, 2019 •

Copy link
Copy Markdown
Member

@easbar

easbar commented May 3, 2019

Copy link
Copy Markdown
Member Author

Hmm not sure what exactly failed the build for JDK11, but there are several warnings like this:

WARNING: HK2 service reification failed for [org.glassfish.jersey.message.internal.DataSourceProvider] with an exception:
MultiException stack 1 of 2
java.lang.NoClassDefFoundError: javax/activation/DataSource

?

@karussell

Copy link
Copy Markdown
Member

@michaz could it be that this commit e8b5db9#diff-4db58d2546fb73b749d75a3df93f1c10 now requires this javax dependency in the reader-gtfs module too like in #1388? Or are some of the dependencies supposed to be test scope?

@karussell karussell added this to the 0.13 milestone May 3, 2019
@easbar easbar changed the title Fixes missing best path update for bidir algos when there is a loop at the meeting point (#1592) WIP: Fixes missing best path update for bidir algos when there is a loop at the meeting point (#1592) May 3, 2019
@easbar easbar changed the title WIP: Fixes missing best path update for bidir algos when there is a loop at the meeting point (#1592) Fixes missing best path update for bidir algos when there is a loop at the meeting point (#1592) May 4, 2019
@michaz

michaz commented May 5, 2019

Copy link
Copy Markdown
Member

I liberally use dropwizard from reader-gtfs, yes.

@michaz

michaz commented May 5, 2019 •

Copy link
Copy Markdown
Member

Ah, I thought we had found out that Dropwizard doesn't support newer Javas yet, and would wait for their update until we really support them?

@michaz

michaz commented May 5, 2019

Copy link
Copy Markdown
Member

But if that activation block is the only thing that's missing, then sure, let's put it in. Totally forgot about that.

@easbar

easbar commented May 6, 2019

Copy link
Copy Markdown
Member Author

Sorry, which activation block is missing ?

@michaz

michaz commented May 6, 2019 •

Copy link
Copy Markdown
Member

What Peter was refering to was adding

<dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
        </dependency>

to the pom of reader-gtfs.

Don't know if that helps, and also don't know why the lack of that would fail on your branch but not on master.

@easbar

easbar commented May 6, 2019

Copy link
Copy Markdown
Member Author

Don't know if that helps, and also don't know why the lack of that would fail on your branch but not on master.

Ok thanks! Looks like the warnings are gone with this, but no idea why there should be a difference to master.

Now the build passed. However I had to start it twice, the first time AppVeyor failed with this:

[ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.249 s <<< FAILURE! - in com.graphhopper.api.GraphHopperGeocodingIT
[ERROR] testExtent(com.graphhopper.api.GraphHopperGeocodingIT)  Time elapsed: 5.013 s  <<< ERROR!
java.lang.RuntimeException: Problem performing geocoding for https://graphhopper.com/api/1/geocode?reverse=false&q=new york&limit=7&locale=en&provider=default&key=78da6e9a-273e-43d1-bdda-8f24e007a1fa: connect timed out
	at com.graphhopper.api.GraphHopperGeocodingIT.testExtent(GraphHopperGeocodingIT.java:38)
Caused by: java.net.SocketTimeoutException: connect timed out
	at com.graphhopper.api.GraphHopperGeocodingIT.testExtent(GraphHopperGeocodingIT.java:38)

and also this:

[ERROR] testPathDetails(com.graphhopper.api.GraphHopperWebIT)  Time elapsed: 5.012 s  <<< ERROR!
java.lang.RuntimeException: Problem while fetching path [49.6724,11.3494, 49.655,11.418]: connect timed out
	at com.graphhopper.api.GraphHopperWebIT.testPathDetails(GraphHopperWebIT.java:310)
Caused by: java.net.SocketTimeoutException: connect timed out
	at com.graphhopper.api.GraphHopperWebIT.testPathDetails(GraphHopperWebIT.java:310)

Looks like it has a 5s time limit ?

edgeId = edgeId << 1;
if (reverse)
return (nodeA > nodeB) ? edgeId : edgeId + 1;
return (nodeA >= nodeB) ? edgeId : edgeId + 1;

@karussell karussell May 6, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is a nice fix! (is it related to this issue?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is one of the two fixes needed here. Imagine a loop edge with nodeA==nodeB. If the edge key is not independent of reverse the bwd search does not find the SPTEntry of the fwd search in updateBestPath and vice versa.

@karussell

Copy link
Copy Markdown
Member

Don't know if that helps, and also don't know why the lack of that would fail on your branch but not on master.

Uhm, this is indeed strange as the travis config files are the same.

However I had to start it twice, the first time AppVeyor failed with this

Thanks for letting us know. Will investigate if there is a hidden problem in our API service.

@easbar
easbar merged commit 57a4bc6 into master May 6, 2019
@easbar
easbar deleted the bidir_turn_restrictions_bug branch May 7, 2019 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edge-based bidirectional algorithms do not agree with Dijkstra when there is a loop and turn restrictions.

3 participants