Find the Shortest Hamiltonian Path between two cities by means of a TSP formulation.

findShortestHamiltonianPath(x, start.id, dest.id)

Arguments

x

[Network] Network (see package netgen).

start.id

[integer(1)] ID of the start node.

dest.id

[integer(1)] ID of the end node.

Value

[integer] Shortest hamiltonian path.

Note

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.