fix nodes exclusion… even more

This commit is contained in:
Laura Klünder 2017-12-27 12:13:32 +01:00
parent 75db1b3ac3
commit 37810ea928

View file

@ -391,7 +391,7 @@ class Router:
graph[waytype.nonupwards_indices.transpose().tolist()] *= 100000
# exclude spaces and edges
space_nodes = tuple(reduce(operator.or_, (self.spaces[space] for space in restrictions.spaces), set()))
space_nodes = tuple(reduce(operator.or_, (self.spaces[space].nodes for space in restrictions.spaces), set()))
graph[space_nodes, :] = np.inf
graph[:, space_nodes] = np.inf
graph[restrictions.edges.transpose().tolist()] = np.inf