English 中文(简体)
多层平面图
原标题:multi-level floor plan graph mapping

每一座楼都有两层楼的楼群,两层楼的楼梯连接起来。 目前,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!

最佳回答

Edges

使用边缘是最直接的答案,就像你对楼梯所做的那样。 然而,虽然楼梯只能从X楼到X+1楼,但电梯可以从任何楼层到任何楼层,时间稍有不同——我通常发现两层楼的楼梯较快,但比2层更慢。 为了反映这一点,“现今”需要从每一层到每一层“的垫子,并填写每个层的重量。

Vertices

否则,你可能会有一些额外的vert和edge。 如果你在电梯的每一层都有一个透镜,那么你只需要一条连接所有地层的双向通道,而不是连接多个边。

如果你在每一级门外增加一个外溢,那么你可以增加电梯的平均延迟,从而反映电梯能够迅速穿过多层。 然而,电梯将最需要平均时间。 在繁忙的时期,他们可以最终在几乎每个地板上停下来,这样,在繁忙的校园里,你不会真正从这些外事中获得好处。


我的表决是,每一层电梯和一对冲之间连接毗邻层。 它应当简化图表,减少任何道路优化算法的努力,因为途径较少。 此外,这更准确地反映了现实,尽量减少了你的负担,以确立优势。

问题回答

If the lifts are a possible shortest path from one floor to the next, then they must be edges with weights. The entrances to each level are vertices. If close enough to the stairs then they are possible shared with the stair vertices.

我对edge投了票。

你们选择使用电梯。 你们走了路,走了新闻塔顿,走了一步。 之后,你走了路,等待更多人,走出去,继续走下去。 现在,尽管你在身体上没有动向,但你正在流动。 说,在楼面之间打电像步行一样,是50米。

我指的是,在电梯周围停留的时间相当于你行走的距离。 因此,在你使用电梯期间,将电梯视为你正在行走的边缘。 也就是说,利用这一距离来比较梯度。





相关问题
XML-RPC Standard and XML Data Type

I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...

Is it exists any "rss hosting" with API for creating feeds

I am creating a desktop app that will create some reports. I want to export these reports as RSS or ATOM feeds. I can easily create feeds with Rome lib for Java. But I have no idea how to spread them. ...

Improving Q-Learning

I am currently using Q-Learning to try to teach a bot how to move in a room filled with walls/obstacles. It must start in any place in the room and get to the goal state(this might be, to the tile ...

High-traffic, Highly-secure web API, what language? [closed]

If you were planning on building a high-traffic, very secure site what language would you use? For example, if you were planning on say building an authorize.net-scale site, that had to handle tons ...

Def, Void, Function?

Recently, I ve been learning different programming langages, and come across many different names to initalize a function construct. For instance, ruby and python use the def keyword, and php and ...