1 /**
2 # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 # Copyright (C) 2009-2019 German Aerospace Center (DLR) and others.
4 # This program and the accompanying materials
5 # are made available under the terms of the Eclipse Public License v2.0
6 # which accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v20.html
8 # SPDX-License-Identifier: EPL-2.0
9 
10 # @file    Constants.java
11 # @author  generated by "rebuildConstants.py"
12 # @date    2019-04-15 12:27:46.359194
13 # @version $Id$
14 
15 """
16 This script contains TraCI constant definitions from <SUMO_HOME>/src/libsumo/TraCIConstants.h.
17 */
18 
19 package de.tudresden.sumo.config;
20 public class Constants {
21     // ****************************************
22     // VERSION
23     // ****************************************
24     public static final int TRACI_VERSION = 20;
25 
26     // ****************************************
27     // COMMANDS
28     // ****************************************
29     // command: get version
30     public static final int CMD_GETVERSION = 0x00;
31 
32     // command: load
33     public static final int CMD_LOAD = 0x01;
34 
35     // command: simulation step
36     public static final int CMD_SIMSTEP = 0x02;
37 
38     // command: set connection priority (execution order)
39     public static final int CMD_SETORDER = 0x03;
40 
41     // command: stop node
42     public static final int CMD_STOP = 0x12;
43 
44     // command: reroute to parking area
45     public static final int CMD_REROUTE_TO_PARKING = 0xc2;
46 
47     // command: Resume from parking
48     public static final int CMD_RESUME = 0x19;
49 
50     // command: set lane
51     public static final int CMD_CHANGELANE = 0x13;
52 
53     // command: slow down
54     public static final int CMD_SLOWDOWN = 0x14;
55 
56     // command: set sublane (vehicle)
57     public static final int CMD_CHANGESUBLANE = 0x15;
58 
59     // command: open gap
60     public static final int CMD_OPENGAP = 0x16;
61 
62     // command: change target
63     public static final int CMD_CHANGETARGET = 0x31;
64 
65     // command: close sumo
66     public static final int CMD_CLOSE = 0x7F;
67 
68     // command: add subscription filter
69     public static final int CMD_ADD_SUBSCRIPTION_FILTER = 0x7e;
70 
71 
72     // command: subscribe induction loop (e1) context
73     public static final int CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT = 0x80;
74     // response: subscribe induction loop (e1) context
75     public static final int RESPONSE_SUBSCRIBE_INDUCTIONLOOP_CONTEXT = 0x90;
76     // command: get induction loop (e1) variable
77     public static final int CMD_GET_INDUCTIONLOOP_VARIABLE = 0xa0;
78     // response: get induction loop (e1) variable
79     public static final int RESPONSE_GET_INDUCTIONLOOP_VARIABLE = 0xb0;
80     // command: subscribe induction loop (e1) variable
81     public static final int CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE = 0xd0;
82     // response: subscribe induction loop (e1) variable
83     public static final int RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE = 0xe0;
84 
85     // command: subscribe multi-entry/multi-exit detector (e3) context
86     public static final int CMD_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT = 0x81;
87     // response: subscribe multi-entry/multi-exit detector (e3) context
88     public static final int RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_CONTEXT = 0x91;
89     // command: get multi-entry/multi-exit detector (e3) variable
90     public static final int CMD_GET_MULTIENTRYEXIT_VARIABLE = 0xa1;
91     // response: get multi-entry/multi-exit detector (e3) variable
92     public static final int RESPONSE_GET_MULTIENTRYEXIT_VARIABLE = 0xb1;
93     // command: subscribe multi-entry/multi-exit detector (e3) variable
94     public static final int CMD_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE = 0xd1;
95     // response: subscribe multi-entry/multi-exit detector (e3) variable
96     public static final int RESPONSE_SUBSCRIBE_MULTIENTRYEXIT_VARIABLE = 0xe1;
97 
98     // command: subscribe traffic lights context
99     public static final int CMD_SUBSCRIBE_TL_CONTEXT = 0x82;
100     // response: subscribe traffic lights context
101     public static final int RESPONSE_SUBSCRIBE_TL_CONTEXT = 0x92;
102     // command: get traffic lights variable
103     public static final int CMD_GET_TL_VARIABLE = 0xa2;
104     // response: get traffic lights variable
105     public static final int RESPONSE_GET_TL_VARIABLE = 0xb2;
106     // command: set traffic lights variable
107     public static final int CMD_SET_TL_VARIABLE = 0xc2;
108     // command: subscribe traffic lights variable
109     public static final int CMD_SUBSCRIBE_TL_VARIABLE = 0xd2;
110     // response: subscribe traffic lights variable
111     public static final int RESPONSE_SUBSCRIBE_TL_VARIABLE = 0xe2;
112 
113     // command: subscribe lane context
114     public static final int CMD_SUBSCRIBE_LANE_CONTEXT = 0x83;
115     // response: subscribe lane context
116     public static final int RESPONSE_SUBSCRIBE_LANE_CONTEXT = 0x93;
117     // command: get lane variable
118     public static final int CMD_GET_LANE_VARIABLE = 0xa3;
119     // response: get lane variable
120     public static final int RESPONSE_GET_LANE_VARIABLE = 0xb3;
121     // command: set lane variable
122     public static final int CMD_SET_LANE_VARIABLE = 0xc3;
123     // command: subscribe lane variable
124     public static final int CMD_SUBSCRIBE_LANE_VARIABLE = 0xd3;
125     // response: subscribe lane variable
126     public static final int RESPONSE_SUBSCRIBE_LANE_VARIABLE = 0xe3;
127 
128     // command: subscribe vehicle context
129     public static final int CMD_SUBSCRIBE_VEHICLE_CONTEXT = 0x84;
130     // response: subscribe vehicle context
131     public static final int RESPONSE_SUBSCRIBE_VEHICLE_CONTEXT = 0x94;
132     // command: get vehicle variable
133     public static final int CMD_GET_VEHICLE_VARIABLE = 0xa4;
134     // response: get vehicle variable
135     public static final int RESPONSE_GET_VEHICLE_VARIABLE = 0xb4;
136     // command: set vehicle variable
137     public static final int CMD_SET_VEHICLE_VARIABLE = 0xc4;
138     // command: subscribe vehicle variable
139     public static final int CMD_SUBSCRIBE_VEHICLE_VARIABLE = 0xd4;
140     // response: subscribe vehicle variable
141     public static final int RESPONSE_SUBSCRIBE_VEHICLE_VARIABLE = 0xe4;
142 
143     // command: subscribe vehicle type context
144     public static final int CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT = 0x85;
145     // response: subscribe vehicle type context
146     public static final int RESPONSE_SUBSCRIBE_VEHICLETYPE_CONTEXT = 0x95;
147     // command: get vehicle type variable
148     public static final int CMD_GET_VEHICLETYPE_VARIABLE = 0xa5;
149     // response: get vehicle type variable
150     public static final int RESPONSE_GET_VEHICLETYPE_VARIABLE = 0xb5;
151     // command: set vehicle type variable
152     public static final int CMD_SET_VEHICLETYPE_VARIABLE = 0xc5;
153     // command: subscribe vehicle type variable
154     public static final int CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE = 0xd5;
155     // response: subscribe vehicle type variable
156     public static final int RESPONSE_SUBSCRIBE_VEHICLETYPE_VARIABLE = 0xe5;
157 
158     // command: subscribe route context
159     public static final int CMD_SUBSCRIBE_ROUTE_CONTEXT = 0x86;
160     // response: subscribe route context
161     public static final int RESPONSE_SUBSCRIBE_ROUTE_CONTEXT = 0x96;
162     // command: get route variable
163     public static final int CMD_GET_ROUTE_VARIABLE = 0xa6;
164     // response: get route variable
165     public static final int RESPONSE_GET_ROUTE_VARIABLE = 0xb6;
166     // command: set route variable
167     public static final int CMD_SET_ROUTE_VARIABLE = 0xc6;
168     // command: subscribe route variable
169     public static final int CMD_SUBSCRIBE_ROUTE_VARIABLE = 0xd6;
170     // response: subscribe route variable
171     public static final int RESPONSE_SUBSCRIBE_ROUTE_VARIABLE = 0xe6;
172 
173     // command: subscribe poi context
174     public static final int CMD_SUBSCRIBE_POI_CONTEXT = 0x87;
175     // response: subscribe poi context
176     public static final int RESPONSE_SUBSCRIBE_POI_CONTEXT = 0x97;
177     // command: get poi variable
178     public static final int CMD_GET_POI_VARIABLE = 0xa7;
179     // response: get poi variable
180     public static final int RESPONSE_GET_POI_VARIABLE = 0xb7;
181     // command: set poi variable
182     public static final int CMD_SET_POI_VARIABLE = 0xc7;
183     // command: subscribe poi variable
184     public static final int CMD_SUBSCRIBE_POI_VARIABLE = 0xd7;
185     // response: subscribe poi variable
186     public static final int RESPONSE_SUBSCRIBE_POI_VARIABLE = 0xe7;
187 
188     // command: subscribe polygon context
189     public static final int CMD_SUBSCRIBE_POLYGON_CONTEXT = 0x88;
190     // response: subscribe polygon context
191     public static final int RESPONSE_SUBSCRIBE_POLYGON_CONTEXT = 0x98;
192     // command: get polygon variable
193     public static final int CMD_GET_POLYGON_VARIABLE = 0xa8;
194     // response: get polygon variable
195     public static final int RESPONSE_GET_POLYGON_VARIABLE = 0xb8;
196     // command: set polygon variable
197     public static final int CMD_SET_POLYGON_VARIABLE = 0xc8;
198     // command: subscribe polygon variable
199     public static final int CMD_SUBSCRIBE_POLYGON_VARIABLE = 0xd8;
200     // response: subscribe polygon variable
201     public static final int RESPONSE_SUBSCRIBE_POLYGON_VARIABLE = 0xe8;
202 
203     // command: subscribe junction context
204     public static final int CMD_SUBSCRIBE_JUNCTION_CONTEXT = 0x89;
205     // response: subscribe junction context
206     public static final int RESPONSE_SUBSCRIBE_JUNCTION_CONTEXT = 0x99;
207     // command: get junction variable
208     public static final int CMD_GET_JUNCTION_VARIABLE = 0xa9;
209     // response: get junction variable
210     public static final int RESPONSE_GET_JUNCTION_VARIABLE = 0xb9;
211     // command: set junction variable
212     public static final int CMD_SET_JUNCTION_VARIABLE = 0xc9;
213     // command: subscribe junction variable
214     public static final int CMD_SUBSCRIBE_JUNCTION_VARIABLE = 0xd9;
215     // response: subscribe junction variable
216     public static final int RESPONSE_SUBSCRIBE_JUNCTION_VARIABLE = 0xe9;
217 
218     // command: subscribe edge context
219     public static final int CMD_SUBSCRIBE_EDGE_CONTEXT = 0x8a;
220     // response: subscribe edge context
221     public static final int RESPONSE_SUBSCRIBE_EDGE_CONTEXT = 0x9a;
222     // command: get edge variable
223     public static final int CMD_GET_EDGE_VARIABLE = 0xaa;
224     // response: get edge variable
225     public static final int RESPONSE_GET_EDGE_VARIABLE = 0xba;
226     // command: set edge variable
227     public static final int CMD_SET_EDGE_VARIABLE = 0xca;
228     // command: subscribe edge variable
229     public static final int CMD_SUBSCRIBE_EDGE_VARIABLE = 0xda;
230     // response: subscribe edge variable
231     public static final int RESPONSE_SUBSCRIBE_EDGE_VARIABLE = 0xea;
232 
233     // command: subscribe simulation context
234     public static final int CMD_SUBSCRIBE_SIM_CONTEXT = 0x8b;
235     // response: subscribe simulation context
236     public static final int RESPONSE_SUBSCRIBE_SIM_CONTEXT = 0x9b;
237     // command: get simulation variable
238     public static final int CMD_GET_SIM_VARIABLE = 0xab;
239     // response: get simulation variable
240     public static final int RESPONSE_GET_SIM_VARIABLE = 0xbb;
241     // command: set simulation variable
242     public static final int CMD_SET_SIM_VARIABLE = 0xcb;
243     // command: subscribe simulation variable
244     public static final int CMD_SUBSCRIBE_SIM_VARIABLE = 0xdb;
245     // response: subscribe simulation variable
246     public static final int RESPONSE_SUBSCRIBE_SIM_VARIABLE = 0xeb;
247 
248     // command: subscribe GUI context
249     public static final int CMD_SUBSCRIBE_GUI_CONTEXT = 0x8c;
250     // response: subscribe GUI context
251     public static final int RESPONSE_SUBSCRIBE_GUI_CONTEXT = 0x9c;
252     // command: get GUI variable
253     public static final int CMD_GET_GUI_VARIABLE = 0xac;
254     // response: get GUI variable
255     public static final int RESPONSE_GET_GUI_VARIABLE = 0xbc;
256     // command: set GUI variable
257     public static final int CMD_SET_GUI_VARIABLE = 0xcc;
258     // command: subscribe GUI variable
259     public static final int CMD_SUBSCRIBE_GUI_VARIABLE = 0xdc;
260     // response: subscribe GUI variable
261     public static final int RESPONSE_SUBSCRIBE_GUI_VARIABLE = 0xec;
262 
263     // command: subscribe areal detector (e2) context
264     public static final int CMD_SUBSCRIBE_LANEAREA_CONTEXT = 0x8d;
265     // response: subscribe areal detector (e2) context
266     public static final int RESPONSE_SUBSCRIBE_LANEAREA_CONTEXT = 0x9d;
267     // command: get areal detector (e2) variable
268     public static final int CMD_GET_LANEAREA_VARIABLE = 0xad;
269     // response: get areal detector (e2) variable
270     public static final int RESPONSE_GET_LANEAREA_VARIABLE = 0xbd;
271     // command: subscribe areal detector (e2) variable
272     public static final int CMD_SUBSCRIBE_LANEAREA_VARIABLE = 0xdd;
273     // response: subscribe areal detector (e2) variable
274     public static final int RESPONSE_SUBSCRIBE_LANEAREA_VARIABLE = 0xed;
275 
276     // command: subscribe person context
277     public static final int CMD_SUBSCRIBE_PERSON_CONTEXT = 0x8e;
278     // response: subscribe person context
279     public static final int RESPONSE_SUBSCRIBE_PERSON_CONTEXT = 0x9e;
280     // command: get person variable
281     public static final int CMD_GET_PERSON_VARIABLE = 0xae;
282     // response: get person variable
283     public static final int RESPONSE_GET_PERSON_VARIABLE = 0xbe;
284     // command: set person variable
285     public static final int CMD_SET_PERSON_VARIABLE = 0xce;
286     // command: subscribe person variable
287     public static final int CMD_SUBSCRIBE_PERSON_VARIABLE = 0xde;
288     // response: subscribe person variable
289     public static final int RESPONSE_SUBSCRIBE_PERSON_VARIABLE = 0xee;
290 
291 
292     // ****************************************
293     // POSITION REPRESENTATIONS
294     // ****************************************
295     // Position in geo-coordinates
296     public static final int POSITION_LON_LAT = 0x00;
297     // 2D cartesian coordinates
298     public static final int POSITION_2D = 0x01;
299     // Position in geo-coordinates with altitude
300     public static final int POSITION_LON_LAT_ALT = 0x02;
301     // 3D cartesian coordinates
302     public static final int POSITION_3D = 0x03;
303     // Position on road map
304     public static final int POSITION_ROADMAP = 0x04;
305 
306 
307     // ****************************************
308     // DATA TYPES
309     // ****************************************
310     // Polygon (2*n doubles)
311     public static final int TYPE_POLYGON = 0x06;
312     // unsigned byte
313     public static final int TYPE_UBYTE = 0x07;
314     // signed byte
315     public static final int TYPE_BYTE = 0x08;
316     // 32 bit signed integer
317     public static final int TYPE_INTEGER = 0x09;
318     // double precision float
319     public static final int TYPE_DOUBLE = 0x0B;
320     // 8 bit ASCII string
321     public static final int TYPE_STRING = 0x0C;
322     // list of strings
323     public static final int TYPE_STRINGLIST = 0x0E;
324     // compound object
325     public static final int TYPE_COMPOUND = 0x0F;
326     // list of double precision floats
327     public static final int TYPE_DOUBLELIST = 0x10;
328     // color (four ubytes)
329     public static final int TYPE_COLOR = 0x11;
330 
331 
332     // ****************************************
333     // RESULT TYPES
334     // ****************************************
335     // result type: Ok
336     public static final int RTYPE_OK = 0x00;
337     // result type: not implemented
338     public static final int RTYPE_NOTIMPLEMENTED = 0x01;
339     // result type: error
340     public static final int RTYPE_ERR = 0xFF;
341 
342     // ****************************************
343     // special return or parameter values
344     // ****************************************
345     // return value for invalid queries (especially vehicle is not on the road), see Position::INVALID
346     public static final double INVALID_DOUBLE_VALUE = -1073741824.0;
347     // return value for invalid queries (especially vehicle is not on the road), see Position::INVALID
348     public static final int INVALID_INT_VALUE = -1073741824;
349     // maximum value for client ordering (2 ^ 30)
350     public static final int MAX_ORDER = 1073741824;
351 
352 
353     // ****************************************
354     // DIFFERENT DISTANCE REQUESTS
355     // ****************************************
356     // air distance
357     public static final int REQUEST_AIRDIST = 0x00;
358     // driving distance
359     public static final int REQUEST_DRIVINGDIST = 0x01;
360 
361 
362     // ****************************************
363     // VEHICLE REMOVAL REASONS
364     // ****************************************
365     // vehicle started teleport
366     public static final int REMOVE_TELEPORT = 0x00;
367     // vehicle removed while parking
368     public static final int REMOVE_PARKING = 0x01;
369     // vehicle arrived
370     public static final int REMOVE_ARRIVED = 0x02;
371     // vehicle was vaporized
372     public static final int REMOVE_VAPORIZED = 0x03;
373     // vehicle finished route during teleport
374     public static final int REMOVE_TELEPORT_ARRIVED = 0x04;
375 
376     // ****************************************
377     // PERSON/CONTAINER STAGES
378     // ****************************************
379     // person / container stopping
380     public static final int STAGE_WAITING_FOR_DEPART = 0x00;
381     // person / container stopping
382     public static final int STAGE_WAITING = 0x01;
383     // person walking / container transhiping
384     public static final int STAGE_WALKING = 0x02;
385     // person riding / container being transported
386     public static final int STAGE_DRIVING = 0x03;
387 
388     // ****************************************
389     // Stop Flags
390     // ****************************************
391     public static final int STOP_DEFAULT = 0x00;
392     public static final int STOP_PARKING = 0x01;
393     public static final int STOP_TRIGGERED = 0x02;
394     public static final int STOP_CONTAINER_TRIGGERED = 0x04;
395     public static final int STOP_BUS_STOP = 0x08;
396     public static final int STOP_CONTAINER_STOP = 0x10;
397     public static final int STOP_CHARGING_STATION = 0x20;
398     public static final int STOP_PARKING_AREA = 0x40;
399 
400     // ****************************************
401     // Departure Flags
402     // ****************************************
403     public static final int DEPARTFLAG_TRIGGERED = -0x01;
404     public static final int DEPARTFLAG_CONTAINER_TRIGGERED = -0x02;
405     public static final int DEPARTFLAG_NOW = -0x03;
406 
407     public static final int DEPARTFLAG_SPEED_RANDOM = -0x02;
408     public static final int DEPARTFLAG_SPEED_MAX = -0x03;
409 
410     public static final int DEPARTFLAG_LANE_RANDOM = -0x02;
411     public static final int DEPARTFLAG_LANE_FREE = -0x03;
412     public static final int DEPARTFLAG_LANE_ALLOWED_FREE = -0x04;
413     public static final int DEPARTFLAG_LANE_BEST_FREE = -0x05;
414     public static final int DEPARTFLAG_LANE_FIRST_ALLOWED = -0x06;
415 
416     public static final int DEPARTFLAG_POS_RANDOM = -0x02;
417     public static final int DEPARTFLAG_POS_FREE = -0x03;
418     public static final int DEPARTFLAG_POS_BASE = -0x04;
419     public static final int DEPARTFLAG_POS_LAST = -0x05;
420     public static final int DEPARTFLAG_POS_RANDOM_FREE = -0x06;
421 
422     public static final int ARRIVALFLAG_LANE_CURRENT = -0x02;
423     public static final int ARRIVALFLAG_SPEED_CURRENT = -0x02;
424 
425     public static final int ARRIVALFLAG_POS_RANDOM = -0x02;
426     public static final int ARRIVALFLAG_POS_MAX = -0x03;
427 
428     // ****************************************
429     // Routing modes
430     // ****************************************
431     // use custom weights if available, fall back to loaded weights and then to free-flow speed
432     public static final int ROUTING_MODE_DEFAULT = 0x00;
433     // use aggregated travel times from device.rerouting
434     public static final int ROUTING_MODE_AGGREGATED = 0x01;
435     // use loaded efforts
436     public static final int ROUTING_MODE_EFFORT = 0x02;
437     // use combined costs
438     public static final int ROUTING_MODE_COMBINED = 0x03;
439 
440     // ****************************************
441     // FILTER TYPES (for context subscription filters)
442     // ****************************************
443 
444     // Reset all filters
445     public static final int FILTER_TYPE_NONE = 0x00;
446 
447     // Filter by list of lanes relative to ego vehicle
448     public static final int FILTER_TYPE_LANES = 0x01;
449 
450     // Exclude vehicles on opposite (and other) lanes from context subscription result
451     public static final int FILTER_TYPE_NOOPPOSITE = 0x02;
452 
453     // Specify maximal downstream distance for vehicles in context subscription result
454     public static final int FILTER_TYPE_DOWNSTREAM_DIST = 0x03;
455 
456     // Specify maximal upstream distance for vehicles in context subscription result
457     public static final int FILTER_TYPE_UPSTREAM_DIST = 0x04;
458 
459     // Only return leader and follower on the specified lanes in context subscription result
460     public static final int FILTER_TYPE_LEAD_FOLLOW = 0x05;
461 
462     // Only return foes on upcoming junction in context subscription result
463     public static final int FILTER_TYPE_TURN = 0x07;
464 
465     // Only return vehicles of the given vClass in context subscription result
466     public static final int FILTER_TYPE_VCLASS = 0x08;
467 
468     // Only return vehicles of the given vType in context subscription result
469     public static final int FILTER_TYPE_VTYPE = 0x09;
470 
471 
472 
473 
474 
475     // ****************************************
476     // VARIABLE TYPES (for CMD_GET_*_VARIABLE)
477     // ****************************************
478     // list of instances' ids (get: all)
479     public static final int TRACI_ID_LIST = 0x00;
480 
481     // count of instances (get: all)
482     public static final int ID_COUNT = 0x01;
483 
484     // subscribe object variables (get: all)
485     public static final int AUTOMATIC_VARIABLES_SUBSCRIPTION = 0x02;
486 
487     // subscribe context variables (get: all)
488     public static final int AUTOMATIC_CONTEXT_SUBSCRIPTION = 0x03;
489 
490     // generic attributes (get/set: all)
491     public static final int GENERIC_ATTRIBUTE = 0x03;
492 
493     // last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
494     public static final int LAST_STEP_VEHICLE_NUMBER = 0x10;
495 
496     // last step vehicle number (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
497     public static final int LAST_STEP_MEAN_SPEED = 0x11;
498 
499     // last step vehicle list (get: induction loops, multi-entry/multi-exit detector, lanes, edges)
500     public static final int LAST_STEP_VEHICLE_ID_LIST = 0x12;
501 
502     // last step occupancy (get: induction loops, lanes, edges)
503     public static final int LAST_STEP_OCCUPANCY = 0x13;
504 
505     // last step vehicle halting number (get: multi-entry/multi-exit detector, lanes, edges)
506     public static final int LAST_STEP_VEHICLE_HALTING_NUMBER = 0x14;
507 
508     // last step mean vehicle length (get: induction loops, lanes, edges)
509     public static final int LAST_STEP_LENGTH = 0x15;
510 
511     // last step time since last detection (get: induction loops)
512     public static final int LAST_STEP_TIME_SINCE_DETECTION = 0x16;
513 
514     // entry times
515     public static final int LAST_STEP_VEHICLE_DATA = 0x17;
516 
517     // last step jam length in vehicles
518     public static final int JAM_LENGTH_VEHICLE = 0x18;
519 
520     // last step jam length in meters
521     public static final int JAM_LENGTH_METERS = 0x19;
522 
523     // last step person list (get: edges, vehicles)
524     public static final int LAST_STEP_PERSON_ID_LIST = 0x1a;
525 
526     // full name (get: edges, simulation, trafficlight)
527     public static final int VAR_NAME = 0x1b;
528 
529     // traffic light states, encoded as rRgGyYoO tuple (get: traffic lights)
530     public static final int TL_RED_YELLOW_GREEN_STATE = 0x20;
531 
532     // index of the phase (set: traffic lights)
533     public static final int TL_PHASE_INDEX = 0x22;
534 
535     // traffic light program (set: traffic lights)
536     public static final int TL_PROGRAM = 0x23;
537 
538     // phase duration (set: traffic lights)
539     public static final int TL_PHASE_DURATION = 0x24;
540 
541     // controlled lanes (get: traffic lights)
542     public static final int TL_CONTROLLED_LANES = 0x26;
543 
544     // controlled links (get: traffic lights)
545     public static final int TL_CONTROLLED_LINKS = 0x27;
546 
547     // index of the current phase (get: traffic lights)
548     public static final int TL_CURRENT_PHASE = 0x28;
549 
550     // name of the current program (get: traffic lights)
551     public static final int TL_CURRENT_PROGRAM = 0x29;
552 
553     // controlled junctions (get: traffic lights)
554     public static final int TL_CONTROLLED_JUNCTIONS = 0x2a;
555 
556     // complete definition (get: traffic lights)
557     public static final int TL_COMPLETE_DEFINITION_RYG = 0x2b;
558 
559     // complete program (set: traffic lights)
560     public static final int TL_COMPLETE_PROGRAM_RYG = 0x2c;
561 
562     // assumed time to next switch (get: traffic lights)
563     public static final int TL_NEXT_SWITCH = 0x2d;
564 
565     // current state, using external signal names (get: traffic lights)
566     public static final int TL_EXTERNAL_STATE = 0x2e;
567 
568     // outgoing link number (get: lanes)
569     public static final int LANE_LINK_NUMBER = 0x30;
570 
571     // id of parent edge (get: lanes)
572     public static final int LANE_EDGE_ID = 0x31;
573 
574     // outgoing link definitions (get: lanes)
575     public static final int LANE_LINKS = 0x33;
576 
577     // list of allowed vehicle classes (get&set: lanes)
578     public static final int LANE_ALLOWED = 0x34;
579 
580     // list of not allowed vehicle classes (get&set: lanes)
581     public static final int LANE_DISALLOWED = 0x35;
582 
583     // list of foe lanes (get: lanes)
584     public static final int VAR_FOES = 0x37;
585 
586     // slope (get: edge, lane, vehicle, person)
587     public static final int VAR_SLOPE = 0x36;
588 
589     // speed (get: vehicle)
590     public static final int VAR_SPEED = 0x40;
591 
592     // maximum allowed/possible speed (get: vehicle types, lanes, set: edges, lanes)
593     public static final int VAR_MAXSPEED = 0x41;
594 
595     // position (2D) (get: vehicle, poi, inductionloop, areadetector; set: poi)
596     public static final int VAR_POSITION = 0x42;
597 
598     // position (3D) (get: vehicle, poi, set: poi)
599     public static final int VAR_POSITION3D = 0x39;
600 
601     // angle (get: vehicle, poi; set: poi)
602     public static final int VAR_ANGLE = 0x43;
603 
604     // angle (get: vehicle types, lanes, arealdetector, set: lanes)
605     public static final int VAR_LENGTH = 0x44;
606 
607     // color (get: vehicles, vehicle types, polygons, pois)
608     public static final int VAR_COLOR = 0x45;
609 
610     // max. acceleration (get: vehicles, vehicle types)
611     public static final int VAR_ACCEL = 0x46;
612 
613     // max. comfortable deceleration (get: vehicles, vehicle types)
614     public static final int VAR_DECEL = 0x47;
615 
616     // max. (physically possible) deceleration (get: vehicles, vehicle types)
617     public static final int VAR_EMERGENCY_DECEL = 0x7b;
618 
619     // apparent deceleration (get: vehicles, vehicle types)
620     public static final int VAR_APPARENT_DECEL = 0x7c;
621 
622     // action step length (get: vehicles, vehicle types)
623     public static final int VAR_ACTIONSTEPLENGTH = 0x7d;
624 
625     // last action time (get: vehicles)
626     public static final int VAR_LASTACTIONTIME = 0x7f;
627 
628     // driver's desired headway (get: vehicle types)
629     public static final int VAR_TAU = 0x48;
630 
631     // vehicle class (get: vehicle types)
632     public static final int VAR_VEHICLECLASS = 0x49;
633 
634     // emission class (get: vehicle types)
635     public static final int VAR_EMISSIONCLASS = 0x4a;
636 
637     // shape class (get: vehicle types)
638     public static final int VAR_SHAPECLASS = 0x4b;
639 
640     // minimum gap (get: vehicle types)
641     public static final int VAR_MINGAP = 0x4c;
642 
643     // width (get: vehicle types, lanes, polygons, poi)
644     public static final int VAR_WIDTH = 0x4d;
645 
646     // shape (get: polygons)
647     public static final int VAR_SHAPE = 0x4e;
648 
649     // type id (get: vehicles, polygons, pois)
650     public static final int VAR_TYPE = 0x4f;
651 
652     // road id (get: vehicles)
653     public static final int VAR_ROAD_ID = 0x50;
654 
655     // lane id (get: vehicles, inductionloop, arealdetector)
656     public static final int VAR_LANE_ID = 0x51;
657 
658     // lane index (get: vehicle, edge)
659     public static final int VAR_LANE_INDEX = 0x52;
660 
661     // route id (get & set: vehicles)
662     public static final int VAR_ROUTE_ID = 0x53;
663 
664     // edges (get: routes, vehicles)
665     public static final int VAR_EDGES = 0x54;
666 
667     // update bestLanes (set: vehicle)
668     public static final int VAR_UPDATE_BESTLANES = 0x6a;
669 
670     // filled? (get: polygons)
671     public static final int VAR_FILL = 0x55;
672 
673     // get/set image file (poi, poly, vehicle, person, simulation)
674     public static final int VAR_IMAGEFILE = 0x93;
675 
676     // position (1D along lane) (get: vehicle)
677     public static final int VAR_LANEPOSITION = 0x56;
678 
679     // route (set: vehicles)
680     public static final int VAR_ROUTE = 0x57;
681 
682     // travel time information (get&set: vehicle)
683     public static final int VAR_EDGE_TRAVELTIME = 0x58;
684 
685     // effort information (get&set: vehicle)
686     public static final int VAR_EDGE_EFFORT = 0x59;
687 
688     // last step travel time (get: edge, lane)
689     public static final int VAR_CURRENT_TRAVELTIME = 0x5a;
690 
691     // signals state (get/set: vehicle)
692     public static final int VAR_SIGNALS = 0x5b;
693 
694     // vehicle: new lane/position along (set: vehicle)
695     public static final int VAR_MOVE_TO = 0x5c;
696 
697     // polygon: add dynamics (set: polygon)
698     public static final int VAR_ADD_DYNAMICS = 0x5c;
699 
700     // vehicle: highlight (set: vehicle, poi)
701     public static final int VAR_HIGHLIGHT = 0x6c;
702 
703     // driver imperfection (set: vehicle)
704     public static final int VAR_IMPERFECTION = 0x5d;
705 
706     // speed factor (set: vehicle)
707     public static final int VAR_SPEED_FACTOR = 0x5e;
708 
709     // speed deviation (set: vehicle)
710     public static final int VAR_SPEED_DEVIATION = 0x5f;
711 
712     // routing mode (get/set: vehicle)
713     public static final int VAR_ROUTING_MODE = 0x89;
714 
715     // speed without TraCI influence (get: vehicle)
716     public static final int VAR_SPEED_WITHOUT_TRACI = 0xb1;
717 
718     // best lanes (get: vehicle)
719     public static final int VAR_BEST_LANES = 0xb2;
720 
721     // how speed is set (set: vehicle)
722     public static final int VAR_SPEEDSETMODE = 0xb3;
723 
724     // move vehicle to explicit (remote controlled) position (set: vehicle)
725     public static final int MOVE_TO_XY = 0xb4;
726 
727     // is the vehicle stopped, and if so parked and/or triggered?
728     // value = stopped + 2 * parking + 4 * triggered
729     public static final int VAR_STOPSTATE = 0xb5;
730 
731     // how lane changing is performed (get/set: vehicle)
732     public static final int VAR_LANECHANGE_MODE = 0xb6;
733 
734     // maximum speed regarding max speed on the current lane and speed factor (get: vehicle)
735     public static final int VAR_ALLOWED_SPEED = 0xb7;
736 
737     // position (1D lateral position relative to center of the current lane) (get: vehicle)
738     public static final int VAR_LANEPOSITION_LAT = 0xb8;
739 
740     // get/set prefered lateral alignment within the lane (vehicle)
741     public static final int VAR_LATALIGNMENT = 0xb9;
742 
743     // get/set maximum lateral speed (vehicle, vtypes)
744     public static final int VAR_MAXSPEED_LAT = 0xba;
745 
746     // get/set minimum lateral gap (vehicle, vtypes)
747     public static final int VAR_MINGAP_LAT = 0xbb;
748 
749     // get/set vehicle height (vehicle, vtypes, poi)
750     public static final int VAR_HEIGHT = 0xbc;
751 
752     // get/set vehicle line
753     public static final int VAR_LINE = 0xbd;
754 
755     // get/set vehicle via
756     public static final int VAR_VIA = 0xbe;
757 
758     // get (lane change relevant) neighboring vehicles (vehicles)
759     public static final int VAR_NEIGHBORS = 0xbf;
760 
761     // current CO2 emission of a node (get: vehicle, lane, edge)
762     public static final int VAR_CO2EMISSION = 0x60;
763 
764     // current CO emission of a node (get: vehicle, lane, edge)
765     public static final int VAR_COEMISSION = 0x61;
766 
767     // current HC emission of a node (get: vehicle, lane, edge)
768     public static final int VAR_HCEMISSION = 0x62;
769 
770     // current PMx emission of a node (get: vehicle, lane, edge)
771     public static final int VAR_PMXEMISSION = 0x63;
772 
773     // current NOx emission of a node (get: vehicle, lane, edge)
774     public static final int VAR_NOXEMISSION = 0x64;
775 
776     // current fuel consumption of a node (get: vehicle, lane, edge)
777     public static final int VAR_FUELCONSUMPTION = 0x65;
778 
779     // current noise emission of a node (get: vehicle, lane, edge)
780     public static final int VAR_NOISEEMISSION = 0x66;
781 
782     // current person number (get: vehicle)
783     public static final int VAR_PERSON_NUMBER = 0x67;
784 
785     // number of persons waiting at a defined bus stop (get: simulation)
786     public static final int VAR_BUS_STOP_WAITING = 0x67;
787 
788     // current leader together with gap (get: vehicle)
789     public static final int VAR_LEADER = 0x68;
790 
791     // edge index in current route (get: vehicle)
792     public static final int VAR_ROUTE_INDEX = 0x69;
793 
794     // current waiting time (get: vehicle, lane)
795     public static final int VAR_WAITING_TIME = 0x7a;
796 
797     // current waiting time (get: vehicle)
798     public static final int VAR_ACCUMULATED_WAITING_TIME = 0x87;
799 
800     // upcoming traffic lights (get: vehicle)
801     public static final int VAR_NEXT_TLS = 0x70;
802 
803     // upcoming stops (get: vehicle)
804     public static final int VAR_NEXT_STOPS = 0x73;
805 
806     // current acceleration (get: vehicle)
807     public static final int VAR_ACCELERATION = 0x72;
808 
809     // current time in seconds (get: simulation)
810     public static final int VAR_TIME = 0x66;
811 
812     // current time step (get: simulation)
813     public static final int VAR_TIME_STEP = 0x70;
814 
815     // current electricity consumption of a node (get: vehicle, lane, edge)
816     public static final int VAR_ELECTRICITYCONSUMPTION = 0x71;
817 
818     // number of loaded vehicles (get: simulation)
819     public static final int VAR_LOADED_VEHICLES_NUMBER = 0x71;
820 
821     // loaded vehicle ids (get: simulation)
822     public static final int VAR_LOADED_VEHICLES_IDS = 0x72;
823 
824     // number of departed vehicle (get: simulation)
825     public static final int VAR_DEPARTED_VEHICLES_NUMBER = 0x73;
826 
827     // departed vehicle ids (get: simulation)
828     public static final int VAR_DEPARTED_VEHICLES_IDS = 0x74;
829 
830     // number of vehicles starting to teleport (get: simulation)
831     public static final int VAR_TELEPORT_STARTING_VEHICLES_NUMBER = 0x75;
832 
833     // ids of vehicles starting to teleport (get: simulation)
834     public static final int VAR_TELEPORT_STARTING_VEHICLES_IDS = 0x76;
835 
836     // number of vehicles ending to teleport (get: simulation)
837     public static final int VAR_TELEPORT_ENDING_VEHICLES_NUMBER = 0x77;
838 
839     // ids of vehicles ending to teleport (get: simulation)
840     public static final int VAR_TELEPORT_ENDING_VEHICLES_IDS = 0x78;
841 
842     // number of arrived vehicles (get: simulation)
843     public static final int VAR_ARRIVED_VEHICLES_NUMBER = 0x79;
844 
845     // ids of arrived vehicles (get: simulation)
846     public static final int VAR_ARRIVED_VEHICLES_IDS = 0x7a;
847 
848     // delta t (get: simulation)
849     public static final int VAR_DELTA_T = 0x7b;
850 
851     // bounding box (get: simulation)
852     public static final int VAR_NET_BOUNDING_BOX = 0x7c;
853 
854     // minimum number of expected vehicles (get: simulation)
855     public static final int VAR_MIN_EXPECTED_VEHICLES = 0x7d;
856 
857     // number of vehicles starting to park (get: simulation)
858     public static final int VAR_STOP_STARTING_VEHICLES_NUMBER = 0x68;
859 
860     // ids of vehicles starting to park (get: simulation)
861     public static final int VAR_STOP_STARTING_VEHICLES_IDS = 0x69;
862 
863     // number of vehicles ending to park (get: simulation)
864     public static final int VAR_STOP_ENDING_VEHICLES_NUMBER = 0x6a;
865 
866     // ids of vehicles ending to park (get: simulation)
867     public static final int VAR_STOP_ENDING_VEHICLES_IDS = 0x6b;
868 
869     // number of vehicles starting to park (get: simulation)
870     public static final int VAR_PARKING_STARTING_VEHICLES_NUMBER = 0x6c;
871 
872     // ids of vehicles starting to park (get: simulation)
873     public static final int VAR_PARKING_STARTING_VEHICLES_IDS = 0x6d;
874 
875     // number of vehicles ending to park (get: simulation)
876     public static final int VAR_PARKING_ENDING_VEHICLES_NUMBER = 0x6e;
877 
878     // ids of vehicles ending to park (get: simulation)
879     public static final int VAR_PARKING_ENDING_VEHICLES_IDS = 0x6f;
880 
881     // number of vehicles involved in a collision (get: simulation)
882     public static final int VAR_COLLIDING_VEHICLES_NUMBER = 0x80;
883 
884     // ids of vehicles involved in a collision (get: simulation)
885     public static final int VAR_COLLIDING_VEHICLES_IDS = 0x81;
886 
887     // number of vehicles involved in a collision (get: simulation)
888     public static final int VAR_EMERGENCYSTOPPING_VEHICLES_NUMBER = 0x89;
889 
890     // ids of vehicles involved in a collision (get: simulation)
891     public static final int VAR_EMERGENCYSTOPPING_VEHICLES_IDS = 0x8a;
892 
893     // clears the simulation of all not inserted vehicles (set: simulation)
894     public static final int CMD_CLEAR_PENDING_VEHICLES = 0x94;
895 
896     // triggers saving simulation state (set: simulation)
897     public static final int CMD_SAVE_SIMSTATE = 0x95;
898 
899     // sets/retrieves abstract parameter
900     public static final int VAR_PARAMETER = 0x7e;
901 
902 
903     // add an instance (poi, polygon, vehicle, person, route)
904     public static final int ADD = 0x80;
905 
906     // remove an instance (poi, polygon, vehicle, person)
907     public static final int REMOVE = 0x81;
908 
909     // copy an instance (vehicle type, other TBD.)
910     public static final int COPY = 0x88;
911 
912     // convert coordinates
913     public static final int POSITION_CONVERSION = 0x82;
914 
915     // distance between points or vehicles
916     public static final int DISTANCE_REQUEST = 0x83;
917 
918     // the current driving distance
919     public static final int VAR_DISTANCE = 0x84;
920 
921     // add a fully specified instance (vehicle)
922     public static final int ADD_FULL = 0x85;
923 
924     // find a car based route
925     public static final int FIND_ROUTE = 0x86;
926 
927     // find an intermodal route
928     public static final int FIND_INTERMODAL_ROUTE = 0x87;
929 
930     // force rerouting based on travel time (vehicles)
931     public static final int CMD_REROUTE_TRAVELTIME = 0x90;
932 
933     // force rerouting based on effort (vehicles)
934     public static final int CMD_REROUTE_EFFORT = 0x91;
935 
936     // validates current route (vehicles)
937     public static final int VAR_ROUTE_VALID = 0x92;
938 
939     // retrieve information regarding the current person/container stage
940     public static final int VAR_STAGE = 0xc0;
941 
942     // retrieve information regarding the next edge including crossings and walkingAreas (pedestrians only)
943     public static final int VAR_NEXT_EDGE = 0xc1;
944 
945     // retrieve information regarding the number of remaining stages
946     public static final int VAR_STAGES_REMAINING = 0xc2;
947 
948     // retrieve the current vehicle id for the driving stage (person, container)
949     public static final int VAR_VEHICLE = 0xc3;
950 
951     // append a person stage (person)
952     public static final int APPEND_STAGE = 0xc4;
953 
954     // append a person stage (person)
955     public static final int REMOVE_STAGE = 0xc5;
956 
957     // zoom
958     public static final int VAR_VIEW_ZOOM = 0xa0;
959 
960     // view position
961     public static final int VAR_VIEW_OFFSET = 0xa1;
962 
963     // view schema
964     public static final int VAR_VIEW_SCHEMA = 0xa2;
965 
966     // view by boundary
967     public static final int VAR_VIEW_BOUNDARY = 0xa3;
968 
969     // screenshot
970     public static final int VAR_SCREENSHOT = 0xa5;
971 
972     // track vehicle
973     public static final int VAR_TRACK_VEHICLE = 0xa6;
974 
975     // presence of view
976     public static final int VAR_HAS_VIEW = 0xa7;
977 
978     /// @name currently wanted lane-change action
979     /// @{
980     /// @brief No action desired
981     public static final int LCA_NONE = 0;
982     /// @brief Needs to stay on the current lane
983     public static final int LCA_STAY = 1 << 0;
984     /// @brief Wants go to the left
985     public static final int LCA_LEFT = 1 << 1;
986     /// @brief Wants go to the right
987     public static final int LCA_RIGHT = 1 << 2;
988     /// @brief The action is needed to follow the route (navigational lc)
989     public static final int LCA_STRATEGIC = 1 << 3;
990     /// @brief The action is done to help someone else
991     public static final int LCA_COOPERATIVE = 1 << 4;
992     /// @brief The action is due to the wish to be faster (tactical lc)
993     public static final int LCA_SPEEDGAIN = 1 << 5;
994     /// @brief The action is due to the default of keeping right "Rechtsfahrgebot"
995     public static final int LCA_KEEPRIGHT = 1 << 6;
996     /// @brief The action is due to a TraCI request
997     public static final int LCA_TRACI = 1 << 7;
998     /// @brief The action is urgent (to be defined by lc-model)
999     public static final int LCA_URGENT = 1 << 8;
1000     /// @brief The action has not been determined
1001     public static final int LCA_UNKNOWN = 1 << 30;
1002     /// @}
1003 
1004     /// @name External state
1005     /// @{
1006     /// @brief The vehicle is blocked by left leader
1007     public static final int LCA_BLOCKED_BY_LEFT_LEADER = 1 << 9;
1008     /// @brief The vehicle is blocked by left follower
1009     public static final int LCA_BLOCKED_BY_LEFT_FOLLOWER = 1 << 10;
1010     /// @brief The vehicle is blocked by right leader
1011     public static final int LCA_BLOCKED_BY_RIGHT_LEADER = 1 << 11;
1012     /// @brief The vehicle is blocked by right follower
1013     public static final int LCA_BLOCKED_BY_RIGHT_FOLLOWER = 1 << 12;
1014     /// @brief The vehicle is blocked being overlapping
1015     public static final int LCA_OVERLAPPING = 1 << 13;
1016     /// @brief The vehicle does not have enough space to complete a continuous change before the next turn
1017     public static final int LCA_INSUFFICIENT_SPACE = 1 << 14;
1018     /// @brief used by the sublane model
1019     public static final int LCA_SUBLANE = 1 << 15;
1020     /// @brief Vehicle is too slow to complete a continuous lane change (in case that maxSpeedLatStanding==0)
1021     public static final int LCA_INSUFFICIENT_SPEED = 1 << 28;
1022     /// @brief lane can change
1023     public static final int LCA_WANTS_LANECHANGE = LCA_LEFT | LCA_RIGHT;
1024     /// @brief lane can change or stay
1025     public static final int LCA_WANTS_LANECHANGE_OR_STAY = LCA_WANTS_LANECHANGE | LCA_STAY;
1026     /// @brief blocked left
1027     public static final int LCA_BLOCKED_LEFT = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_LEFT_FOLLOWER;
1028     /// @brief blocked right
1029     public static final int LCA_BLOCKED_RIGHT = LCA_BLOCKED_BY_RIGHT_LEADER | LCA_BLOCKED_BY_RIGHT_FOLLOWER;
1030     /// @brief blocked by leader
1031     public static final int LCA_BLOCKED_BY_LEADER = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_RIGHT_LEADER;
1032     /// @brief blocker by follower
1033     public static final int LCA_BLOCKED_BY_FOLLOWER = LCA_BLOCKED_BY_LEFT_FOLLOWER | LCA_BLOCKED_BY_RIGHT_FOLLOWER;
1034     /// @brief blocked in all directions
1035     public static final int LCA_BLOCKED = LCA_BLOCKED_LEFT | LCA_BLOCKED_RIGHT | LCA_INSUFFICIENT_SPACE | LCA_INSUFFICIENT_SPEED;
1036     /// @brief reasons of lane change
1037     public static final int LCA_CHANGE_REASONS = (LCA_STRATEGIC | LCA_COOPERATIVE | LCA_SPEEDGAIN | LCA_KEEPRIGHT | LCA_SUBLANE | LCA_TRACI);
1038     // LCA_BLOCKED_BY_CURRENT_LEADER = 1 << 28
1039     // LCA_BLOCKED_BY_CURRENT_FOLLOWER = 1 << 29
1040     /// @}
1041 
1042     /// @name originally model specific states (migrated here since
1043     ///       they were duplicated in all current models)
1044     /// @{
1045     public static final int LCA_AMBLOCKINGLEADER = 1 << 16;
1046     public static final int LCA_AMBLOCKINGFOLLOWER = 1 << 17;
1047     public static final int LCA_MRIGHT = 1 << 18;
1048     public static final int LCA_MLEFT = 1 << 19;
1049     // !!! never set LCA_UNBLOCK = 1 << 20,
1050     public static final int LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 1 << 21;
1051     // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 1 << 22,
1052     public static final int LCA_CHANGE_TO_HELP = 1 << 23;
1053     // !!! never read LCA_KEEP1 = 1 << 24,
1054     // !!! never used LCA_KEEP2 = 1 << 25,
1055     public static final int LCA_AMBACKBLOCKER = 1 << 26;
1056     public static final int LCA_AMBACKBLOCKER_STANDING = 1 << 27;
1057     /// @}
1058 }