Skip to content

Commit 3b4e2e8

Browse files
TheMarexPatrick Niklaus
authored andcommitted
Fix excluding nodes for one to all query
1 parent c459530 commit 3b4e2e8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

features/testbot/distance_matrix.feature

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Feature: Basic Distance Matrix
2121
| a | 0 | 100+-1 |
2222
| b | 100+-1 | 0 |
2323

24-
@ch
2524
Scenario: Testbot - Travel distance matrix of minimal network with toll exclude
2625
Given the query options
2726
| exclude | toll |
@@ -46,7 +45,6 @@ Feature: Basic Distance Matrix
4645
| c | | | 0 | 100+-1 |
4746
| d | | | 100+-1 | 0 |
4847

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

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

93-
@ch
9490
Scenario: Testbot - Travel distance matrix of minimal network with motorway and toll excludes
9591
Given the query options
9692
| exclude | motorway,toll |

src/engine/routing_algorithms/many_to_many_mld.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ oneToManySearch(SearchEngineData<Algorithm> &engine_working_data,
276276
{
277277
const auto &data = facade.GetEdgeData(edge);
278278
const auto to = facade.GetTarget(edge);
279+
280+
if (facade.ExcludeNode(to))
281+
{
282+
continue;
283+
}
284+
279285
if ((DIRECTION == FORWARD_DIRECTION ? facade.IsForwardEdge(edge)
280286
: facade.IsBackwardEdge(edge)) &&
281287
!query_heap.WasInserted(to))

0 commit comments

Comments
 (0)