Skip to content

Commit

Permalink
Fix excluding nodes for one to all query
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex authored and Patrick Niklaus committed May 8, 2018
1 parent c459530 commit 3b4e2e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions features/testbot/distance_matrix.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Feature: Basic Distance Matrix
| a | 0 | 100+-1 |
| b | 100+-1 | 0 |

@ch
Scenario: Testbot - Travel distance matrix of minimal network with toll exclude
Given the query options
| exclude | toll |
Expand All @@ -46,7 +45,6 @@ Feature: Basic Distance Matrix
| c | | | 0 | 100+-1 |
| d | | | 100+-1 | 0 |

@ch
Scenario: Testbot - Travel distance matrix of minimal network with motorway exclude
Given the query options
| exclude | motorway |
Expand All @@ -68,7 +66,6 @@ Feature: Basic Distance Matrix
| | a | b | c | d |
| a | 0 | 300+-2 | 100+-2 | 200+-2 |

@ch
Scenario: Testbot - Travel distance matrix of minimal network disconnected motorway exclude
Given the query options
| exclude | motorway |
Expand All @@ -90,7 +87,6 @@ Feature: Basic Distance Matrix
| | a | b | e |
| a | 0 | 50+-1 | |

@ch
Scenario: Testbot - Travel distance matrix of minimal network with motorway and toll excludes
Given the query options
| exclude | motorway,toll |
Expand Down
6 changes: 6 additions & 0 deletions src/engine/routing_algorithms/many_to_many_mld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ oneToManySearch(SearchEngineData<Algorithm> &engine_working_data,
{
const auto &data = facade.GetEdgeData(edge);
const auto to = facade.GetTarget(edge);

if (facade.ExcludeNode(to))
{
continue;
}

if ((DIRECTION == FORWARD_DIRECTION ? facade.IsForwardEdge(edge)
: facade.IsBackwardEdge(edge)) &&
!query_heap.WasInserted(to))
Expand Down

0 comments on commit 3b4e2e8

Please sign in to comment.