Calcualting Optimal Site to Site Routing using pre-computed times between sites

Posted by Idistic on Stack Overflow See other posts from Stack Overflow or by Idistic
Published on 2012-04-11T05:24:19Z Indexed on 2012/04/11 5:29 UTC
Read the original article Hit count: 233

Filed under:
|
|

Assume that I have a number of sites (locations) and the time it takes to travel from each site to each site is pre-computed

Example Data - Site to Site Pre-Calculated Times in minutes

From Start Site
To A 20
To B 15
To C 15

From Site A
To B 10
To C 15

Site B
To A 10
To C 20

Site C
To A 15
To B 20

4 Sites is fairly simple, but what if the site set was say 1000 sites?

Given a large site set What would the best approach be to quickly find the optimal routes from the start site while visiting every other site just once?

Route Solutions from Start Site for 3 sites from a start site

1 A(20) B(10) C(20) = 50
2 A(20) C(15) B(20) = 55

3 B(15) A(10) C(15) = 40
4 B(15) C(20) A(15) = 50

5 C(15) A(15) B(10) = 40
6 C(15) B(20) A(10) = 45

© Stack Overflow or respective owner

Related posts about java

Related posts about routing