Question: How do I obtain a continuous minimum path for a given end-point using Dijkstra's algorithm?

I wish to extract a minimum route in a network given both start and end positions.

Also, I wish to avoid a spur in the circuit and obtain one continuous orthogonal  path. 

As an example, take the 7-node case having 14 arcs (see worksheet) using Dijkstra's algorithm (I assume this is fit for purpose in this particular case).

Starting with node 1, the algorithm suggests the paths:

1>2>3>4>5>6>7.>8>9 and 1>2>3>4>5>10>11>12>13>14 (here, there is a spur at node 5 where the paths separate)

Is it possible obtain one minimum path?

The source node is prescribed in the routine - can anyone explain how to prescribe the end node?

Thanks for reading!

Shortest_Circuit.mw

 

Please Wait...