fix weird routing error. should never have worked anyway… wtf?
This commit is contained in:
parent
675b0d5662
commit
b091a2838c
1 changed files with 5 additions and 2 deletions
|
@ -286,6 +286,9 @@ class Graph:
|
||||||
if not len(orig_points_i) or not len(dest_points_i):
|
if not len(orig_points_i) or not len(dest_points_i):
|
||||||
raise AlreadyThere()
|
raise AlreadyThere()
|
||||||
|
|
||||||
|
#if set(orig_points_i) & set(dest_points_i):
|
||||||
|
# raise AlreadyThere()
|
||||||
|
|
||||||
add_orig_point = origin if isinstance(origin, PointLocation) else None
|
add_orig_point = origin if isinstance(origin, PointLocation) else None
|
||||||
add_dest_point = destination if isinstance(destination, PointLocation) else None
|
add_dest_point = destination if isinstance(destination, PointLocation) else None
|
||||||
|
|
||||||
|
@ -371,8 +374,8 @@ class Graph:
|
||||||
|
|
||||||
# noinspection PyTypeChecker
|
# noinspection PyTypeChecker
|
||||||
from_point, to_point = np.argwhere(shortest_paths == distance)[0]
|
from_point, to_point = np.argwhere(shortest_paths == distance)[0]
|
||||||
from_point = orig_room_points[from_point]
|
from_point = orig_room_points[room][from_point]
|
||||||
to_point = dest_room_points[to_point]
|
to_point = dest_room_points[room][to_point]
|
||||||
best_route = RoomRouteSegment(room, routers, from_point, to_point).as_route()
|
best_route = RoomRouteSegment(room, routers, from_point, to_point).as_route()
|
||||||
|
|
||||||
# get reachable room transfer points and their distance
|
# get reachable room transfer points and their distance
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue