-
Notifications
You must be signed in to change notification settings - Fork 0
/
basis.LTX
267 lines (217 loc) · 5.25 KB
/
basis.LTX
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
!CHANGES
!1) buffer time M11 12 or greater (great improvements)
!2) increasing TT for K10E20 and K10M20 (didn't do much)
!3) buffer time K11 increasing with x min
!4) increasing TT for M11K10 (percentage missed decreased to 5.38)
min totcost
s.t.
!buffers are used as running time supplements
! transfer times have a minimum value
TTMIN=3
TTK11C21-TTMIN>0
TTK11C10-TTMIN>0
TTC10K20-TTMIN>0
TTK10E20-TTMIN>2
TTK10M20-TTMIN>2
TTE11K21-TTMIN>9
TTM11K21-TTMIN>0
TTM11K10-TTMIN>2
!Ideal buffer times
!Hasselt
IBK1C1=5
IBK1C0=9
IBC0K0=4
!Leuven
IBK0E0=2
IBK0M0=2
IBE1K1=2
IBM1K1=7
IBM1K0=10
!Different lines
!C10
DC10He<60
DC10He +STC0Aa -DC10Aa = -9 !IRCHeAa=9; ideal running times, IR train
DC10Aa +BC0AaHa -AC10Ha = -26 !IRCAaHa=26
STC0Aa > 1 !
!C11
DC11Ha<60
DC11Ha+STC1Aa -DC11Aa= -26
DC11Aa-AC11He= -9
STC1Aa >1
!E10
DE10Le<60
DE10Le+STE0Aa -DE10Aa= -12 !ICELeAa= 12; ideal running times, IC train
DE10Aa-AE10Ha=-25 !ICEAaHa= 25
STE0Aa >1
!E11
DE11Ha<60
DE11Ha+STE1Aa -DE11Aa=-25
DE11Aa+BE1AaLe -AE11Le=-12
AE11Le<180
STE1Aa >1
!K10
DK10Ha<60
DK10Ha+STK0Al -DK10Al=-6 !ICKHaAl=6
DK10Al+STK0St -DK10St=-8 !ICKAlSt=8
DK10St+STK0La -DK10La=-9 !ICKStLa=9
DK10La+BK0LaLe -AK10Le=-27 !ICKLaLe=27
AK10Le<120
STK0Al>1
STK0St>1
STK0La>1
!K11
DK11Le<60
DK11Le+STK1La -DK11La=-27
DK11La+STK1St -DK11St=-9
DK11St+STK1Al -DK11Al=-8
DK11Al+BK1AlHa -AK11Ha=-6
BK1AlHa > 10 !extra constrain so the buffer time is longer than ideal (to reduce the missed transfers)
AK11Ha<120
STK1Al>1
STK1St>1
STK1La>1
!M10
DM10Le<60
DM10Le+STM0Aa -DM10Aa=-14 !LMLeAa=14; ideal running times, L train
DM10Aa-AM10He=-12 !LMAaHe=12
STM0Aa>1
!M11
DM11He<60
DM11He+STM1Aa -DM11Aa=-12
DM11Aa+BM1LeAa -AM11Le=-14
BM1LeAa > 12 !extra constrain so the buffer time is longer than ideal (to reduce the missed transfers)
!variation of these don't work
!BE1AALE >4
!BK0LALE > 4
AM11Le<120
STM1Aa>1
AM11Le+STM1Le -DM20Le<0 !(because it is the same train turning around in Leuven)
STM1Le>1
!transfers
DK20Ha -AC10Ha-TTC10K20=0
DK21Le -AE11Le-TTE11K21=0
DE20Le -AK10Le-TTK10E20=0
DM20Le -AK10Le-TTK10M20=0
AC10Ha+STC0Ha -AK11Ha-TTK11C10=0
DC21Ha -AK11Ha-TTK11C21=0
DK21Le -AM11Le-TTM11K21=0
AK10Le+STK0Le -AM11Le-TTM11K10=0
!Stopping times, additional ones due to transfertimes
STC0Ha>1
STK0Le>1
!compare ideale buffer times with scheduled buffer times
IBC0K0+UC0K0p-UC0K0n -BC0AaHa=0
IBE1K1+UE1K1p-UE1K1n -BE1AaLe=0
IBK0E0+UK0E0p-UK0E0n -BK0LaLe=0
IBK1C0+UK1C0p-UK1C0n -BK1AlHa=0
IBK1C1+UK1C1p-UK1C1n -BK1AlHa=0
IBK0M0+UK0M0p-UK0M0n -BK0LaLe=0
IBM1K0+UM1K0p-UM1K0n -BM1LeAa=0
IBM1K1+UM1K1p-UM1K1n -BM1LeAa=0
!single track between Alken and Landen
!Sequence 10-11-20-21-30-31
!St-Al
DK10Al -DK11St<-8 !ICKAlSt=8
DK11St -DK20Al<-8
!St-La
DK10St -DK11La<-9 !ICKStLa=9
DK11La -DK20St<-9
!transfertimes, Stopping times in stations and deviations from the ideal running time supplements
!TT>3: transfer passengers will have to wait longer in the stations, weight 2 in the station, this has no influence for other passengers
!STCOST, if a train stops in the station, the through passengers have to wait inside the train (1,5)
!deviations from the ideal buffer time are uneg or upos!!!
!all this must be multiplied bij 10^4 to calculate the real cost.
0.024TTK11C21+1.68TTK11C10+0.024TTC10K20+0.030TTK10E20
+0.028TTK10M20+0.059TTE11K21+0.049TTM11K21+2.934TTM11K10
-TTCOST=14.27 !=0
0.15STC0Aa+0.15STC1Aa+2.7STE0Aa+2.7STE1Aa+1.35STK0Al+1.35STK1Al
+0.76STK0St+0.76STK1St+0.87STK0La+0.87STK1La+0.45STM0Aa+0.45STM1Aa
+0.26STC0Ha+6.5STK0Le
-STCOST=0
0.33UK1C1p+0.9UK1C1n+1.19UK1C0p+3.65UK1C0n+0.18UC0K0p+0.58UC0K0n
+3.36UK0E0p+1.96UK0E0n+3.36UK0M0p+1.93UK0M0n+1.52UE1K1p+1.11UE1K1n
+3UM1K1p+3UM1K1n+1.08UM1K0p+2.11UM1K0n
-DEVIAT=0
TTCOST+STCOST+DEVIAT -TOTCOST=0
!To guarantee periodicity
!C20
!DC20He-DC10He=60
!DC20Aa-DC10Aa=60
!AC20Ha-AC10Ha=60
!C30
!DC30He-DC20He=60
!DC30Aa-DC20Aa=60
!AC30Ha-AC20Ha=60
!C21
DC21Ha-DC11Ha=60
!DC21Aa-DC11Aa=60
!AC21He-AC11He=60
!C31
!DC31Ha-DC21Ha=60
!DC31Aa-DC21Aa=60
!AC31He-AC21He=60
!E20
DE20Le-DE10Le=60
!DE20Aa-DE10Aa=60
!AE20Ha-AE10Ha=60
!E30
!DE30Le-DE20Le=60
!DE30Aa-DE20Aa=60
!AE30Ha-AE20Ha=60
!E21
!DE21Ha-DE11Ha=60
!DE21Aa-DE11Aa=60
!AE21Le-AE11Le=60
!E31
!DE31Ha-DE21Ha=60
!DE31Aa-DE21Aa=60
!AE31Le-AE21Le=60
!K20
DK20Ha-DK10Ha=60
DK20Al-DK10Al=60
DK20St-DK10St=60
!DK20La-DK10La=60
!AK20Le-AK10Le=60
!K30
!DK30Ha-DK20Ha=60
!DK30Al-DK20Al=60
!DK30St-DK20St=60
!DK30La-DK20La=60
!AK30Le-AK20Le=60
!K21
DK21Le-DK11Le=60
!DK21La-DK11La=60
!DK21St-DK11St=60
!DK21Al-DK11Al=60
!AK21Ha-AK11Ha=60
!K31
!DK31Le-DK21Le=60
!DK31La-DK21La=60
!DK31St-DK21St=60
!DK31Al-DK21Al=60
!AK31Ha-AK21Ha=60
!M20
DM20Le-DM10Le=60
!DM20Aa-DM10Aa=60
!AM20He-AM10He=60
!M30
!DM30Le-DM20Le=60
!DM30Aa-DM20Aa=60
!AM30He-AM20He=60
!M21
!DM21He-DM11He=60
!DM21Aa-DM11Aa=60
!AM21Le-AM11Le=60
!M31
!DM31He-DM21He=60
!DM31Aa-DM21Aa=60
!AM31Le-AM21Le=60
END
!for some variables it is necessary to indicate explicitly that they should be integer
!for now, these 6 are sufficient, but you might to add others here
Gin STK1Al
Gin STE1AA
Gin STM1Aa
Gin DC10He
Gin DK10Al
Gin AK11Ha