R/computeTourLength.R
computeTourLength.Rd
Compute tour length given a TSP instance and a tour/permutation.
computeTourLength(x, tour, close.tour = TRUE, round = FALSE)
[Network] TSP instance.
Network
[integer] Permutation of nodes.
integer
[logical(1)] Should the tour be closed? I.e., do we want a roundtrip tour? Default is TRUE.
logical(1)
TRUE
[logical] Should the distances be rounded? Default is FALSE. Concorde internally does this.
logical
FALSE
[numeric(1)]
numeric(1)