Is there any better approach to shortest path finding within a (vehicular) traffic network?

Dear fellow programmers,

We’re developing software which simulates vehicular traffic.
Part of the process called “assignment” is concerned with assigning vehicles to their routes and has to use some kind of shortest-path-finding algorithm.

Traditionally, people do this with Dijkstra’s, and certain scientific literature seems to indicate that A* and other alternatives don’t give any significant improvement, perhaps due to the nature of the graph.

Hence, we’re using Dijkstra’s as well. A small problem arose in that, if you treat traffic links (spans of roads between intersections) as edges and intersections as nodes, you can’t get a classic uni-directional graph:
when approaching an intersection, where you can turn frequently depends on where you’re coming from, whereas in a traditional graph you can take any edge from a node.

We resolved this problem quite easily by representing a link-intersection pair (call it “lath”) as a node. Since you’d need to traverse a link to get to any subsequent “lath”, or point of choice, an edge would then be defined as this traversal, and you get a typical graph.

The results then are stored in a simple table, N x N, where N is the number of “laths.”

Here’s the (unavoidable?) drawback. If a typical network for our simulation can have, say, 2000 intersections, it will have somewhere around 6000 links, i.e. N = 3V. Obviously, if counted in terms of intersections (V), we’re now up to O(log(3V)*(3V + E)).

You might argue that 3 (or 9) is a constant factor, but from the practical standpoint, it does slow things down quite a bit, and increases storage space to 3V x 3V.

Does anyone have any idea how we can restructure this to improve performance?
Not necessarily any alternative algorithm, perhaps reshape the data structures to fit a graph in some other way?

9

Dijkstra’s finds the shortest path between a given node and all other nodes, so I expect it would be more expensive than A*. However, it looks like you’re trying to pre-compute the cost & path from any node to any other? Then Dijkstra’s is the way to go.

As for a simpler representation, a few things come to mind:

At many intersections, you can come & leave any way you want. It’s only a a subset that you have restrictions like “no left turn.” So you could use the “laths” only for intersections where you actually need them. That should greatly reduce the size right there.

You could do this automatically by looking for “equivalent laths” and combining them. Two laths are equivalent if all the links coming out are the same. E.g. if “Intersection X coming from the West” and “Intersection X coming from the South” both lead to the same set of other nodes, with the same cost, then just merge them into a single node.

Are you sure you need/want to precompute the best path, instead of computing it online? Video games typically compute these things online.

Also, how are you representing the paths? In your matrix, you only need to represent the first link in the path. For example, to get from Bob’s house to Bob’s work, you only need to know the first link, since when they get there, you can now look in your matrix for how to get from the first link to Bob’s work, which will give you the second link, etc.

4

You have large graph and you made it even larger. Martinc C. Martin advised using lathes only when needed, so i will not go into this.

One of things that could help you, is tranform your graph into smaller graphs.

First simplification that helped me a lot (I worked with road networks of europian states) was “removing” nodes with digree 1 and 2 recursively. This way you have no dead end roads, and T intersections (originally degree 3) becomes degree 2 and that is not interesting, if you are not pathing to that node or node in that removed cull de sac.

After that, you can try to divide your graph into parts that have large ammount of internal nodes and edges, but have minimal connection with other parts. To find them, I used minimal cut where sink and source were as far from each other (in edges) from each other and edges near them had huge capacity and edges somewhere in between had small.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật