| lau15 | R Documentation |
lau15 for a traveling salesman problem.15 abstract cities for which a traveling salesman solution is sought. Solution: A path with a length of 291.
The problem environment lau15 is a list with the following functions:
lau15$name(): "lau15", the name of the TSP
problem environment.
lau15$genelength(): 15, the number of cities on the round trip.
lau15$dist(): The distance matrix of the problem.
lau15$cities(): A list of city names or the vector
1:lau15$genelength().
lau15$f (permutation, gene = 0, lF = 0, tour = TRUE):
The fitness function. Computes the roundtrip
for permutation of cities.
lau15$solution(): 291, the known optimal solution of lau15.
lau15$path(): The permutation for the optimal roundtrip.
lau15$show(p): Prints the roundtrip p.
lau15$greedy(startposition, k): Computes a path of length
k starting at startposition
by choosing the nearest city.
lau15$kBestGreedy(k, tour=TRUE):
Computes the best greedy path/tour with
k cities.
lau15$rnd2Opt(permutation, maxtries=5):
Tries to find a better permutation by
at most 5 random 2-opt heuristics.
lau15$LinKernighan(permutation, maxtries=5):
A randomized Lin-Kernigan heuristic implemented
as a sequence of randomized 2-opt moves.
lau15
An object of class list of length 14.
Lau, H. T. (1986): Combinatorial Heuristic Algorithms in FORTRAN. Springer, 1986. p. 61. <doi:10.1007/978-3-642-61649-5>
Other Problem Environments:
DeJongF4Factory(),
DelayedPFactory(),
Parabola2DEarlyFactory(),
Parabola2DErrFactory(),
Parabola2DFactory(),
envXOR,
newEnvXOR(),
newTSP()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.