Traveling Salesman Problem (TSP) is a classical NP and studied widely in the operation research community.

A classical approach to solve TSP is using Integer Linear Programming (ILP).

Gurobi provides a nice ILP formulation, while Google also has a blog on this topic.

Some discussion about subtour elimination constraints can be found here,