Travelling salesman variation in python

Diez B. Roggisch deetsNOSPAM at web.de
Fri Apr 2 06:45:57 EST 2004


You could go for local search. First, create a randow tour. Then select a
neighborhood. Find the local minimum for that neighborhood. Do this as
often as you like.

A typical neighborhood for tsps are four nodes where two of them are
adjacent in your tour. Then  exchange the nodes so that they still form a
tours. If that has less costs, keep it that way.

--n1--n2--
--n3--n4--

becomes

--n1\/n2--
--n3/\n4--

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list