I'm trying to use the DFJ formulation to solve TSPLib problems using JuMP and Gurobi. I want to add a constraint to the starting point by fixing either the start or the end to the first node (because that's the assumption that TSPLib makes - at least for the symmetric TSP dataset). However, this results in an optimal solution not found, but removing this constraint yields a tour where the first node is visited in between the tour.

I wondering how one can add such a constraint to the DFJ formulation, if fixing values doesn't work.

  • 2
    $\begingroup$ Are you dealing with a classic TSP without further constraints such as time windows and time-dependent travel times? If that is the case, it would not matter which of the nodes is the depot, since you only want a cost-minimal tour. $\endgroup$
    – PeterD
    Feb 2 at 10:00
  • $\begingroup$ It's a constraint I want to place - that there is a depot/start point, but there are no delivery windows for any other node. I'll look into time windows - maybe that'll help me. $\endgroup$
    – skittish
    Feb 2 at 15:58
  • $\begingroup$ @skittish, welcome to OR.SE. One possible option would be to change a classic VRP problem in which the depot being as a starting point and you have one whole tour. $\endgroup$
    – A.Omidi
    Feb 2 at 21:01
  • $\begingroup$ Could you share some code snippet? $\endgroup$ Feb 13 at 12:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.