2 %> Generate one random 2-opt neighbor
for the TSP
8 %> @author Michel Bierlaire
9 %> @date Sun Apr 19 13:37:59 2015
10 %> @ingroup Algorithms
13 %> Generate one random 2-opt neighbor
for the TSP
14 %> @param cities current tour
15 %> @
return neighbor the selected neighbor
20 neighbor =
twoOpt(cities,i,j) ;
function tspSimulatedAnnealing(in tour, in dist)
function twoOpt(in cities, in c1, in c2)
Perform a 2-opt operation of a list of cities.
function randomFromAtoB(in A, in B)
Compute a random integer between A and B.
function twoOptRandomNeighbor(in cities)
Generate one random 2-opt neighbor for the TSP.