I need to solve instances of the Directed Hamiltonian Cycle Problem (DHCP). I know that I can reduce the problem to TSP and then use a TSP solver like concorde.
I am unable to figure out though how to make concorde abort when a Hamiltonian cycle was found, i.e. when it found a solution with a given (by the reduction) upper bound.
Does anyone know of a solver for DHCP itself, or a TSP solver that features early abort when a specified upper bound was reached?
EDIT: I wrote to the maintainer of concorde, and apparently the
-u flag allows to specify a numeric upper bound on which the solver terminates as soon as it is reached.