-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmtsp.lp
87 lines (87 loc) · 3.75 KB
/
mtsp.lp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Minimize
0 e_0_0 + 1.414213562373095 e_0_1 + 2.23606797749979 e_0_2
+ 3.16227766016838 e_0_3 + 1.414213562373095 e_0_4
+ 2.23606797749979 e_0_5 + 3.16227766016838 e_0_6
+ 1.414213562373095 e_1_0 + e_1_2 + 2 e_1_3 + 2 e_1_4
+ 2.23606797749979 e_1_5 + 2.82842712474619 e_1_6
+ 2.23606797749979 e_2_0 + e_2_1 + e_2_3 + 2.23606797749979 e_2_4
+ 2 e_2_5 + 2.23606797749979 e_2_6 + 3.16227766016838 e_3_0 + 2 e_3_1
+ e_3_2 + 2.82842712474619 e_3_4 + 2.23606797749979 e_3_5 + 2 e_3_6
+ 1.414213562373095 e_4_0 + 2 e_4_1 + 2.23606797749979 e_4_2
+ 2.82842712474619 e_4_3 + e_4_5 + 2 e_4_6 + 2.23606797749979 e_5_0
+ 2.23606797749979 e_5_1 + 2 e_5_2 + 2.23606797749979 e_5_3 + e_5_4
+ e_5_6 + 3.16227766016838 e_6_0 + 2.82842712474619 e_6_1
+ 2.23606797749979 e_6_2 + 2 e_6_3 + 2 e_6_4 + e_6_5 + 0 u_0
Subject To
R0: e_0_1 + e_0_2 + e_0_3 + e_0_4 + e_0_5 + e_0_6 = 3
R1: e_1_0 + e_2_0 + e_3_0 + e_4_0 + e_5_0 + e_6_0 = 3
R2: e_0_1 + e_1_1 + e_2_1 + e_3_1 + e_4_1 + e_5_1 + e_6_1 = 1
R3: e_0_2 + e_1_2 + e_2_2 + e_3_2 + e_4_2 + e_5_2 + e_6_2 = 1
R4: e_0_3 + e_1_3 + e_2_3 + e_3_3 + e_4_3 + e_5_3 + e_6_3 = 1
R5: e_0_4 + e_1_4 + e_2_4 + e_3_4 + e_4_4 + e_5_4 + e_6_4 = 1
R6: e_0_5 + e_1_5 + e_2_5 + e_3_5 + e_4_5 + e_5_5 + e_6_5 = 1
R7: e_0_6 + e_1_6 + e_2_6 + e_3_6 + e_4_6 + e_5_6 + e_6_6 = 1
R8: e_1_0 + e_1_1 + e_1_2 + e_1_3 + e_1_4 + e_1_5 + e_1_6 = 1
R9: e_2_0 + e_2_1 + e_2_2 + e_2_3 + e_2_4 + e_2_5 + e_2_6 = 1
R10: e_3_0 + e_3_1 + e_3_2 + e_3_3 + e_3_4 + e_3_5 + e_3_6 = 1
R11: e_4_0 + e_4_1 + e_4_2 + e_4_3 + e_4_4 + e_4_5 + e_4_6 = 1
R12: e_5_0 + e_5_1 + e_5_2 + e_5_3 + e_5_4 + e_5_5 + e_5_6 = 1
R13: e_6_0 + e_6_1 + e_6_2 + e_6_3 + e_6_4 + e_6_5 + e_6_6 = 1
R14: 3 e_0_1 - e_1_0 + u_1 <= 4
R15: 3 e_0_2 - e_2_0 + u_2 <= 4
R16: 3 e_0_3 - e_3_0 + u_3 <= 4
R17: 3 e_0_4 - e_4_0 + u_4 <= 4
R18: 3 e_0_5 - e_5_0 + u_5 <= 4
R19: 3 e_0_6 - e_6_0 + u_6 <= 4
R20: e_0_1 + 2 e_1_0 + u_1 >= 2
R21: e_0_2 + 2 e_2_0 + u_2 >= 2
R22: e_0_3 + 2 e_3_0 + u_3 >= 2
R23: e_0_4 + 2 e_4_0 + u_4 >= 2
R24: e_0_5 + 2 e_5_0 + u_5 >= 2
R25: e_0_6 + 2 e_6_0 + u_6 >= 2
R26: e_0_1 + e_1_0 <= 1
R27: e_0_2 + e_2_0 <= 1
R28: e_0_3 + e_3_0 <= 1
R29: e_0_4 + e_4_0 <= 1
R30: e_0_5 + e_5_0 <= 1
R31: e_0_6 + e_6_0 <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