-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathring.html
357 lines (268 loc) · 10.1 KB
/
ring.html
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"https://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link href="css/styleSliders.css" rel="stylesheet" type="text/css" ></img>
<link href="css/styleTrafficSimulationDe.css"
rel="stylesheet" type="text/css"></img>
<link rel="shortcut icon" type="image/jpg" href="./favicon.jpg">
<script type="text/javascript"
src="js/jquery-1.12.4.min.js">
</script>
<title>Microsimulation of Traffic Flow</title>
</head>
<body>
<!-- ############################################## -->
<!-- outer container -->
<!-- ############################################## -->
<div id="container">
<!-- ############################################## -->
<!-- header: title image loaded as background image via css -->
<!-- ############################################## -->
<div id="header">
<!-- <img class="title" src="figs/title.png" width="100%"></img> -->
</div>
<!-- ############################################## -->
<!-- Buttons -->
<!-- ############################################## -->
<div id="startStopDiv"><img id="startStop" width="100%"
src="figs/buttonStop3_small.png" onclick="myStartStopFunction()"></img>
</div>
<div id="restartDiv"><img id="restart" width="100%"
src="figs/buttonRestart_small.png" onclick="myRestartFunction()"></img>
</div>
<div id="infoDiv"><img width="100%"
src="figs/infoBlue.png" onclick="showInfo()"></img>
</div>
<!-- NEW -->
<div id="editTLdiv"><button id="editTLbutton"
onclick="showHideTLeditPanel()">
Open traffic-light control panel </button> </div>
<div id="lanePlusDiv"><img width="100%"
src="figs/autobahn_plus.png" onclick="addOneLane()"></img>
</div>
<div id="laneMinusDiv"><img width="100%"
src="figs/autobahn_minus.png" onclick="subtractOneLane()"></img>
</div>
<!-- redirects to other scenarios, defines myRedirectX -->
<script src="js/redirect.js" type="text/javascript"></script>
<div id="scenarios">
<center>
<br>
<img width="17%" src="figs/iconRing_small.jpg"
onclick="myRedirectRing()"></img>
<img width="19%" src="figs/iconOnrampFig_small.jpg"
onclick="myRedirectOnramp()"></img>
<img width="19%" src="figs/iconOfframpFig_small.jpg"
onclick="myRedirectOfframp()"></img>
<img width="19%" src="figs/iconRoadworksFig_small.jpg"
onclick="myRedirectRoadworks()"></img>
<img width="19%" src="figs/iconUphillFig_small.jpg"
onclick="myRedirectUphill()"></img>
<img width="20%" src="figs/iconRoutingFig_small.jpg"
onclick="myRedirectRouting()"></img>
<img width="22%" src="figs/iconRoundabout_small.jpg"
onclick="myRedirectRoundabout()"></img>
<img width="19%" src="figs/iconIntersection_small.jpg"
onclick="myRedirectIntersection()"></img>
<img width="20%" src="figs/iconRampmeterFig_small.jpg"
onclick="myRedirectOnrampBaWue()"></img>
<a href="test2_bottleneck.html">Tests</a>
</center>
</div>
<!-- ############################################## -->
<!-- the actual simulation canvas -->
<!-- ############################################## -->
<div id="contents">
<canvas id="canvas"
onmouseenter="handleMouseEnter(event)"
onmousemove="handleMouseMove(event)"
onmousedown="handleMouseDown(event)"
onmouseup="handleMouseUp(event)"
onclick="handleClick(event)"
onmouseout="cancelActivities(event)"
style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.
</canvas>
</div>
<!-- ################################################# -->
<!-- Copyright/impressum -->
<!-- ################################################# -->
<div id="impressum">
<table class="infoTable"> <TR>
<td> <a href="impressum.html"> © Martin Treiber</a></td>
<TD> <a href="https://github.com/movsim/traffic-simulation-de">
Offline: sources at GitHub</a></TD>
</TR></table>
</div>
<!-- ############################################## -->
<!-- General link list
<!-- ############################################## -->
<div id="link1Div">
<table class="infoTable">
<tr><td> <a href="https://www.movsim.org"> MovSim</a> </td></tr>
</table>
</div>
<div id="link2Div">
<table class="infoTable">
<tr><td><a href = "http://traffic-flow-dynamics.org">
Book "Traffic Flow Dynamics" </a></td></tr>
<tr><td> <a href = "https://www.verkehrsdynamik.de">
Buch "Verkehrsdynamik"</a></td></tr>
</table>
</div>
<!-- ################################################# -->
<!-- Sliders: The whole right-hand side
<!-- ################################################# -->
<div id="sliders">
<center>
<!-- ######################################################## -->
<!--<img src="figs/Traffic_Flow_and_General.png" width="65%"></img>-->
<h3>Traffic Flow and General</h3>
<!-- ######################################################## -->
<table id="mainTable" border="0" cellspacing="1" cellpadding="0" >
<tr>
<td class="important">Density/lane</td>
<td> <input id="slider_density" type="range"
min="0" max="100" step="1"></td>
<td> <div id="slider_densityVal"></div> </td>
</tr>
<tr>
<td>Truck Perc</td>
<td> <input id="slider_fracTruck" type="range"
min="0" max="50" step="1"></td>
<td> <div id="slider_fracTruckVal"></div> </td>
</tr>
<tr>
<td>Timelapse</td>
<td> <input id="slider_timewarp" type="range"
min="0.1" max="20" step="0.1"></td>
<td> <div id="slider_timewarpVal"></div> </td>
</tr>
</table>
<!-- ######################################################## -->
<h3>Car-Following Behavior</h3>
<!-- ######################################################## -->
<table id="mainTable" border="0" cellspacing="1" cellpadding="0" >
<tr>
<td class="important">Max Accel a</td>
<td> <input id="slider_IDM_a" type="range"
min="0.3" max="4" step="0.1"></td>
<td> <div id="slider_IDM_aVal"></div> </td>
</tr>
<tr>
<td>Max Speed v</sub>0</td>
<td> <input id="slider_IDM_v0" type="range"
min="20" max="160" step="1"></td>
<td> <div id="slider_IDM_v0Val"></div> </td>
</tr>
<tr>
<td>Time Gap T</td>
<td> <input id="slider_IDM_T" type="range"
min="0.6" max="3" step="0.1"></td>
<td> <div id="slider_IDM_TVal"></div> </td>
</tr>
<tr>
<td>Min Gap s</sub>0</td>
<td> <input id="slider_IDM_s0" type="range"
min="0.5" max="5" step="0.1"></td>
<td> <div id="slider_IDM_s0Val"></div> </td>
</tr>
<tr>
<td>Comf Decel b</td>
<td> <input id="slider_IDM_b" type="range"
min="0.5" max="5" step="0.1"></td>
<td> <div id="slider_IDM_bVal"></div> </td>
</tr>
</table>
<!-- ######################################################## -->
<h3>Lane-Changing Behavior</h3>
<!-- ######################################################## -->
<table id="mainTable" border="0" cellspacing="1" cellpadding="0" >
<tr>
<td>Politeness</td>
<td> <input id="slider_MOBIL_p" type="range"
min="-0.2" max="1" step="0.1"></td>
<td> <div id="slider_MOBIL_pVal"></div> </td>
</tr>
<tr>
<td>LC Threshold</td>
<td> <input id="slider_MOBIL_bThr" type="range"
min="-0.1" max="1" step="0.1"></td>
<td> <div id="slider_MOBIL_bThrVal"></div> </td>
</tr>
<tr>
<td>Right Bias Cars</td>
<td> <input id="slider_MOBIL_bBiasRight_car" type="range"
min="-1" max="2" step="0.1"></td>
<td> <div id="slider_MOBIL_bBiasRight_carVal"></div> </td>
</tr>
<tr>
<td>Right Bias Trucks</td>
<td> <input id="slider_MOBIL_bBiasRight_truck" type="range"
min="-1" max="2" step="0.1"></td>
<td> <div id="slider_MOBIL_bBiasRight_truckVal"></div> </td>
</tr>
</table>
<!-- ############################################## -->
<!-- info-text inside sliders-div (filled by showInfo())
<!-- ############################################## -->
<br>
<div id="infotext">
</div>
</center>
</div> <!-- id="sliders">-->
<!-- ############################################## -->
<!-- Download
<!-- ############################################## -->
<div id="downloadDiv">
<img id="download" src="figs/iconDownloadStart_small.png" width="100%"
onclick="downloadCallback()"></img>
</div>
<!-- ############################################## -->
<!-- language switching
<!-- ############################################## -->
<div id="infoFlags">
<a href = "ring.html">
<img src="figs/flagUSA.png" width="45%" ></img>
</a>
<a href = "ring_ger.html">
<img src="figs/flagGerman.png" width="45%" ></img>
</a>
</div>
<!-- ############################################## -->
<!-- colorbox
<!-- ############################################## -->
<!--
<div id="colorBox">
<center>
<img src="figs/colormap_grass.png" width="100%"></img>
</center>
</div>
-->
</div> <!-- end outer container -->
<!-- ########################################################## -->
<!-- specific scripts; position below any simulation elements ! -->
<!-- ########################################################## -->
<script src="js/seedrandom.min.js"></script> <!-- random w seed debug -->
<!-- canvasresize.js only for ring and routing used-->
<script src="js/timeView.js" type="text/javascript"></script>
<script src="js/displayText.js" type="text/javascript"></script>
<script src="js/canvasresize.js" type="text/javascript"></script>
<script src="js/media.js" type="text/javascript"></script>
<script src="js/control_gui.js"></script>
<script src="js/canvas_gui.js"></script>
<script src="js/TrafficObjects.js"></script>
<script src="js/TrafficLightControlEditor.js"></script>
<script src="js/colormanip.js"></script>
<script src="js/models.js"></script>
<script src="js/vehicle.js"></script>
<script src="js/paths.js"></script>
<script src="js/road.js"></script>
<script src="js/debug.js"></script>
<script src="js/stationaryDetector.js"></script>
<!-- PROJ--> <script src="js/ring.js"></script>
<!-- <script src="wm-html-include/wm-html-include.js"> </script>-->
</body>
</html>