Home / Computer science / Traveling salesman problem (TSP) / Computation: Python, SAT, MTZ
Objective function
\begin{equation*}
y = \sum_{i = 1}^{n} \sum_{j = 1}^{n} d_{ij} x_{ij} \to \min
\end{equation*}
y = sum(d[i][j] * x[i][j] for i in range(n) for j in range(n))
model.minimize(y)