R/findShortestHamiltonianPath.R
findShortestHamiltonianPath.Rd
Find the Shortest Hamiltonian Path between two cities by means of a TSP formulation.
findShortestHamiltonianPath(x, start.id, dest.id)
x | [Network] Network (see package netgen). |
---|---|
start.id | [integer(1)] ID of the start node. |
dest.id | [integer(1)] ID of the end node. |
[integer] Shortest hamiltonian path.
At the moment the function only works correctly if start.id = 1 and dest.id = 2 or vice versa and the input graph has exactly two depots.