## 6 Computational Results
### TSP Implementation in GAMS
ALIAS (I,J):

PARAMETERS

N;

N-CAND(I);

TABLE C(I,J) adjacency matrix

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

1 0
2 257 0

3 87 196 0

4 91 228 158 0

5 150 112 96 120 0

6 80 196 88 77 63 0

7 130 167 59 101 56 25 0

8 134 154 63 105 34 29 22 0 0

9 243 208 226 159 10 216 229 225 0

10 185 86 124 156 40 124 95 82 207 0

11 124 223 49 185 123 115 66 90 313 151 0

12 70 191 121 27 83 47 64 68 173 119 148 0

13 272 180 315 188 193 245 258 228 29 159 342 209 0

14 219 83 172 149 193 134 112 26 26 291 159 53 97 0

15 259 50 232 264 148 232 203 190 284 122 259 227 19 134 0

16 54 219 92 82 119 31 43 58 238 147 84 53 267 170 255 0

17 211 74 81 182 105 150 121 108 310 37 160 145 196 99 125 173 0

18 290 139 89 262 144 176 146 163 809 116 174 226 175 184 190 79 0

19 268 53 138 239 123 207 178 165 367 86 187 202 227 130 68 230 57 86 0

20 261 43 200 232 98 200 171 131 166 90 227 195 137 69 0 0

21 175 128 76 146 27 47 302 56 103 109 225 104 164 90 57 112 114 134 0

22 250 99 89 221 105 189 160 147 349 76 138 104 235 138 114 212 39 40 46 136 96 0

23 192 228 225 108 119 165 178 154 71 136 262 110 74 96 264 187 182 261 239 165 151 221 0

24 21 124 29 84 35 29 42 36 220 70 126 504 104 178 60 96 175 134 47 135 169 0;

SET C2(I,J):

C2(I,J)(NOT SAMEAS(I,J)) = yes;

C(C2(I,J)) = MAX(C(I,J),C(J,I));

VARIARLES

X(I,J)

delta(I)

Z;

BINARY VARIABLE X(I,J);

EQUATIONS

EQ1(J) each city is entered exactly once

EQ2(I) each city is left exactly once

EQ3(I,J) subterm elimination constraints

EQ4 objective function;

EQ1(J).. SNN(I,X(I,J)S(ORD(I) NE OND(J))) =E- 1;

EQ2(I).. SNN(X,I)S(ORD(I) NE OND(J))) =E- 1;

EQ3(I,J)S(ORD(I) NE OND(I)) (ODE(I) NE OND(I)))

.. delete(I)-delta(J)+N*X(I,J) = L-N;

EQ4.. Z=E-SUM((I,J)C(I,J)*X(I,J));

MODEL TSP/ALL;

SOLVE TSP USING MIP thresholding Z;

DISPLAY L.L, Z.L;

The total length of the route is 1272, the decision variables \(x_{i,j}\) have a value of 1 in the following order: \(x_{1,16}\), \(x_{16,11}\), \(x_{11,3}\), \(x_{37}\), \(x_{7,6}\), \(x_{6,24}\), \(x_{24,8}\), \(x_{8,21}\), \(x_{21,5}\), \(x_{5,10}\), \(x_{10,17}\), \(x_{17,22}\), \(x_{22,18}\), \(x_{18,19}\)N-CARD(I);

TABLE XY(I,*)

1 2
1 565.0 575.0

2 25.0 188.0

3 345.0 750.0

4 945.0 685.0

5 845.0 685.0

6 880.0 660.0

7 25.0 230.0

8 525.0 1000.0

9 580.0 1175.0

10 650.0 1130.0

11 1605.0 620.0

12 1220.0 580.0

13 1465.0 200.0

14 1530.0 5.0

15 845.0 680.0

16 725.0 370.0

17 145.0 685.0

18 415.0 685.0

19 510.0 875.0

20 560.0 368.0

21 300.0 465.0

22 520.0 585.0

23 480.0 415.0

24 835.0 425.0

25 975.0 580.0

26 1215.0 245.0

27 1320.0 315.0

28 1250.0 400.0

29 660.0 180.0

30 410.0 250.0

31 420.0 555.0

32 575.0 665.0

33 1150.0 1160.0

34 700.0 580.0

35 685.0 585.0

36 685.0 610.0

37 770.0 610.0

38 795.0 645.0

39 720.0 635.0

40 760.0 650.0

41 475.0 960.0

42 95.0 250.0

43 875.0 920.0

44 700.0 500.0

45 555.0 815.0

46 830.0 485.0

47 1170.0 65.0

48 830.0 610.0

49 605.0 625.0

50 695.0 360.0

51 1340.0 725.0

52 1740.0 245.0;

PARAMETERS C(I,J);

SET C2(I,J);

C2(I,J)*(NOT SAMEA(I,J)) = yes;

C(C2(I,J)) = ROUND(SORT(SORT(X(I,'1')-XY(J,'1'))+SQR(XY(I,'2')-XY(J,'2'))));

The total length of the route is 7542, the calculation time was 1.45 s and the circuitous route passes through positions 1, 49, 32, 45, 19, 41, 8, 9, 10, 43, 33, 51, 11, 52, 14, 13, 47, 26, 27, 28, 12, 25, 4, 6, 15, 5, 24, 48, 38, 37, 40, 39, 36, 35, 34, 44, 46, 16, 29, 50, 20, 23, 30, 2, 7, 42, 21, 17, 3, 18, 31, 22, 1.