@@ -39,7 +39,113 @@ Feature: Car - Handle traffic lights
39
39
| k | n | 20 .7s | turn with traffic light |
40
40
41
41
42
- Scenario : Tarrif Signal Geometry
42
+ Scenario : Car - Traffic signal direction
43
+ Given the node map
44
+ """
45
+ a-1-b-2-c
46
+
47
+ d-3-e-4-f
48
+
49
+ g-5-h-6-i
50
+
51
+ j-7-k-8-l
52
+
53
+ """
54
+
55
+ And the ways
56
+ | nodes | highway |
57
+ | abc | primary |
58
+ | def | primary |
59
+ | ghi | primary |
60
+ | jkl | primary |
61
+
62
+ And the nodes
63
+ | node | highway | traffic_signals :direction |
64
+ | e | traffic_signals | |
65
+ | h | traffic_signals | forward |
66
+ | k | traffic_signals | backward |
67
+
68
+ When I route I should get
69
+ | from | to | time | # |
70
+ | 1 | 2 | 11 .1s | no turn with no traffic light |
71
+ | 2 | 1 | 11 .1s | no turn with no traffic light |
72
+ | 3 | 4 | 13 .1s | no turn with traffic light |
73
+ | 4 | 3 | 13 .1s | no turn with traffic light |
74
+ | 5 | 6 | 13 .1s | no turn with traffic light |
75
+ | 6 | 5 | 11 .1s | no turn with no traffic light |
76
+ | 7 | 8 | 11 .1s | no turn with no traffic light |
77
+ | 8 | 7 | 13 .1s | no turn with traffic light |
78
+
79
+
80
+ Scenario : Car - Encounters a traffic light
81
+ Given the node map
82
+ """
83
+ a f k
84
+ | | |
85
+ b-c-d h-g-i l-m-n
86
+ | | |
87
+ e j o
88
+
89
+ """
90
+
91
+ And the ways
92
+ | nodes | highway |
93
+ | bcd | primary |
94
+ | ace | primary |
95
+ | hgi | primary |
96
+ | fgj | primary |
97
+ | lmn | primary |
98
+ | kmo | primary |
99
+
100
+ And the nodes
101
+ | node | highway | traffic_signals :direction |
102
+ | g | traffic_signals | forward |
103
+ | m | traffic_signals | backward |
104
+
105
+
106
+ When I route I should get
107
+ | from | to | time | # |
108
+ | a | d | 21 .9s | no turn with no traffic light |
109
+ | a | e | 22 .2s | no turn with traffic light |
110
+ | a | b | 18 .7s | turn with no traffic light |
111
+ | e | b | 21 .9s | no turn with no traffic light |
112
+ | e | a | 22 .2s | no turn with traffic light |
113
+ | e | d | 18 .7s | turn with no traffic light |
114
+ | d | e | 21 .9s | no turn with no traffic light |
115
+ | d | b | 11s | no turn with traffic light |
116
+ | d | a | 18 .7s | turn with no traffic light |
117
+ | b | a | 21 .9s | no turn with no traffic light |
118
+ | b | d | 11s | no turn with traffic light |
119
+ | b | e | 18 .7s | turn with no traffic light |
120
+
121
+ | f | i | 23 .9s | no turn with no traffic light |
122
+ | f | j | 24 .2s | no turn with traffic light |
123
+ | f | h | 20 .7s | turn with no traffic light |
124
+ | j | h | 21 .9s | no turn with no traffic light |
125
+ | j | f | 22 .2s | no turn with traffic light |
126
+ | j | i | 18 .7s | turn with no traffic light |
127
+ | i | j | 21 .9s | no turn with no traffic light |
128
+ | i | h | 11s | no turn with traffic light |
129
+ | i | f | 18 .7s | turn with no traffic light |
130
+ | h | f | 23 .9s | no turn with no traffic light |
131
+ | h | i | 13s | no turn with traffic light |
132
+ | h | j | 20 .7s | turn with no traffic light |
133
+
134
+ | k | n | 21 .9s | no turn with no traffic light |
135
+ | k | o | 22 .2s | no turn with traffic light |
136
+ | k | l | 18 .7s | turn with no traffic light |
137
+ | o | l | 23 .9s | no turn with no traffic light |
138
+ | o | k | 24 .2s | no turn with traffic light |
139
+ | o | n | 20 .7s | turn with no traffic light |
140
+ | n | o | 23 .9s | no turn with no traffic light |
141
+ | n | l | 13s | no turn with traffic light |
142
+ | n | k | 20 .7s | turn with no traffic light |
143
+ | l | k | 21 .9s | no turn with no traffic light |
144
+ | l | n | 11s | no turn with traffic light |
145
+ | l | o | 18 .7s | turn with no traffic light |
146
+
147
+
148
+ Scenario : Traffic Signal Geometry
43
149
Given the query options
44
150
| overview | full |
45
151
| geometries | polyline |
@@ -61,6 +167,53 @@ Feature: Car - Handle traffic lights
61
167
| from | to | route | geometry |
62
168
| a | c | abc ,abc | _ibE_ibE ?gJ ?eJ |
63
169
170
+
171
+ Scenario : Traffic Signal Geometry - forward signal
172
+ Given the query options
173
+ | overview | full |
174
+ | geometries | polyline |
175
+
176
+ Given the node map
177
+ """
178
+ a - b - c
179
+ """
180
+
181
+ And the ways
182
+ | nodes | highway |
183
+ | abc | primary |
184
+
185
+ And the nodes
186
+ | node | highway | traffic_signals :direction |
187
+ | b | traffic_signals | forward |
188
+
189
+ When I route I should get
190
+ | from | to | route | geometry |
191
+ | a | c | abc ,abc | _ibE_ibE ?gJ ?eJ |
192
+
193
+
194
+ Scenario : Traffic Signal Geometry - reverse signal
195
+ Given the query options
196
+ | overview | full |
197
+ | geometries | polyline |
198
+
199
+ Given the node map
200
+ """
201
+ a - b - c
202
+ """
203
+
204
+ And the ways
205
+ | nodes | highway |
206
+ | abc | primary |
207
+
208
+ And the nodes
209
+ | node | highway | traffic_signals :direction |
210
+ | b | traffic_signals | reverse |
211
+
212
+ When I route I should get
213
+ | from | to | route | geometry |
214
+ | a | c | abc ,abc | _ibE_ibE ?gJ ?eJ |
215
+
216
+
64
217
@traffic
65
218
Scenario : Traffic update on the edge with a traffic signal
66
219
Given the node map
@@ -91,3 +244,67 @@ Feature: Car - Handle traffic lights
91
244
| from | to | route | speed | weights | time | distances | a :datasources | a :nodes | a :speed | a :duration | a :weight |
92
245
| a | c | abc ,abc | 60 km /h | 24 .2 ,0 | 24 .2s | 400m ,0m | 1 :0 | 1 :2 :3 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
93
246
| c | a | abc ,abc | 60 km /h | 24 .2 ,0 | 24 .2s | 400m ,0m | 0 :1 | 3 :2 :1 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
247
+
248
+
249
+ @traffic
250
+ Scenario : Traffic update on the edge with a traffic signal - forward
251
+ Given the node map
252
+ """
253
+ a - b - c
254
+ """
255
+
256
+ And the ways
257
+ | nodes | highway |
258
+ | abc | primary |
259
+
260
+
261
+ And the nodes
262
+ | node | highway | traffic_signals :direction |
263
+ | b | traffic_signals | forward |
264
+
265
+ And the contract extra arguments "--segment-speed-file {speeds_file}"
266
+ And the customize extra arguments "--segment-speed-file {speeds_file}"
267
+ And the speed file
268
+ """
269
+ 1,2,65
270
+ 2,1,65
271
+ """
272
+ And the query options
273
+ | annotations | datasources ,nodes ,speed ,duration ,weight |
274
+
275
+ When I route I should get
276
+ | from | to | route | speed | weights | time | distances | a :datasources | a :nodes | a :speed | a :duration | a :weight |
277
+ | a | c | abc ,abc | 60 km /h | 24 .2 ,0 | 24 .2s | 400m ,0m | 1 :0 | 1 :2 :3 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
278
+ | c | a | abc ,abc | 65 km /h | 22 .2 ,0 | 22 .2s | 400m ,0m | 0 :1 | 3 :2 :1 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
279
+
280
+
281
+ @traffic
282
+ Scenario : Traffic update on the edge with a traffic signal - backward
283
+ Given the node map
284
+ """
285
+ a - b - c
286
+ """
287
+
288
+ And the ways
289
+ | nodes | highway |
290
+ | abc | primary |
291
+
292
+
293
+ And the nodes
294
+ | node | highway | traffic_signals :direction |
295
+ | b | traffic_signals | backward |
296
+
297
+ And the contract extra arguments "--segment-speed-file {speeds_file}"
298
+ And the customize extra arguments "--segment-speed-file {speeds_file}"
299
+ And the speed file
300
+ """
301
+ 1,2,65
302
+ 2,1,65
303
+ """
304
+ And the query options
305
+ | annotations | datasources ,nodes ,speed ,duration ,weight |
306
+
307
+ When I route I should get
308
+ | from | to | route | speed | weights | time | distances | a :datasources | a :nodes | a :speed | a :duration | a :weight |
309
+ | a | c | abc ,abc | 65 km /h | 22 .2 ,0 | 22 .2s | 400m ,0m | 1 :0 | 1 :2 :3 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
310
+ | c | a | abc ,abc | 60 km /h | 24 .2 ,0 | 24 .2s | 400m ,0m | 0 :1 | 3 :2 :1 | 18 :18 | 11 .1 :11 .1 | 11 .1 :11 .1 |
0 commit comments