Question: The following code solves the TSP with no subtours, using an idea that is somewhat similar to the MTZ constraints. ( a ) Explain how
The following code solves the TSP with no subtours, using an idea
that is somewhat similar to the MTZ constraints.
a Explain how the code ensures there are no subtours in the
solution.
b What is the code in arcs, in :
doing? Why?
c Run this code using the gurobi solver for different numbers
of cities using the data provided in LNPdat.txt but
only consider a small number of cities. Do the results look
reasonable?
Note that this code will produce an 'error', which is that some
invalid subscripts are discarded. AMPL is just removing the
diagonal data which are not required for this code, but it
is not a problem because AMPL will still compute a solution.
It is possible to remove the diagonals but they are required
for other code, so I've left them in
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
