hi,

first of all the traversal paths need to be well defined. i.e. which all are the possible traversals.

example.

startPoint-->level1facility1-->level2facility1-->client1

startPoint-->level1facility1-->level2facility2-->client2

startPoint-->level1facility1-->level2facility3-->client3

--------------------------------------------------------

.................................etc.

Basically, what this algo solves is :

what is the minimal cost path to reach from say,level1facility1 to client3 ??

Now select a suitable data structure. A graph would be helpful in this case to represent the levels. Thinking in terms of a generic solution and not just limited to 3 levels.

If you select a graph the Dijkstra's algorithm[^] would help you.

hope this helps !!

OR

take a look at Genetic Algorithms and the Traveling Salesman Problem[

title="New Window">^] and see how it suits your case.

15,920,596 members