2-opt (source code)

= 2-opt
{wiki}

A 2-opt tour move removes two boundary arcs and reverses the intervening block to reconnect one tour. Such moves define a local-search neighbourhood; block reversals of length two include adjacent swaps and hence connect permutation schedules. For directed costs the <asymmetric 2-opt reversal cost> must include every reversed internal arc, not just the boundary changes.