Skip to content

Extracted blocking edges/areas from GenericWeighting into BlockedWeighting - #1029

Closed
asdzxcasd wants to merge 1 commit into
graphhopper:masterfrom
asdzxcasd:issue_958_blocking_edges
Closed

asdzxcasd wants to merge 1 commit into
graphhopper:masterfrom
asdzxcasd:issue_958_blocking_edges

Conversation

@asdzxcasd

@asdzxcasd asdzxcasd commented Apr 12, 2017 •

Copy link
Copy Markdown

Related issue: #958
I'm not sure about one thing: is it OK to change order of checks in GenericWeighting.calcWeight? When using GenericWeighting with BlockedWeighting now it is firstly checked that edge is not blocked and then other checks from GenericWeighting go. Can it affect performance in any way?

@asdzxcasd asdzxcasd changed the title Extracted blocking edges/areas from GenericWeighting into BlockedWeighting #958 Extracted blocking edges/areas from GenericWeighting into BlockedWeighting Apr 12, 2017

@boldtrn boldtrn left a comment

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.

Thanks for your work and sorry for the late review. Your PR looks good to me. Would you mind changing the behavior in GraphHopper.java. I think we can move the whole blocking part after the GenericWeighting has be created. If there is something to block we create the BlockedWeighting, otherwise we continue to use the GenericWeighting.

GenericWeighting genericWeighting = new GenericWeighting(dataEncoder, cMap);
genericWeighting.setGraph(graph);
return genericWeighting;
BlockedWeighting blockedWeighting = new BlockedWeighting(genericWeighting, cMap);

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.

We should only use the BlockedWeighting, if we actually block something, otherwise we could only use the GenericWeighting

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.

It furthermore should be wrappable with the FastestWeighting and potentially others, but this might be dependent on #940. Will investigate what is possible.

@boldtrn

boldtrn commented Apr 21, 2017

Copy link
Copy Markdown
Member

I am not sure if you already send us the CLA?

BTW: This is not mandatory for this PR, but the overall idea for the BlockedWeighting was that we can use this for all Weightings/Encoders, similar to what we do with the AvoidEdgesWeighting. If you feel like adding this to this PR or after this PR was merged, this would be a great addition as well.

@asdzxcasd

asdzxcasd commented Apr 26, 2017 •

Copy link
Copy Markdown
Author

Thanks for review. I'll try to fix it.

Regarding CLA, I'd like to accept it, but I'm not sure how to do it as there is no submit button on that page. Or should I do it in some other way?

@karussell

Copy link
Copy Markdown
Member

Thanks & just send this CLA to the info email here: https://www.graphhopper.com/imprint/

@karussell

Copy link
Copy Markdown
Member

We'll go on with #1078 as no feedback here.

@karussell karussell closed this May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants