-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
270 lines (255 loc) · 12.3 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Route Optimization</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"/>
<link rel="icon" href="../../favicon.ico" />
</head>
<body>
<div class="viewport">
<div class="wrapper">
<h1>Route Optimization</h1>
<a href="https://www.ptvlogistics.com/">by PTV Logistics</a>
<h3>Create your transports</h3>
<div class="location-settings">
<h4>Pickup location</h4>
<input id="pickup-location" placeholder="Enter pickup location" />
<ul id="pickup-location-suggestions" class="suggestions-list"></ul>
<div class="group">
<label>From</label>
<select id="pickup-from">
<option value="00:00">00:00</option>
<option value="01:00">01:00</option>
<option value="02:00">02:00</option>
<option value="03:00">03:00</option>
<option value="04:00">04:00</option>
<option value="05:00">05:00</option>
<option value="06:00">06:00</option>
<option value="07:00">07:00</option>
<option value="08:00" selected>08:00</option>
<option value="09:00">09:00</option>
<option value="10:00">10:00</option>
<option value="11:00">11:00</option>
<option value="12:00">12:00</option>
<option value="13:00">13:00</option>
<option value="14:00">14:00</option>
<option value="15:00">15:00</option>
<option value="16:00">16:00</option>
<option value="17:00">17:00</option>
<option value="18:00">18:00</option>
<option value="19:00">19:00</option>
<option value="20:00">20:00</option>
<option value="21:00">21:00</option>
<option value="22:00">22:00</option>
<option value="23:00">23:00</option>
</select>
<label>To</label>
<select id="pickup-to">
<option value="00:00">00:00</option>
<option value="01:00">01:00</option>
<option value="02:00">02:00</option>
<option value="03:00">03:00</option>
<option value="04:00">04:00</option>
<option value="05:00">05:00</option>
<option value="06:00">06:00</option>
<option value="07:00">07:00</option>
<option value="08:00">08:00</option>
<option value="09:00">09:00</option>
<option value="10:00">10:00</option>
<option value="11:00">11:00</option>
<option value="12:00">12:00</option>
<option value="13:00">13:00</option>
<option value="14:00">14:00</option>
<option value="15:00">15:00</option>
<option value="16:00">16:00</option>
<option value="17:00">17:00</option>
<option value="18:00">18:00</option>
<option value="19:00">19:00</option>
<option value="20:00" selected>20:00</option>
<option value="21:00">21:00</option>
<option value="22:00">22:00</option>
<option value="23:00">23:00</option>
</select>
</div>
<div class="group">
<label>Service time</label>
<input id="pickup-service-time" type="number" min="0" max="1440" value="3" />
min
</div>
</div>
<div class="location-settings">
<h4>Delivery location</h4>
<input id="delivery-location" placeholder="Enter delivery location" />
<ul id="delivery-location-suggestions" class="suggestions-list"></ul>
<div class="group">
<label>From</label>
<select id="delivery-from">
<option value="00:00">00:00</option>
<option value="01:00">01:00</option>
<option value="02:00">02:00</option>
<option value="03:00">03:00</option>
<option value="04:00">04:00</option>
<option value="05:00">05:00</option>
<option value="06:00">06:00</option>
<option value="07:00">07:00</option>
<option value="08:00" selected>08:00</option>
<option value="09:00">09:00</option>
<option value="10:00">10:00</option>
<option value="11:00">11:00</option>
<option value="12:00">12:00</option>
<option value="13:00">13:00</option>
<option value="14:00">14:00</option>
<option value="15:00">15:00</option>
<option value="16:00">16:00</option>
<option value="17:00">17:00</option>
<option value="18:00">18:00</option>
<option value="19:00">19:00</option>
<option value="20:00">20:00</option>
<option value="21:00">21:00</option>
<option value="22:00">22:00</option>
<option value="23:00">23:00</option>
</select>
<label>To</label>
<select id="delivery-to">
<option value="00:00">00:00</option>
<option value="01:00">01:00</option>
<option value="02:00">02:00</option>
<option value="03:00">03:00</option>
<option value="04:00">04:00</option>
<option value="05:00">05:00</option>
<option value="06:00">06:00</option>
<option value="07:00">07:00</option>
<option value="08:00">08:00</option>
<option value="09:00">09:00</option>
<option value="10:00">10:00</option>
<option value="11:00">11:00</option>
<option value="12:00">12:00</option>
<option value="13:00">13:00</option>
<option value="14:00">14:00</option>
<option value="15:00">15:00</option>
<option value="16:00">16:00</option>
<option value="17:00">17:00</option>
<option value="18:00">18:00</option>
<option value="19:00">19:00</option>
<option value="20:00" selected>20:00</option>
<option value="21:00">21:00</option>
<option value="22:00">22:00</option>
<option value="23:00">23:00</option>
</select>
</div>
<div class="group">
<label>Service time</label>
<input id="delivery-service-time" type="number" min="0" max="1440" value="3" />
min
</div>
</div>
<button id="btn-add-transport" disabled>Add your transport</button>
<h4>Specified transports</h4>
<table id="transports-overview">
<thead>
<tr>
<td>ID</td>
<td>Pickup location</td>
<td>Delivery location</td>
</tr>
</thead>
<tbody></tbody>
</table>
<div class="group">
<label>Number of vehicles:</label>
<input id="number-of-vehicles" type="number" min="1" max="5" value="2" />
</div>
<div class="group">
<label>Vehicle profile:</label>
<select id="vehicle-profile">
<option value="EUR_VAN" selected>EUR_VAN</option>
<option value="EUR_CAR">EUR_CAR</option>
<option value="EUR_TLN_VAN">EUR_TLN_VAN</option>
<option value="USA_1_PICKUP">USA_1_PICKUP</option>
<option value="AUS_LCV_LIGHT_COMMERCIAL">AUS_LCV_LIGHT_COMMERCIAL</option>
<option value="IMEA_VAN">IMEA_VAN</option>
<option value="IMEA_CAR">IMEA_CAR</option>
<option value="OSM_BICYCLE">OSM_BICYCLE</option>
<option value="OSM_CARGO_BICYCLE">OSM_CARGO_BICYCLE</option>
<option value="EUR_OSM_CAR">EUR_OSM_CAR</option>
<option value="IMEA_OSM_CAR">IMEA_OSM_CAR</option>
</select>
</div>
<div class="group space-between">
<button id="btn-start-optimization" disabled>Optimize your transports</button>
<button id="clear-transports">Clear all data</button>
</div>
<div id="processing-indicator">
<div class="loader"></div>
<span>
Your transports will be optimized.<br />
This may take a while.
</span>
</div>
</div>
<div id="map"></div>
<div id="optimization-results">
<div>
<p id="hint-1" class="hint">Optimize your transports again to take newly added transports into account.</p>
<h3>Optimization results</h3>
<div id="vehicle-switcher" class="group">
<button id="previous-vehicle"><</button>
<label id="vehicle-id">-</label>
<button id="next-vehicle">></button>
</div>
<table id="route-details">
<thead>
<tr>
<td>#</td>
<td>Stop</td>
<td>Event</td>
<td>Arrival time</td>
</tr>
</thead>
<tbody>
<tr>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<div class="key-value"><span>Travel distance</span><span id="vehicle-travel-distance">-</span></div>
<div class="key-value"><span>Travel time</span><span id="vehicle-travel-time">-</span></div>
</div>
<div id="kpis">
<p id="hint-2" class="hint">Optimize your transports again to take newly added transports into account.</p>
<h5>Vehicles</h5>
<div class="key-value"><span>Used</span><span id="used-vehicles">-</span></div>
<div class="key-value"><span>Unused</span><span id="unused-vehicles">-</span></div>
<h5>Transports</h5>
<div class="key-value"><span>Planned</span><span id="planned-transports">-</span></div>
<div class="key-value"><span>Unplanned</span><span id="unplanned-transports">-</span></div>
<h5>Totals</h5>
<div class="key-value"><span>Travel distance</span><span id="total-travel-distance">-</span></div>
<div class="key-value"><span>Travel time</span><span id="total-travel-time">-</span></div>
<div class="key-value"><span>Driving time</span><span id="total-driving-time">-</span></div>
<div class="key-value"><span>Break time</span><span id="total-break-time">-</span></div>
<div class="key-value"><span>Rest time</span><span id="total-rest-time">-</span></div>
<div class="key-value"><span>Waiting time</span><span id="total-waiting-time">-</span></div>
</div>
</div>
</div>
<div id="error-log">
Oh no... something has gone wrong.<br />
The API returned the following:
<pre id="error-details"></pre>
<button id="close-error-details">Close</button>
</div>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-polylinedecorator@1.6.0/dist/leaflet.polylineDecorator.js"></script>
<script src="./headerTileLayer.js"></script>
<script src="map-helper-functions.js"></script>
<script src="general-helper-functions.js"></script>
<script src="route-optimization.js"></script>
</body>
</html>