每一座楼都有两层楼的楼群,两层楼的楼梯连接起来。 目前,Im试图设计一个能够在两点之间找到最短距离的系统,即同一楼或另一栋楼。
At the moment each floor is modeled in a graph as follows: the door of each room is a vertex. the junctions of edges connecting the rooms to the main edge(corridor) is also a vertex. The stairs between the floors are edges.
The question that remains is how should I represent the lifts(elevators) (which are right next to the stairs)? To have it as an edge makes me wonder what weight it should have, given that I ll have to run a graph traversal algorithm after for finding the shortest path.
Lift(elevator) as edge or as vertex? That is the question. thanks!