findShortestHamiltonianPath: Shortest Hamiltonian Path computation.

Description Usage Arguments Value Note

View source: R/findShortestHamiltonianPath.R

Description

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

Usage

1
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.


jakobbossek/salesperson documentation built on Dec. 11, 2021, 4:54 a.m.