1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2002-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 SUMOXMLDefinitions.h 11 /// @author Daniel Krajzewicz 12 /// @author Jakob Erdmann 13 /// @author Clemens Honomichl 14 /// @author Piotr Woznica 15 /// @author Michael Behrisch 16 /// @author Walter Bamberger 17 /// @date Sept 2002 18 /// @version $Id$ 19 /// 20 // Definitions of elements and attributes known by SUMO 21 /****************************************************************************/ 22 #ifndef SUMOXMLDefinitions_h 23 #define SUMOXMLDefinitions_h 24 25 26 // =========================================================================== 27 // included modules 28 // =========================================================================== 29 #include <config.h> 30 31 #include <utils/common/StringBijection.h> 32 33 // =========================================================================== 34 // definitions 35 // =========================================================================== 36 /** 37 * @enum SumoXMLTag 38 * @brief Numbers representing SUMO-XML - element names 39 * @see GenericSAXHandler 40 * @see SUMOSAXHandler 41 */ 42 enum SumoXMLTag { 43 /// @brief invalid tag 44 SUMO_TAG_NOTHING, 45 /// @brief root element of a network file 46 SUMO_TAG_NET, 47 /// @brief begin/end of the description of an edge 48 SUMO_TAG_EDGE, 49 /// @brief begin/end of the description of a single lane 50 SUMO_TAG_LANE, 51 /// @brief begin/end of the description of a neighboring lane 52 SUMO_TAG_NEIGH, 53 /// @brief begin/end of the description of a Point of interest 54 SUMO_TAG_POI, 55 /// @brief begin/end of the description of a Point of interest over Lane (used by Netedit) 56 SUMO_TAG_POILANE, 57 /// @brief begin/end of the description of a polygon 58 SUMO_TAG_POLY, 59 /// @brief begin/end of the description of a junction 60 SUMO_TAG_JUNCTION, 61 /// @brief begin/end of the description of an edge restriction 62 SUMO_TAG_RESTRICTION, 63 /// @brief an e1 detector 64 SUMO_TAG_E1DETECTOR, 65 /// @brief alternative tag for e1 detector 66 SUMO_TAG_INDUCTION_LOOP, 67 /// @brief an e2 detector 68 SUMO_TAG_E2DETECTOR, 69 /// @brief an e2 detector over multiple lanes (used by Netedit) 70 SUMO_TAG_E2DETECTOR_MULTILANE, 71 /// @brief alternative tag for e2 detector 72 SUMO_TAG_LANE_AREA_DETECTOR, 73 /// @brief an e3 detector 74 SUMO_TAG_E3DETECTOR, 75 /// @brief alternative tag for e3 detector 76 SUMO_TAG_ENTRY_EXIT_DETECTOR, 77 /// @brief an edge based mean data detector 78 SUMO_TAG_MEANDATA_EDGE, 79 /// @brief a lane based mean data detector 80 SUMO_TAG_MEANDATA_LANE, 81 /// @brief an e3 entry point 82 SUMO_TAG_DET_ENTRY, 83 /// @brief an e3 exit point 84 SUMO_TAG_DET_EXIT, 85 /// @brief An edge-following detector 86 SUMO_TAG_EDGEFOLLOWDETECTOR, 87 /// @brief An instantenous induction loop 88 SUMO_TAG_INSTANT_INDUCTION_LOOP, 89 /// @brief A variable speed sign 90 SUMO_TAG_VSS, 91 /// @brief A calibrator placed over edge 92 SUMO_TAG_CALIBRATOR, 93 /// @brief A calibrator placed over lane (used in netedit) 94 SUMO_TAG_LANECALIBRATOR, 95 /// @brief A rerouter 96 SUMO_TAG_REROUTER, 97 /// @brief A bus stop 98 SUMO_TAG_BUS_STOP, 99 /// @brief A train stop (alias for bus stop) 100 SUMO_TAG_TRAIN_STOP, 101 /// @brief A pt line 102 SUMO_TAG_PT_LINE, 103 /// @brief An access point for a train stop 104 SUMO_TAG_ACCESS, 105 /// @brief A container stop 106 SUMO_TAG_CONTAINER_STOP, 107 /// @brief A parking area 108 SUMO_TAG_PARKING_AREA, 109 /// @brief A parking space for a single vehicle within a parking area 110 SUMO_TAG_PARKING_SPACE, 111 /// @brief A Charging Station 112 SUMO_TAG_CHARGING_STATION, 113 /// @brief a vtypeprobe detector 114 SUMO_TAG_VTYPEPROBE, 115 /// @brief a routeprobe detector 116 SUMO_TAG_ROUTEPROBE, 117 /// @brief root element of a route file 118 SUMO_TAG_ROUTES, 119 /// @brief description of a vehicle 120 SUMO_TAG_VEHICLE, 121 /// @brief description of a vehicle type 122 SUMO_TAG_VTYPE, 123 /// @brief begin/end of the description of a route 124 SUMO_TAG_ROUTE, 125 /// @brief description of a logic request within the junction 126 SUMO_TAG_REQUEST, 127 /// @brief a source 128 SUMO_TAG_SOURCE, 129 /// @brief a traffic assignment zone 130 SUMO_TAG_TAZ, 131 /// @brief a source within a district (connection road) 132 SUMO_TAG_TAZSOURCE, 133 /// @brief a sink within a district (connection road) 134 SUMO_TAG_TAZSINK, 135 /// @brief a traffic light 136 SUMO_TAG_TRAFFIC_LIGHT, 137 /// @brief a traffic light logic 138 SUMO_TAG_TLLOGIC, 139 /// @brief a single phase description 140 SUMO_TAG_PHASE, 141 /// @brief a single trip definition (used by router) 142 SUMO_TAG_TRIP, 143 /// @brief a single trip definition that uses TAZs (used in NETEDIT) 144 SUMO_TAG_TRIP_TAZ, 145 /// @brief a flow definition (used by router) 146 SUMO_TAG_FLOW, 147 /// @brief a flow definition within in Calibrator (used in NETEDIT) 148 SUMO_TAG_CALIBRATORFLOW, 149 /// @brief a flow state definition (used when saving and loading simulatino state) 150 SUMO_TAG_FLOWSTATE, 151 /// @brief trigger: a step description 152 SUMO_TAG_STEP, 153 /// @brief an aggreagated-output interval 154 SUMO_TAG_INTERVAL, 155 /// @brief The definition of a periodic event 156 SUMO_TAG_TIMEDEVENT, 157 /// @brief Incoming edge specification (jtrrouter) 158 SUMO_TAG_FROMEDGE, 159 /// @brief Outgoing edge specification (jtrrouter) 160 SUMO_TAG_TOEDGE, 161 /// @brief Sink(s) specification 162 SUMO_TAG_SINK, 163 /// @brief parameter associated to a certain key 164 SUMO_TAG_PARAM, 165 SUMO_TAG_WAUT, 166 SUMO_TAG_WAUT_SWITCH, 167 SUMO_TAG_WAUT_JUNCTION, 168 /// @brief segment of a lane 169 SUMO_TAG_SEGMENT, 170 /// @brief delete certain element 171 SUMO_TAG_DELETE, 172 /// @brief stop for vehicles 173 SUMO_TAG_STOP, 174 /// @brief stop placed over a lane (used in netedit) 175 SUMO_TAG_STOP_LANE, 176 /// @brief stop placed over a busStop (used in netedit) 177 SUMO_TAG_STOP_BUSSTOP, 178 /// @brief stop placed over a containerStop (used in netedit) 179 SUMO_TAG_STOP_CONTAINERSTOP, 180 /// @brief stop placed over a charging station (used in netedit) 181 SUMO_TAG_STOP_CHARGINGSTATION, 182 /// @brief stop placed over a parking area (used in netedit) 183 SUMO_TAG_STOP_PARKINGAREA, 184 /// @brief probability of destiny of a reroute 185 SUMO_TAG_DEST_PROB_REROUTE, 186 /// @brief reroute of type closing 187 SUMO_TAG_CLOSING_REROUTE, 188 /// @brief lane of a reroute of type closing 189 SUMO_TAG_CLOSING_LANE_REROUTE, 190 /// @brief probability of route of a reroute 191 SUMO_TAG_ROUTE_PROB_REROUTE, 192 /// @brief entry for an alternative parking zone 193 SUMO_TAG_PARKING_ZONE_REROUTE, 194 /// @brief type of polygon 195 SUMO_TAG_POLYTYPE, 196 /// @brief connectio between two lanes 197 SUMO_TAG_CONNECTION, 198 /// @brief prohibition of circulation between two edges 199 SUMO_TAG_PROHIBITION, 200 /// @brief split something 201 SUMO_TAG_SPLIT, 202 /// @brief alternative definition for junction 203 SUMO_TAG_NODE, 204 /// @brief type 205 SUMO_TAG_TYPE, 206 /// @brief definition of a detector 207 SUMO_TAG_DETECTOR_DEFINITION, 208 /// @brief distribution of a route 209 SUMO_TAG_ROUTE_DISTRIBUTION, 210 /// @brief distribution of a vehicle type 211 SUMO_TAG_VTYPE_DISTRIBUTION, 212 /// @brief vaporizer of vehicles 213 SUMO_TAG_VAPORIZER, 214 /// @brief roundabout defined in junction 215 SUMO_TAG_ROUNDABOUT, 216 /// @brief Join operation 217 SUMO_TAG_JOIN, 218 /// @brief join exlude operation 219 SUMO_TAG_JOINEXCLUDE, 220 /// @brief crossing between edges for pedestrians 221 SUMO_TAG_CROSSING, 222 /// @brief walking area for pedestrians 223 SUMO_TAG_WALKINGAREA, 224 /// @brief Information on vClass specific stop offsets at lane end 225 SUMO_TAG_STOPOFFSET, 226 227 SUMO_TAG_WAY, 228 SUMO_TAG_ND, 229 SUMO_TAG_TAG, 230 SUMO_TAG_RELATION, 231 SUMO_TAG_MEMBER, 232 233 /// @name parameters associated to view settings 234 /// @{ 235 SUMO_TAG_VIEWSETTINGS, 236 SUMO_TAG_VIEWSETTINGS_DECAL, 237 SUMO_TAG_VIEWSETTINGS_LIGHT, 238 SUMO_TAG_VIEWSETTINGS_SCHEME, 239 SUMO_TAG_VIEWSETTINGS_OPENGL, 240 SUMO_TAG_VIEWSETTINGS_BACKGROUND, 241 SUMO_TAG_VIEWSETTINGS_EDGES, 242 SUMO_TAG_VIEWSETTINGS_VEHICLES, 243 SUMO_TAG_VIEWSETTINGS_PERSONS, 244 SUMO_TAG_VIEWSETTINGS_CONTAINERS, 245 SUMO_TAG_VIEWSETTINGS_JUNCTIONS, 246 SUMO_TAG_VIEWSETTINGS_ADDITIONALS, 247 SUMO_TAG_VIEWSETTINGS_POIS, 248 SUMO_TAG_VIEWSETTINGS_POLYS, 249 SUMO_TAG_VIEWSETTINGS_LEGEND, 250 SUMO_TAG_VIEWSETTINGS_EVENT, 251 SUMO_TAG_VIEWSETTINGS_EVENT_JAM_TIME, 252 SUMO_TAG_INCLUDE, 253 SUMO_TAG_DELAY, 254 SUMO_TAG_VIEWPORT, 255 SUMO_TAG_SNAPSHOT, 256 SUMO_TAG_BREAKPOINTS_FILE, 257 SUMO_TAG_BREAKPOINT, 258 SUMO_TAG_LOCATION, 259 SUMO_TAG_COLORSCHEME, 260 SUMO_TAG_SCALINGSCHEME, 261 SUMO_TAG_ENTRY, 262 SUMO_TAG_RNGSTATE, 263 /// @} 264 265 SUMO_TAG_VEHICLETRANSFER, 266 SUMO_TAG_DEVICE, 267 268 /// @name Car-Following models 269 /// @{ 270 SUMO_TAG_CF_KRAUSS, 271 SUMO_TAG_CF_KRAUSS_PLUS_SLOPE, 272 SUMO_TAG_CF_KRAUSS_ORIG1, 273 SUMO_TAG_CF_KRAUSSX, 274 SUMO_TAG_CF_SMART_SK, 275 SUMO_TAG_CF_DANIEL1, 276 SUMO_TAG_CF_IDM, 277 SUMO_TAG_CF_IDMM, 278 SUMO_TAG_CF_PWAGNER2009, 279 SUMO_TAG_CF_BKERNER, 280 SUMO_TAG_CF_WIEDEMANN, 281 SUMO_TAG_CF_ACC, 282 SUMO_TAG_CF_CACC, 283 SUMO_TAG_CF_RAIL, 284 SUMO_TAG_CF_CC, 285 /// @} 286 287 /// @name Pedestrians 288 /// @{ 289 SUMO_TAG_PERSON, 290 SUMO_TAG_PERSONTRIP, 291 SUMO_TAG_RIDE, 292 SUMO_TAG_WALK, 293 SUMO_TAG_PERSONFLOW, 294 /// @} 295 296 SUMO_TAG_CONTAINER, 297 SUMO_TAG_TRANSPORT, 298 SUMO_TAG_TRANSHIP, 299 SUMO_TAG_TRAJECTORIES, 300 SUMO_TAG_TIMESTEP, 301 SUMO_TAG_TIMESLICE, 302 SUMO_TAG_ACTORCONFIG, 303 SUMO_TAG_MOTIONSTATE, 304 SUMO_TAG_OD_PAIR, 305 306 /// @brief ActivityGen Tags 307 AGEN_TAG_GENERAL, 308 /// @brief streets object 309 AGEN_TAG_STREET, 310 /// @brief workingHours object 311 AGEN_TAG_WORKHOURS, 312 /// @brief opening for workingHours object 313 AGEN_TAG_OPENING, 314 /// @brief closing for workingHours object 315 AGEN_TAG_CLOSING, 316 /// @brief school object 317 AGEN_TAG_SCHOOLS, 318 /// @brief schools object 319 AGEN_TAG_SCHOOL, 320 /// @brief busStation and bus objects 321 AGEN_TAG_BUSSTATION, 322 /// @brief bus line 323 AGEN_TAG_BUSLINE, 324 /// @brief stations for certain vehicles 325 AGEN_TAG_STATIONS, 326 /// @brief rev stations for certain vehicles 327 AGEN_TAG_REV_STATIONS, 328 /// @brief station for a certain vehicle 329 AGEN_TAG_STATION, 330 /// @brief frequency of a object 331 AGEN_TAG_FREQUENCY, 332 /// @brief population and children accompaniment brackets 333 AGEN_TAG_POPULATION, 334 /// @brief alternative definition for Population 335 AGEN_TAG_BRACKET, 336 //AGEN_TAG_CHILD_ACOMP, 337 /// @brief city entrances 338 AGEN_TAG_CITYGATES, 339 /// @brief alternative definition for city entrances 340 AGEN_TAG_ENTRANCE, 341 /// @brief parameters 342 AGEN_TAG_PARAM 343 }; 344 345 346 /** 347 * @enum SumoXMLAttr 348 * @brief Numbers representing SUMO-XML - attributes 349 * @see GenericSAXHandler 350 * @see SUMOSAXHandler 351 */ 352 enum SumoXMLAttr { 353 /// @brief invalid attribute 354 SUMO_ATTR_NOTHING, 355 356 /// @name common attributes 357 /// @{ 358 SUMO_ATTR_ID, 359 SUMO_ATTR_REFID, 360 SUMO_ATTR_NAME, 361 SUMO_ATTR_TYPE, 362 SUMO_ATTR_PRIORITY, 363 SUMO_ATTR_NUMLANES, 364 SUMO_ATTR_SPEED, 365 SUMO_ATTR_ONEWAY, 366 SUMO_ATTR_WIDTH, 367 SUMO_ATTR_SIDEWALKWIDTH, 368 SUMO_ATTR_BIKELANEWIDTH, 369 SUMO_ATTR_REMOVE, 370 SUMO_ATTR_LENGTH, 371 SUMO_ATTR_BIDI, 372 SUMO_ATTR_ID_BEFORE, 373 SUMO_ATTR_ID_AFTER, 374 SUMO_ATTR_X, 375 SUMO_ATTR_Y, 376 SUMO_ATTR_Z, 377 SUMO_ATTR_CENTER_X, 378 SUMO_ATTR_CENTER_Y, 379 SUMO_ATTR_CENTER_Z, 380 /// @} 381 382 /// @name sumo-junction attributes 383 /// @{ 384 SUMO_ATTR_KEY, 385 SUMO_ATTR_REQUESTSIZE, 386 SUMO_ATTR_REQUEST, 387 SUMO_ATTR_RESPONSE, 388 SUMO_ATTR_PROGRAMID, 389 SUMO_ATTR_OFFSET, 390 SUMO_ATTR_ENDOFFSET, 391 SUMO_ATTR_INCLANES, 392 SUMO_ATTR_INTLANES, 393 /// @} 394 395 /// @name the weight of a district's source or sink 396 /// @{ 397 SUMO_ATTR_WEIGHT, 398 SUMO_ATTR_NODE, 399 SUMO_ATTR_EDGE, 400 /// @} 401 402 /// @brief the edges of a route 403 SUMO_ATTR_EDGES, 404 405 /// @name vehicle attributes 406 /// @{ 407 SUMO_ATTR_DEPART, 408 SUMO_ATTR_DEPARTLANE, 409 SUMO_ATTR_DEPARTPOS, 410 SUMO_ATTR_DEPARTPOS_LAT, 411 SUMO_ATTR_DEPARTSPEED, 412 SUMO_ATTR_ARRIVALLANE, 413 SUMO_ATTR_ARRIVALPOS, 414 SUMO_ATTR_ARRIVALPOS_LAT, 415 SUMO_ATTR_ARRIVALSPEED, 416 SUMO_ATTR_ROUTE, 417 SUMO_ATTR_MAXSPEED, 418 SUMO_ATTR_MAXSPEED_LAT, 419 SUMO_ATTR_LATALIGNMENT, 420 SUMO_ATTR_MINGAP_LAT, 421 SUMO_ATTR_ACCEL, 422 SUMO_ATTR_DECEL, 423 SUMO_ATTR_EMERGENCYDECEL, 424 SUMO_ATTR_APPARENTDECEL, 425 SUMO_ATTR_HASDRIVERSTATE, 426 SUMO_ATTR_ACTIONSTEPLENGTH, 427 SUMO_ATTR_VCLASS, 428 SUMO_ATTR_VCLASSES, 429 SUMO_ATTR_EXCEPTIONS, 430 SUMO_ATTR_REPNUMBER, 431 SUMO_ATTR_SPEEDFACTOR, 432 SUMO_ATTR_SPEEDDEV, 433 SUMO_ATTR_LANE_CHANGE_MODEL, 434 SUMO_ATTR_CAR_FOLLOW_MODEL, 435 SUMO_ATTR_MINGAP, 436 SUMO_ATTR_COLLISION_MINGAP_FACTOR, 437 SUMO_ATTR_BOARDING_DURATION, 438 SUMO_ATTR_LOADING_DURATION, 439 /// @} 440 441 /// @name charging stations attributes 442 /// @{ 443 /// @brief charge in W/s of the Charging Stations 444 SUMO_ATTR_CHARGINGPOWER, 445 /// @brief Eficiency of the charge in Charging Stations 446 SUMO_ATTR_EFFICIENCY, 447 /// @brief Allow/disallow charge in transit in Charging Stations 448 SUMO_ATTR_CHARGEINTRANSIT, 449 /// @brief Delay in the charge of charging stations 450 SUMO_ATTR_CHARGEDELAY, 451 /// @} 452 453 /// @name battery device parameters 454 /// @{ 455 /// @brief Actual battery capacity 456 SUMO_ATTR_ACTUALBATTERYCAPACITY, 457 /// @brief Maxium battery capacity 458 SUMO_ATTR_MAXIMUMBATTERYCAPACITY, 459 /// @brief Maximum Power 460 SUMO_ATTR_MAXIMUMPOWER, 461 /// @brief Vehicle mass 462 SUMO_ATTR_VEHICLEMASS, 463 /// @brief Front surface area 464 SUMO_ATTR_FRONTSURFACEAREA, 465 /// @brief Air drag coefficient 466 SUMO_ATTR_AIRDRAGCOEFFICIENT, 467 /// @brief Internal moment of inertia 468 SUMO_ATTR_INTERNALMOMENTOFINERTIA, 469 /// @brief Radial drag coefficient 470 SUMO_ATTR_RADIALDRAGCOEFFICIENT, 471 /// @brief Roll Drag coefficient 472 SUMO_ATTR_ROLLDRAGCOEFFICIENT, 473 /// @brief Constant Power Intake 474 SUMO_ATTR_CONSTANTPOWERINTAKE, 475 /// @brief Propulsion efficiency 476 SUMO_ATTR_PROPULSIONEFFICIENCY, 477 /// @brief Recuperation efficiency 478 SUMO_ATTR_RECUPERATIONEFFICIENCY, 479 /// @brief Stopping treshold 480 SUMO_ATTR_STOPPINGTRESHOLD, 481 /// @} 482 483 /// @name battery export parameters 484 /// @{ 485 /// @brief charging status 486 SUMO_ATTR_CHARGING_STATUS, 487 /// @brief Energy consumed 488 SUMO_ATTR_ENERGYCONSUMED, 489 /// @brief Charging Station ID 490 SUMO_ATTR_CHARGINGSTATIONID, 491 /// @brief tgotal of Energy charged 492 SUMO_ATTR_ENERGYCHARGED, 493 /// @brief Energy charged in transit 494 SUMO_ATTR_ENERGYCHARGEDINTRANSIT, 495 /// @brief Energy charged stopped 496 SUMO_ATTR_ENERGYCHARGEDSTOPPED, 497 /// @brief Position on lane 498 SUMO_ATTR_POSONLANE, 499 /// @brief Time stopped 500 SUMO_ATTR_TIMESTOPPED, 501 /// @} 502 503 /// @name chargingStations export parameters 504 /// @{ 505 /// @brief total energy charged by charging station 506 SUMO_ATTR_TOTALENERGYCHARGED, 507 /// @brief number of steps that a vehicle is charging 508 SUMO_ATTR_CHARGINGSTEPS, 509 /// @brief total energy charged into a single vehicle 510 SUMO_ATTR_TOTALENERGYCHARGED_VEHICLE, 511 /// @brief timestep in which charging begins 512 SUMO_ATTR_CHARGINGBEGIN, 513 /// @brief timesteps in which charging ends 514 SUMO_ATTR_CHARGINGEND, 515 /// @brief energy provied by charging station at certain timestep 516 SUMO_ATTR_PARTIALCHARGE, 517 /// @} 518 519 /// @name Car following model attributes 520 /// @{ 521 SUMO_ATTR_SIGMA, // used by: Krauss 522 SUMO_ATTR_TAU, // Krauss 523 SUMO_ATTR_TMP1, 524 SUMO_ATTR_TMP2, 525 SUMO_ATTR_TMP3, 526 SUMO_ATTR_TMP4, 527 SUMO_ATTR_TMP5, 528 /// @} 529 530 // @name Train ACC model attributes 531 /// @{ 532 SUMO_ATTR_SC_GAIN, 533 SUMO_ATTR_GCC_GAIN_SPEED, 534 SUMO_ATTR_GCC_GAIN_SPACE, 535 SUMO_ATTR_GC_GAIN_SPEED, 536 SUMO_ATTR_GC_GAIN_SPACE, 537 SUMO_ATTR_CA_GAIN_SPEED, 538 SUMO_ATTR_CA_GAIN_SPACE, 539 /// @} 540 541 // @name Train CACC model attributes 542 /// @{ 543 SUMO_ATTR_SC_GAIN_CACC, 544 SUMO_ATTR_GCC_GAIN_GAP_CACC, 545 SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC, 546 SUMO_ATTR_GC_GAIN_GAP_CACC, 547 SUMO_ATTR_GC_GAIN_GAP_DOT_CACC, 548 SUMO_ATTR_CA_GAIN_GAP_CACC, 549 SUMO_ATTR_CA_GAIN_GAP_DOT_CACC, 550 /// @} 551 552 553 /// @name Train model attributes 554 /// @{ 555 SUMO_ATTR_TRAIN_TYPE, //used by: Rail 556 /// @} 557 558 /// @name Lane changing model attributes 559 /// @{ 560 SUMO_ATTR_LCA_STRATEGIC_PARAM, 561 SUMO_ATTR_LCA_COOPERATIVE_PARAM, 562 SUMO_ATTR_LCA_SPEEDGAIN_PARAM, 563 SUMO_ATTR_LCA_KEEPRIGHT_PARAM, 564 SUMO_ATTR_LCA_SUBLANE_PARAM, 565 SUMO_ATTR_LCA_OPPOSITE_PARAM, 566 SUMO_ATTR_LCA_PUSHY, 567 SUMO_ATTR_LCA_PUSHYGAP, 568 SUMO_ATTR_LCA_ASSERTIVE, 569 SUMO_ATTR_LCA_IMPATIENCE, 570 SUMO_ATTR_LCA_TIME_TO_IMPATIENCE, 571 SUMO_ATTR_LCA_ACCEL_LAT, 572 SUMO_ATTR_LCA_LOOKAHEADLEFT, 573 SUMO_ATTR_LCA_SPEEDGAINRIGHT, 574 SUMO_ATTR_LCA_MAXSPEEDLATSTANDING, 575 SUMO_ATTR_LCA_MAXSPEEDLATFACTOR, 576 SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE, 577 SUMO_ATTR_LCA_EXPERIMENTAL1, 578 /// @} 579 580 /// @name Junction model attributes 581 /// @{ 582 SUMO_ATTR_JM_CROSSING_GAP, 583 SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, 584 SUMO_ATTR_JM_DRIVE_RED_SPEED, 585 SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, 586 SUMO_ATTR_JM_IGNORE_FOE_SPEED, 587 SUMO_ATTR_JM_IGNORE_FOE_PROB, 588 SUMO_ATTR_JM_SIGMA_MINOR, 589 SUMO_ATTR_JM_TIMEGAP_MINOR, 590 /// @} 591 592 /// @name route alternatives / distribution attributes 593 /// @{ 594 SUMO_ATTR_LAST, 595 SUMO_ATTR_COST, 596 SUMO_ATTR_SAVINGS, 597 SUMO_ATTR_PROB, 598 SUMO_ATTR_PROBS, 599 SUMO_ATTR_ROUTES, 600 SUMO_ATTR_VTYPES, 601 /// @} 602 603 /// @name trip definition attributes 604 /// @{ 605 SUMO_ATTR_LANE, 606 SUMO_ATTR_LANES, 607 SUMO_ATTR_FROM, 608 SUMO_ATTR_TO, 609 SUMO_ATTR_FROMLONLAT, 610 SUMO_ATTR_TOLONLAT, 611 SUMO_ATTR_FROMXY, 612 SUMO_ATTR_TOXY, 613 SUMO_ATTR_PERIOD, 614 SUMO_ATTR_FROM_TAZ, 615 SUMO_ATTR_TO_TAZ, 616 SUMO_ATTR_REROUTE, 617 SUMO_ATTR_PERSON_CAPACITY, 618 SUMO_ATTR_CONTAINER_CAPACITY, 619 SUMO_ATTR_PERSON_NUMBER, 620 SUMO_ATTR_CONTAINER_NUMBER, 621 SUMO_ATTR_MODES, 622 SUMO_ATTR_WALKFACTOR, 623 /// @} 624 625 /// @name source definitions 626 /// @{ 627 SUMO_ATTR_FUNCTION, 628 SUMO_ATTR_POSITION, 629 SUMO_ATTR_POSITION_LAT, 630 SUMO_ATTR_FREQUENCY, 631 SUMO_ATTR_STYLE, 632 SUMO_ATTR_FILE, 633 SUMO_ATTR_JUNCTION, 634 SUMO_ATTR_NUMBER, 635 SUMO_ATTR_DURATION, 636 SUMO_ATTR_UNTIL, 637 SUMO_ATTR_ROUTEPROBE, 638 /// @} 639 640 /// @brief the edges crossed by a pedestrian crossing 641 SUMO_ATTR_CROSSING_EDGES, 642 /// @brief trigger: the time of the step 643 SUMO_ATTR_TIME, 644 /// @brief weights: time range begin 645 SUMO_ATTR_BEGIN, 646 /// @brief weights: time range end 647 SUMO_ATTR_END, 648 /// @brief link,node: the traffic light id responsible for this link 649 SUMO_ATTR_TLID, 650 /// @brief node: the type of traffic light 651 SUMO_ATTR_TLTYPE, 652 /// @brief link: the index of the link within the traffic light 653 SUMO_ATTR_TLLINKINDEX, 654 /// @brief link: the index of the opposite direction link of a pedestrian crossing 655 SUMO_ATTR_TLLINKINDEX2, 656 /// @brief edge: the shape in xml-definition 657 SUMO_ATTR_SHAPE, 658 /// @brief The information about how to spread the lanes from the given position 659 SUMO_ATTR_SPREADTYPE, 660 /// @brief The turning radius at an intersection in m 661 SUMO_ATTR_RADIUS, 662 /// @brief Whether vehicles must keep the junction clear 663 SUMO_ATTR_KEEP_CLEAR, 664 /// @brief How to compute right of way 665 SUMO_ATTR_RIGHT_OF_WAY, 666 /// @brief Fringe type of node 667 SUMO_ATTR_FRINGE, 668 /// @brief whether a given shape is user-defined 669 SUMO_ATTR_CUSTOMSHAPE, 670 /// @brief A color information 671 SUMO_ATTR_COLOR, 672 /// @brief The abstract direction of a link 673 SUMO_ATTR_DIR, 674 /// @brief The state of a link 675 SUMO_ATTR_STATE, 676 /// @brief foe visibility distance of a link 677 SUMO_ATTR_VISIBILITY_DISTANCE, 678 /// @brief A layer number 679 SUMO_ATTR_LAYER, 680 /// @brief Fill the polygon 681 SUMO_ATTR_FILL, 682 SUMO_ATTR_LINEWIDTH, 683 SUMO_ATTR_PREFIX, 684 SUMO_ATTR_DISCARD, 685 686 SUMO_ATTR_FROM_LANE, 687 SUMO_ATTR_TO_LANE, 688 SUMO_ATTR_DEST, 689 SUMO_ATTR_SOURCE, 690 SUMO_ATTR_VIA, 691 SUMO_ATTR_VIALONLAT, 692 SUMO_ATTR_VIAXY, 693 /// @brief a list of node ids, used for controlling joining 694 SUMO_ATTR_NODES, 695 696 /// @name Attributes for actuated traffic lights: 697 /// @{ 698 /// @brief minimum duration of a phase 699 SUMO_ATTR_MINDURATION, 700 /// @brief maximum duration of a phase 701 SUMO_ATTR_MAXDURATION, 702 /// @brief succesor phase index 703 SUMO_ATTR_NEXT, 704 /// @} 705 706 /// @name Attributes for junction-internal lanes 707 /// @{ 708 /// @brief Information within the junction logic which internal lanes block external 709 SUMO_ATTR_FOES, 710 /// @} 711 712 /// @name Attributes for detectors 713 /// @{ 714 /// @brief Information whether the detector shall be continued on the folowing lanes 715 SUMO_ATTR_CONT, 716 SUMO_ATTR_CONTPOS, 717 SUMO_ATTR_HALTING_TIME_THRESHOLD, 718 SUMO_ATTR_HALTING_SPEED_THRESHOLD, 719 SUMO_ATTR_JAM_DIST_THRESHOLD, 720 SUMO_ATTR_SHOW_DETECTOR, 721 SUMO_ATTR_OPEN_ENTRY, 722 /// @} 723 724 SUMO_ATTR_WAUT_ID, 725 SUMO_ATTR_JUNCTION_ID, 726 SUMO_ATTR_PROCEDURE, 727 SUMO_ATTR_SYNCHRON, 728 SUMO_ATTR_REF_TIME, 729 SUMO_ATTR_START_PROG, 730 731 SUMO_ATTR_OFF, 732 SUMO_ATTR_FRIENDLY_POS, 733 SUMO_ATTR_SPLIT_VTYPE, 734 SUMO_ATTR_UNCONTROLLED, 735 SUMO_ATTR_PASS, 736 SUMO_ATTR_BUS_STOP, 737 SUMO_ATTR_CONTAINER_STOP, 738 SUMO_ATTR_PARKING_AREA, 739 SUMO_ATTR_ROADSIDE_CAPACITY, 740 SUMO_ATTR_ONROAD, 741 SUMO_ATTR_CHARGING_STATION, 742 SUMO_ATTR_LINE, 743 SUMO_ATTR_LINES, 744 SUMO_ATTR_TRIP_ID, 745 SUMO_ATTR_INTENDED, 746 SUMO_ATTR_VALUE, 747 SUMO_ATTR_PROHIBITOR, 748 SUMO_ATTR_PROHIBITED, 749 SUMO_ATTR_ALLOW, 750 SUMO_ATTR_DISALLOW, 751 SUMO_ATTR_PREFER, 752 SUMO_ATTR_CONTROLLED_INNER, 753 SUMO_ATTR_VEHSPERHOUR, 754 SUMO_ATTR_PERSONSPERHOUR, 755 SUMO_ATTR_OUTPUT, 756 SUMO_ATTR_HEIGHT, 757 SUMO_ATTR_GUISHAPE, 758 SUMO_ATTR_OSGFILE, 759 SUMO_ATTR_IMGFILE, 760 SUMO_ATTR_RELATIVEPATH, 761 SUMO_ATTR_ANGLE, 762 SUMO_ATTR_EMISSIONCLASS, 763 SUMO_ATTR_IMPATIENCE, 764 SUMO_ATTR_STARTPOS, 765 SUMO_ATTR_ENDPOS, 766 SUMO_ATTR_TRIGGERED, 767 SUMO_ATTR_CONTAINER_TRIGGERED, 768 SUMO_ATTR_PARKING, 769 SUMO_ATTR_EXPECTED, 770 SUMO_ATTR_EXPECTED_CONTAINERS, 771 SUMO_ATTR_INDEX, 772 773 SUMO_ATTR_ENTERING, 774 SUMO_ATTR_EXCLUDE_EMPTY, 775 SUMO_ATTR_WITH_INTERNAL, 776 SUMO_ATTR_TRACK_VEHICLES, 777 SUMO_ATTR_DETECT_PERSONS, 778 SUMO_ATTR_MAX_TRAVELTIME, 779 SUMO_ATTR_MIN_SAMPLES, 780 781 SUMO_ATTR_LON, 782 SUMO_ATTR_LAT, 783 SUMO_ATTR_GEO, 784 SUMO_ATTR_GEOSHAPE, 785 SUMO_ATTR_GEOPOSITION, 786 SUMO_ATTR_K, 787 SUMO_ATTR_V, 788 SUMO_ATTR_REF, 789 SUMO_ATTR_HREF, 790 SUMO_ATTR_ZOOM, 791 SUMO_ATTR_INTERPOLATED, 792 SUMO_ATTR_THRESHOLD, 793 794 SUMO_ATTR_NET_OFFSET, 795 SUMO_ATTR_CONV_BOUNDARY, 796 SUMO_ATTR_ORIG_BOUNDARY, 797 SUMO_ATTR_ORIG_PROJ, 798 799 /// @name car-following model attributes 800 /// @{ 801 SUMO_ATTR_CF_PWAGNER2009_TAULAST, 802 SUMO_ATTR_CF_PWAGNER2009_APPROB, 803 SUMO_ATTR_CF_IDM_DELTA, 804 SUMO_ATTR_CF_IDM_STEPPING, 805 SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, 806 SUMO_ATTR_CF_IDMM_ADAPT_TIME, 807 SUMO_ATTR_CF_KERNER_PHI, 808 SUMO_ATTR_CF_WIEDEMANN_SECURITY, 809 SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, 810 811 SUMO_ATTR_CF_CC_CCDECEL, 812 SUMO_ATTR_CF_CC_CONSTSPACING, 813 SUMO_ATTR_CF_CC_KP, 814 SUMO_ATTR_CF_CC_LAMBDA, 815 SUMO_ATTR_CF_CC_C1, 816 SUMO_ATTR_CF_CC_XI, 817 SUMO_ATTR_CF_CC_OMEGAN, 818 SUMO_ATTR_CF_CC_TAU, 819 SUMO_ATTR_CF_CC_LANES_COUNT, 820 SUMO_ATTR_CF_CC_CCACCEL, 821 SUMO_ATTR_CF_CC_PLOEG_KP, 822 SUMO_ATTR_CF_CC_PLOEG_KD, 823 SUMO_ATTR_CF_CC_PLOEG_H, 824 SUMO_ATTR_CF_CC_FLATBED_KA, 825 SUMO_ATTR_CF_CC_FLATBED_KV, 826 SUMO_ATTR_CF_CC_FLATBED_KP, 827 SUMO_ATTR_CF_CC_FLATBED_D, 828 SUMO_ATTR_CF_CC_FLATBED_H, 829 /// @} 830 831 SUMO_ATTR_GENERATE_WALKS, 832 SUMO_ATTR_ACTTYPE, 833 SUMO_ATTR_SLOPE, 834 SUMO_ATTR_VERSION, 835 SUMO_ATTR_CORNERDETAIL, 836 SUMO_ATTR_LINKDETAIL, 837 SUMO_ATTR_RECTANGULAR_LANE_CUT, 838 SUMO_ATTR_WALKINGAREAS, 839 SUMO_ATTR_LEFTHAND, 840 SUMO_ATTR_LIMIT_TURN_SPEED, 841 SUMO_ATTR_CHECKLANEFOES_ALL, 842 SUMO_ATTR_CHECKLANEFOES_ROUNDABOUT, 843 SUMO_ATTR_COMMAND, 844 845 SUMO_ATTR_ACTORCONFIG, 846 SUMO_ATTR_VEHICLE, 847 SUMO_ATTR_STARTTIME, 848 SUMO_ATTR_VEHICLECLASS, 849 SUMO_ATTR_FUEL, 850 SUMO_ATTR_ACCELERATION, 851 SUMO_ATTR_AMOUNT, 852 SUMO_ATTR_ORIGIN, 853 SUMO_ATTR_DESTINATION, 854 SUMO_ATTR_VISIBLE, 855 856 857 /// @name ActivityGen Tags 858 /// @{ 859 860 /// @name general object 861 /// @{ 862 AGEN_ATTR_INHABITANTS, 863 AGEN_ATTR_HOUSEHOLDS, 864 AGEN_ATTR_CHILDREN, 865 AGEN_ATTR_RETIREMENT, 866 AGEN_ATTR_CARS, 867 AGEN_ATTR_UNEMPLOYEMENT, 868 AGEN_ATTR_LABORDEMAND, 869 AGEN_ATTR_MAX_FOOT_DIST, 870 AGEN_ATTR_IN_TRAFFIC, 871 AGEN_ATTR_OUT_TRAFFIC, 872 /// @} 873 874 /// @name streets object 875 /// @{ 876 //SUMO_ATTR_EDGE already defined 877 AGEN_ATTR_POPULATION, 878 AGEN_ATTR_OUT_WORKPOSITION, 879 /// @} 880 881 /// @name workHours object 882 /// @{ 883 AGEN_ATTR_HOUR, 884 AGEN_ATTR_PROP, 885 /// @} 886 887 /// @name school object 888 /// @{ 889 //SUMO_ATTR_EDGE, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE already defined 890 AGEN_ATTR_CAPACITY, 891 AGEN_ATTR_OPENING, 892 AGEN_ATTR_CLOSING, 893 /// @} 894 895 /// @name busStation and Bus objects 896 /// @{ 897 // ID, EDGE, POSITION, REFID, BEGIN and END are already defined 898 AGEN_ATTR_MAX_TRIP_DURATION, 899 //AGEN_ATTR_ORDER, 900 AGEN_ATTR_RATE, 901 /// @} 902 903 /// @name population and children accompaniment brackets 904 /// @{ 905 AGEN_ATTR_BEGINAGE, 906 AGEN_ATTR_ENDAGE, 907 AGEN_ATTR_PEOPLENBR, 908 /// @} 909 910 /// @name parameters 911 /// @{ 912 AGEN_ATTR_CARPREF, 913 AGEN_ATTR_CITYSPEED, 914 AGEN_ATTR_FREETIMERATE, 915 AGEN_ATTR_UNI_RAND_TRAFFIC, 916 AGEN_ATTR_DEP_VARIATION, 917 /// @} 918 919 /// @name city gates 920 /// @{ 921 AGEN_ATTR_INCOMING, 922 AGEN_ATTR_OUTGOING, 923 /// @} 924 /// @} 925 926 //@name Netedit Attributes (used as virtual property holders, must be in SumoXMLAttr) 927 //@{ 928 /// @brief element is selected 929 GNE_ATTR_SELECTED, 930 /// @brief whether a feature has been loaded,guessed,modified or approved 931 GNE_ATTR_MODIFICATION_STATUS, 932 /// @brief first coordinate of edge shape 933 GNE_ATTR_SHAPE_START, 934 /// @brief last coordinate of edge shape 935 GNE_ATTR_SHAPE_END, 936 /// @brief whether an edge is part of a bidirectional railway 937 GNE_ATTR_BIDIR, 938 /// @brief block movement of a graphic element 939 GNE_ATTR_BLOCK_MOVEMENT, 940 /// @brief block shape of a graphic element (Used mainly in GNEShapes) 941 GNE_ATTR_BLOCK_SHAPE, 942 /// @brief Close shape of a polygon (Used by GNEPolys) 943 GNE_ATTR_CLOSE_SHAPE, 944 /// @brief parent of an additional element 945 GNE_ATTR_PARENT, 946 /// @brief generic attribute 947 GNE_ATTR_GENERIC, 948 /// @brief min source (used only by TAZs) 949 GNE_ATTR_MIN_SOURCE, 950 /// @brief min sink (used only by TAZs) 951 GNE_ATTR_MIN_SINK, 952 /// @brief max source (used only by TAZs) 953 GNE_ATTR_MAX_SOURCE, 954 /// @brief max sink (used only by TAZs) 955 GNE_ATTR_MAX_SINK, 956 /// @brief average source (used only by TAZs) 957 GNE_ATTR_AVERAGE_SOURCE, 958 /// @brief average sink (used only by TAZs) 959 GNE_ATTR_AVERAGE_SINK, 960 /// @brief Color of TAZSources/TAZChilds 961 GNE_ATTR_TAZCOLOR, 962 /// @brief Flag to check if a default VType was modified 963 GNE_ATTR_DEFAULT_VTYPE_MODIFIED, 964 // @} 965 966 SUMO_ATTR_TARGETLANE, 967 SUMO_ATTR_CROSSING, 968 SUMO_ATTR_XMLNS, 969 SUMO_ATTR_SCHEMA_LOCATION, 970 971 //@name RNG state saving attributes 972 // @{ 973 SUMO_ATTR_RNG_DEFAULT, 974 SUMO_ATTR_RNG_ROUTEHANDLER, 975 SUMO_ATTR_RNG_INSERTIONCONTROL, 976 SUMO_ATTR_RNG_DEVICE, 977 SUMO_ATTR_RNG_DEVICE_BT, 978 SUMO_ATTR_RNG_DRIVERSTATE 979 // @} 980 981 }; 982 983 /* 984 * @brief definitions of special SumoXML-attribute values. 985 * Since these enums shall be used in switch statements we keep them separated 986 * @{ 987 */ 988 989 /** 990 * SumoXMLParam Key Constants. Since all usage contexts needs strings rather 991 * than enum values we do not bother with a StringBijection 992 */ 993 extern const std::string SUMO_PARAM_ORIGID; 994 995 /** 996 * @enum SumoXMLNodeType 997 * @brief Numbers representing special SUMO-XML-attribute values 998 * for representing node- (junction-) types used in netbuild/netimport and netload 999 */ 1000 enum SumoXMLNodeType { 1001 NODETYPE_UNKNOWN, // terminator 1002 NODETYPE_TRAFFIC_LIGHT, 1003 NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, // junction controlled only by traffic light but without other prohibitions, 1004 NODETYPE_TRAFFIC_LIGHT_RIGHT_ON_RED, 1005 NODETYPE_RAIL_SIGNAL, 1006 NODETYPE_RAIL_CROSSING, 1007 NODETYPE_PRIORITY, 1008 NODETYPE_PRIORITY_STOP, // like priority but all minor links have stop signs 1009 NODETYPE_RIGHT_BEFORE_LEFT, 1010 NODETYPE_ALLWAY_STOP, 1011 NODETYPE_ZIPPER, 1012 NODETYPE_DISTRICT, 1013 NODETYPE_NOJUNCTION, 1014 NODETYPE_INTERNAL, 1015 NODETYPE_DEAD_END, 1016 NODETYPE_DEAD_END_DEPRECATED 1017 }; 1018 1019 1020 /** 1021 * @enum SumoXMLEdgeFunc 1022 * @brief Numbers representing special SUMO-XML-attribute values 1023 * for representing edge functions used in netbuild/netimport and netload 1024 */ 1025 enum SumoXMLEdgeFunc { 1026 EDGEFUNC_UNKNOWN, 1027 EDGEFUNC_NORMAL, 1028 EDGEFUNC_CONNECTOR, 1029 EDGEFUNC_CROSSING, 1030 EDGEFUNC_WALKINGAREA, 1031 EDGEFUNC_INTERNAL 1032 }; 1033 1034 1035 /** 1036 * @enum LaneSpreadFunction 1037 * @brief Numbers representing special SUMO-XML-attribute values 1038 * Information how the edge's lateral offset shall be computed 1039 * In dependence to this value, lanes will be spread to the right side or 1040 * to both sides from the given edge geometry (Also used when node 1041 * positions are used as edge geometry). 1042 */ 1043 enum LaneSpreadFunction { 1044 LANESPREAD_RIGHT, 1045 LANESPREAD_CENTER 1046 }; 1047 1048 1049 /// @brief algorithms for computing right of way 1050 enum RightOfWay { 1051 RIGHT_OF_WAY_DEFAULT, 1052 RIGHT_OF_WAY_EDGEPRIORITY 1053 }; 1054 1055 /// @brief algorithms for computing right of way 1056 enum FringeType { 1057 FRINGE_TYPE_OUTER, 1058 FRINGE_TYPE_INNER, 1059 FRINGE_TYPE_DEFAULT 1060 }; 1061 1062 /// @brief travel modes for persons 1063 enum PersonMode { 1064 PERSONMODE_NONE = 0, 1065 PERSONMODE_WALK = 1, 1066 PERSONMODE_BICYCLE = 2, 1067 PERSONMODE_CAR = 4, 1068 PERSONMODE_PUBLIC = 8 1069 }; 1070 1071 /** 1072 * @enum LinkState 1073 * @brief The right-of-way state of a link between two lanes 1074 * used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane 1075 * 1076 * This enumerations holds the possible right-of-way rules a link 1077 * may have. Beyond the righ-of-way rules, this enumeration also 1078 * holds the possible traffic light states. 1079 * 1080 * enum values are assigned so that chars can be cast back to linkstates 1081 * @todo fix redundancy 1082 */ 1083 enum LinkState { 1084 /// @brief The link has green light, may pass 1085 LINKSTATE_TL_GREEN_MAJOR = 'G', 1086 /// @brief The link has green light, has to brake 1087 LINKSTATE_TL_GREEN_MINOR = 'g', 1088 /// @brief The link has red light (must brake) 1089 LINKSTATE_TL_RED = 'r', 1090 /// @brief The link has red light (must brake) but indicates upcoming green 1091 LINKSTATE_TL_REDYELLOW = 'u', 1092 /// @brief The link has yellow light, may pass 1093 LINKSTATE_TL_YELLOW_MAJOR = 'Y', 1094 /// @brief The link has yellow light, has to brake anyway 1095 LINKSTATE_TL_YELLOW_MINOR = 'y', 1096 /// @brief The link is controlled by a tls which is off and blinks, has to brake 1097 LINKSTATE_TL_OFF_BLINKING = 'o', 1098 /// @brief The link is controlled by a tls which is off, not blinking, may pass 1099 LINKSTATE_TL_OFF_NOSIGNAL = 'O', 1100 /// @brief This is an uncontrolled, major link, may pass 1101 LINKSTATE_MAJOR = 'M', 1102 /// @brief This is an uncontrolled, minor link, has to brake 1103 LINKSTATE_MINOR = 'm', 1104 /// @brief This is an uncontrolled, right-before-left link 1105 LINKSTATE_EQUAL = '=', 1106 /// @brief This is an uncontrolled, minor link, has to stop 1107 LINKSTATE_STOP = 's', 1108 /// @brief This is an uncontrolled, all-way stop link. 1109 LINKSTATE_ALLWAY_STOP = 'w', 1110 /// @brief This is an uncontrolled, zipper-merge link 1111 LINKSTATE_ZIPPER = 'Z', 1112 /// @brief This is a dead end link 1113 LINKSTATE_DEADEND = '-' 1114 }; 1115 1116 /** 1117 * @enum LinkDirection 1118 * @brief The different directions a link between two lanes may take (or a 1119 * stream between two edges). 1120 * used in netbuild (formerly NBMMLDirection) and MSLink 1121 */ 1122 enum LinkDirection { 1123 /// @brief The link is a straight direction 1124 LINKDIR_STRAIGHT = 0, 1125 /// @brief The link is a 180 degree turn 1126 LINKDIR_TURN, 1127 /// @brief The link is a 180 degree turn (left-hand network) 1128 LINKDIR_TURN_LEFTHAND, 1129 /// @brief The link is a (hard) left direction 1130 LINKDIR_LEFT, 1131 /// @brief The link is a (hard) right direction 1132 LINKDIR_RIGHT, 1133 /// @brief The link is a partial left direction 1134 LINKDIR_PARTLEFT, 1135 /// @brief The link is a partial right direction 1136 LINKDIR_PARTRIGHT, 1137 /// @brief The link has no direction (is a dead end link) 1138 LINKDIR_NODIR 1139 }; 1140 1141 1142 /// @enum TrafficLightType 1143 enum TrafficLightType { 1144 TLTYPE_STATIC, 1145 TLTYPE_RAIL_SIGNAL, 1146 TLTYPE_RAIL_CROSSING, 1147 TLTYPE_ACTUATED, 1148 TLTYPE_DELAYBASED, 1149 TLTYPE_SOTL_PHASE, 1150 TLTYPE_SOTL_PLATOON, 1151 TLTYPE_SOTL_REQUEST, 1152 TLTYPE_SOTL_WAVE, 1153 TLTYPE_SOTL_MARCHING, 1154 TLTYPE_SWARM_BASED, 1155 TLTYPE_HILVL_DETERMINISTIC, 1156 TLTYPE_OFF, 1157 TLTYPE_INVALID //< must be the last one 1158 }; 1159 1160 1161 /** @enum LaneChangeAction 1162 * @brief The state of a vehicle's lane-change behavior 1163 */ 1164 enum LaneChangeAction { 1165 /// @name currently wanted lane-change action 1166 /// @{ 1167 /// @brief No action desired 1168 LCA_NONE = 0, 1169 /// @brief Needs to stay on the current lane 1170 LCA_STAY = 1 << 0, 1171 /// @brief Wants go to the left 1172 LCA_LEFT = 1 << 1, 1173 /// @brief Wants go to the right 1174 LCA_RIGHT = 1 << 2, 1175 /// @brief The action is needed to follow the route (navigational lc) 1176 LCA_STRATEGIC = 1 << 3, 1177 /// @brief The action is done to help someone else 1178 LCA_COOPERATIVE = 1 << 4, 1179 /// @brief The action is due to the wish to be faster (tactical lc) 1180 LCA_SPEEDGAIN = 1 << 5, 1181 /// @brief The action is due to the default of keeping right "Rechtsfahrgebot" 1182 LCA_KEEPRIGHT = 1 << 6, 1183 /// @brief The action is due to a TraCI request 1184 LCA_TRACI = 1 << 7, 1185 /// @brief The action is urgent (to be defined by lc-model) 1186 LCA_URGENT = 1 << 8, 1187 /// @brief The action has not been determined 1188 LCA_UNKNOWN = 1 << 30, 1189 /// @} 1190 1191 /// @name External state 1192 /// @{ 1193 /// @brief The vehicle is blocked by left leader 1194 LCA_BLOCKED_BY_LEFT_LEADER = 1 << 9, 1195 /// @brief The vehicle is blocked by left follower 1196 LCA_BLOCKED_BY_LEFT_FOLLOWER = 1 << 10, 1197 /// @brief The vehicle is blocked by right leader 1198 LCA_BLOCKED_BY_RIGHT_LEADER = 1 << 11, 1199 /// @brief The vehicle is blocked by right follower 1200 LCA_BLOCKED_BY_RIGHT_FOLLOWER = 1 << 12, 1201 /// @brief The vehicle is blocked being overlapping 1202 LCA_OVERLAPPING = 1 << 13, 1203 /// @brief The vehicle does not have enough space to complete a continuous change before the next turn 1204 LCA_INSUFFICIENT_SPACE = 1 << 14, 1205 /// @brief used by the sublane model 1206 LCA_SUBLANE = 1 << 15, 1207 /// @brief Vehicle is too slow to complete a continuous lane change (in case that maxSpeedLatStanding==0) 1208 LCA_INSUFFICIENT_SPEED = 1 << 28, 1209 /// @brief lane can change 1210 LCA_WANTS_LANECHANGE = LCA_LEFT | LCA_RIGHT, 1211 /// @brief lane can change or stay 1212 LCA_WANTS_LANECHANGE_OR_STAY = LCA_WANTS_LANECHANGE | LCA_STAY, 1213 /// @brief blocked left 1214 LCA_BLOCKED_LEFT = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_LEFT_FOLLOWER, 1215 /// @brief blocked right 1216 LCA_BLOCKED_RIGHT = LCA_BLOCKED_BY_RIGHT_LEADER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, 1217 /// @brief blocked by leader 1218 LCA_BLOCKED_BY_LEADER = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_RIGHT_LEADER, 1219 /// @brief blocker by follower 1220 LCA_BLOCKED_BY_FOLLOWER = LCA_BLOCKED_BY_LEFT_FOLLOWER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, 1221 /// @brief blocked in all directions 1222 LCA_BLOCKED = LCA_BLOCKED_LEFT | LCA_BLOCKED_RIGHT | LCA_INSUFFICIENT_SPACE | LCA_INSUFFICIENT_SPEED, 1223 /// @brief reasons of lane change 1224 LCA_CHANGE_REASONS = (LCA_STRATEGIC | LCA_COOPERATIVE | LCA_SPEEDGAIN | LCA_KEEPRIGHT | LCA_SUBLANE | LCA_TRACI), 1225 // LCA_BLOCKED_BY_CURRENT_LEADER = 1 << 28 1226 // LCA_BLOCKED_BY_CURRENT_FOLLOWER = 1 << 29 1227 /// @} 1228 1229 /// @name originally model specific states (migrated here since 1230 /// they were duplicated in all current models) 1231 /// @{ 1232 LCA_AMBLOCKINGLEADER = 1 << 16, 1233 LCA_AMBLOCKINGFOLLOWER = 1 << 17, 1234 LCA_MRIGHT = 1 << 18, 1235 LCA_MLEFT = 1 << 19, 1236 // !!! never set LCA_UNBLOCK = 1 << 20, 1237 LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 1 << 21, 1238 // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 1 << 22, 1239 LCA_CHANGE_TO_HELP = 1 << 23, 1240 // !!! never read LCA_KEEP1 = 1 << 24, 1241 // !!! never used LCA_KEEP2 = 1 << 25, 1242 LCA_AMBACKBLOCKER = 1 << 26, 1243 LCA_AMBACKBLOCKER_STANDING = 1 << 27 1244 /// @} 1245 }; 1246 1247 1248 /// @enum LaneChangeModel 1249 enum LaneChangeModel { 1250 LCM_DK2008, 1251 LCM_LC2013, 1252 LCM_SL2015, 1253 LCM_DEFAULT 1254 }; 1255 1256 /// @enum train types 1257 enum TrainType { 1258 TRAINTYPE_NGT400, 1259 TRAINTYPE_NGT400_16, 1260 TRAINTYPE_RB425, 1261 TRAINTYPE_RB628, 1262 TRAINTYPE_ICE1, 1263 TRAINTYPE_REDOSTO7, 1264 TRAINTYPE_FREIGHT, 1265 TRAINTYPE_ICE3, 1266 TRAINTYPE_UNKNOWN 1267 }; 1268 1269 /** 1270 * @enum LateralAlignment 1271 * @brief Numbers representing special SUMO-XML-attribute values 1272 * Information how vehicles align themselves within their lane by default 1273 */ 1274 enum LateralAlignment { 1275 /// @brief drive on the right side 1276 LATALIGN_RIGHT, 1277 /// @brief drive in the middle 1278 LATALIGN_CENTER, 1279 /// @brief maintain the current alignment 1280 LATALIGN_ARBITRARY, 1281 /// @brief align with the closest sublane border 1282 LATALIGN_NICE, 1283 /// @brief align with the rightmost sublane that allows keeping the current speed 1284 LATALIGN_COMPACT, 1285 /// @brief drive on the left side 1286 LATALIGN_LEFT 1287 }; 1288 1289 // @} 1290 1291 /** 1292 * @class SUMOXMLDefinitions 1293 * @brief class for maintaining associations between enums and xml-strings 1294 */ 1295 class SUMOXMLDefinitions { 1296 1297 public: 1298 /// @brief The names of SUMO-XML elements (for passing to GenericSAXHandler) 1299 static StringBijection<int>::Entry tags[]; 1300 1301 /// @brief The names of SUMO-XML attributes (for passing to GenericSAXHandler) 1302 static StringBijection<int>::Entry attrs[]; 1303 1304 /// @brief The names of SUMO-XML elements for use in netbuild 1305 static StringBijection<int> Tags; 1306 1307 /// @brief The names of SUMO-XML attributes for use in netbuild 1308 static StringBijection<int> Attrs; 1309 1310 /// @name Special values of SUMO-XML attributes 1311 /// @{ 1312 1313 /// @brief node types 1314 static StringBijection<SumoXMLNodeType> NodeTypes; 1315 1316 /// @brief edge functions 1317 static StringBijection<SumoXMLEdgeFunc> EdgeFunctions; 1318 1319 /// @brief lane spread functions 1320 static StringBijection<LaneSpreadFunction> LaneSpreadFunctions; 1321 1322 /// @brief righ of way algorithms 1323 static StringBijection<RightOfWay> RightOfWayValues; 1324 1325 /// @brief fringe types 1326 static StringBijection<FringeType> FringeTypeValues; 1327 1328 /// @brief person modes 1329 static StringBijection<PersonMode> PersonModeValues; 1330 1331 /// @brief link states 1332 static StringBijection<LinkState> LinkStates; 1333 1334 /// @brief link directions 1335 static StringBijection<LinkDirection> LinkDirections; 1336 1337 /// @brief traffic light types 1338 static StringBijection<TrafficLightType> TrafficLightTypes; 1339 1340 /// @brief lane change models 1341 static StringBijection<LaneChangeModel> LaneChangeModels; 1342 1343 /// @brief car following models 1344 static StringBijection<SumoXMLTag> CarFollowModels; 1345 1346 /// @brief lateral alignments 1347 static StringBijection<LateralAlignment> LateralAlignments; 1348 1349 /// @brief lane change actions 1350 static StringBijection<LaneChangeAction> LaneChangeActions; 1351 1352 /// @brief train types 1353 static StringBijection<TrainType> TrainTypes; 1354 /// @} 1355 1356 /// @name Helper functions for ID-string manipulations 1357 /// @{ 1358 1359 /// @brief whether the given string is a valid id for a network element 1360 static bool isValidNetID(const std::string& value); 1361 1362 /// @brief whether the given string is a valid id for a vehicle or flow 1363 static bool isValidVehicleID(const std::string& value); 1364 1365 /// @brief whether the given string is a valid id for an edge or vehicle type 1366 static bool isValidTypeID(const std::string& value); 1367 1368 /// @brief whether the given string is a valid id for an detector 1369 static bool isValidDetectorID(const std::string& value); 1370 1371 /// @brief whether the given string is a valid attribute for a certain key (for example, a name) 1372 static bool isValidAttribute(const std::string& value); 1373 1374 /// @brief whether the given string is a valid attribute for a filename (for example, a name) 1375 static bool isValidFilename(const std::string& value); 1376 1377 /// @brief whether the given string is a valid list of id for a network (empty aren't allowed) 1378 static bool isValidListOfNetIDs(const std::string& value); 1379 1380 /// @brief whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed) 1381 static bool isValidListOfTypeID(const std::string& value); 1382 1383 /// @brief whether the given string is a valid key for a generic parameter 1384 static bool isValidGenericParameterKey(const std::string& value); 1385 1386 /// @brief whether the given string is a valid value for a generic parameter 1387 static bool isValidGenericParameterValue(const std::string& value); 1388 1389 /// @brief return the junction id when given an edge of type internal, crossing or WalkingArea 1390 static std::string getJunctionIDFromInternalEdge(const std::string internalEdge); 1391 1392 /// @brief return edge id when given the lane ID 1393 static std::string getEdgeIDFromLane(const std::string laneID); 1394 /// @} 1395 1396 /// @brief all allowed characters for phase state 1397 static const std::string ALLOWED_TLS_LINKSTATES; 1398 1399 1400 1401 private: 1402 /// @brief containers for the different SUMOXMLDefinitions 1403 /// @{ 1404 1405 /// @brief node type values 1406 static StringBijection<SumoXMLNodeType>::Entry sumoNodeTypeValues[]; 1407 1408 /// @brief edge function values 1409 static StringBijection<SumoXMLEdgeFunc>::Entry sumoEdgeFuncValues[]; 1410 1411 /// @brief lane spread function values 1412 static StringBijection<LaneSpreadFunction>::Entry laneSpreadFunctionValues[]; 1413 1414 /// @brief lane spread function values 1415 static StringBijection<RightOfWay>::Entry rightOfWayValuesInitializer[]; 1416 1417 /// @brief lane spread function values 1418 static StringBijection<FringeType>::Entry fringeTypeValuesInitializer[]; 1419 1420 /// @brief person mode values 1421 static StringBijection<PersonMode>::Entry personModeValuesInitializer[]; 1422 1423 /// @brief link state values 1424 static StringBijection<LinkState>::Entry linkStateValues[]; 1425 1426 /// @brief link direction values 1427 static StringBijection<LinkDirection>::Entry linkDirectionValues[]; 1428 1429 /// @brief traffic light types values 1430 static StringBijection<TrafficLightType>::Entry trafficLightTypesValues[]; 1431 1432 /// @brief lane change model values 1433 static StringBijection<LaneChangeModel>::Entry laneChangeModelValues[]; 1434 1435 /// @brief car follwing model values 1436 static StringBijection<SumoXMLTag>::Entry carFollowModelValues[]; 1437 1438 /// @brief lanteral alignment values 1439 static StringBijection<LateralAlignment>::Entry lateralAlignmentValues[]; 1440 1441 /// @brief lane change action values 1442 static StringBijection<LaneChangeAction>::Entry laneChangeActionValues[]; 1443 1444 /// @brief train type values values 1445 static StringBijection<TrainType>::Entry trainTypeValues[]; 1446 /// @} 1447 1448 /// @brief all allowed characters for phase state 1449 static const char AllowedTLS_linkStatesInitializer[]; 1450 }; 1451 1452 #endif 1453 1454 1455 /****************************************************************************/ 1456