Explored 0 nodes (0 simplex iterations) in 0.01 seconds
Thread count was 1 (of 8 available processors)
Solution count 2: 3 1
Optimal solution found (tolerance 1.00e-04)
Best objective 3.000000000000e+00, best bound 3.000000000000e+00, gap 0.0000%
```
```python
ifmodel.Status==GRB.OPTIMAL:# an optimal solution has been found
print("=== Optimal Solution ===")
print(f"x={x.X}")
print(f"y={y.X}")
print(f"z={z.X}")
elifmodel.SolCount>0:# there exists a feasible solution
print("=== Suboptimal Solution ===")
print(f"x={x.X}")
print(f"y={y.X}")
print(f"z={z.X}")
else:
print(f"Bad solution (code {model.Status}).")
print(
"See status codes on https://www.gurobi.com/documentation/9.5/refman/optimization_status_codes.html#sec:StatusCodes"
)
```
> Caveat: Due to the underlying technique, the resulting variables may not be rounded. A boolean variable could take the value 0.00001 instead of 0, so you have to round to check them.
## Tasks
* Model the BTSP as a Mixed Integer Program on paper. Use the [constraint technique](https://en.wikipedia.org/wiki/Travelling_salesman_problem#Dantzig%E2%80%93Fulkerson%E2%80%93Johnson_formulation) already used for SAT to enforce a single tour and do not use the [technique](https://en.wikipedia.org/wiki/Travelling_salesman_problem#Miller%E2%80%93Tucker%E2%80%93Zemlin_formulation[21]) used with CP-SAT (as it performs poorly with MIP-solvers).