Eclipse SUMO - Simulation of Urban MObility
SUMOVehicleParameter.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 /****************************************************************************/
17 // Structure representing possible vehicle parameter
18 /****************************************************************************/
19 #ifndef SUMOVehicleParameter_h
20 #define SUMOVehicleParameter_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
30 #include <utils/common/RGBColor.h>
31 #include <utils/common/SUMOTime.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class OutputDevice;
39 class OptionsCont;
40 
41 
42 // ===========================================================================
43 // value definitions
44 // ===========================================================================
45 const int VEHPARS_COLOR_SET = 1;
46 const int VEHPARS_VTYPE_SET = 2;
47 const int VEHPARS_DEPARTLANE_SET = 2 << 1;
48 const int VEHPARS_DEPARTPOS_SET = 2 << 2;
49 const int VEHPARS_DEPARTSPEED_SET = 2 << 3;
50 const int VEHPARS_END_SET = 2 << 4;
51 const int VEHPARS_NUMBER_SET = 2 << 5;
52 const int VEHPARS_PERIOD_SET = 2 << 6;
53 const int VEHPARS_VPH_SET = 2 << 7;
54 const int VEHPARS_PROB_SET = 2 << 8;
55 const int VEHPARS_ROUTE_SET = 2 << 9;
56 const int VEHPARS_ARRIVALLANE_SET = 2 << 10;
57 const int VEHPARS_ARRIVALPOS_SET = 2 << 11;
58 const int VEHPARS_ARRIVALSPEED_SET = 2 << 12;
59 const int VEHPARS_LINE_SET = 2 << 13;
60 const int VEHPARS_FROM_TAZ_SET = 2 << 14;
61 const int VEHPARS_TO_TAZ_SET = 2 << 15;
62 const int VEHPARS_FORCE_REROUTE = 2 << 16;
63 const int VEHPARS_PERSON_CAPACITY_SET = 2 << 17;
64 const int VEHPARS_PERSON_NUMBER_SET = 2 << 18;
65 const int VEHPARS_CONTAINER_NUMBER_SET = 2 << 19;
66 const int VEHPARS_DEPARTPOSLAT_SET = 2 << 20;
67 const int VEHPARS_ARRIVALPOSLAT_SET = 2 << 21;
68 const int VEHPARS_VIA_SET = 2 << 22;
69 const int VEHPARS_SPEEDFACTOR_SET = 2 << 23;
70 
71 const int STOP_INDEX_END = -1;
72 const int STOP_INDEX_FIT = -2;
73 
74 const int STOP_START_SET = 1;
75 const int STOP_END_SET = 2;
76 const int STOP_DURATION_SET = 2 << 1;
77 const int STOP_UNTIL_SET = 2 << 2;
78 const int STOP_EXTENSION_SET = 2 << 3;
79 const int STOP_TRIGGER_SET = 2 << 4;
80 const int STOP_PARKING_SET = 2 << 5;
81 const int STOP_EXPECTED_SET = 2 << 6;
82 const int STOP_CONTAINER_TRIGGER_SET = 2 << 7;
83 const int STOP_EXPECTED_CONTAINERS_SET = 2 << 8;
84 const int STOP_TRIP_ID_SET = 2 << 9;
85 const int STOP_LINE_SET = 2 << 10;
86 const int STOP_SPEED_SET = 2 << 11;
87 
88 const double MIN_STOP_LENGTH = 2 * POSITION_EPS;
89 
90 
91 // ===========================================================================
92 // enum definitions
93 // ===========================================================================
109 };
110 
111 
133 };
134 
135 
159 };
160 
161 
185 };
186 
187 
207 };
208 
209 
223 };
224 
225 
243 };
244 
245 
263 };
264 
265 
279 };
280 
281 
282 // ===========================================================================
283 // struct definitions
284 // ===========================================================================
298 public:
304 
306  virtual ~SUMOVehicleParameter();
307 
312  bool wasSet(int what) const {
313  return (parametersSet & what) != 0;
314  }
315 
324  void write(OutputDevice& dev, const OptionsCont& oc, const SumoXMLTag tag = SUMO_TAG_VEHICLE, const std::string& typeID = "") const;
325 
331  bool defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const;
332 
335 
344  static bool parseDepart(const std::string& val, const std::string& element, const std::string& id,
345  SUMOTime& depart, DepartDefinition& dd, std::string& error);
346 
356  static bool parseDepartLane(const std::string& val, const std::string& element, const std::string& id,
357  int& lane, DepartLaneDefinition& dld, std::string& error);
358 
368  static bool parseDepartPos(const std::string& val, const std::string& element, const std::string& id,
369  double& pos, DepartPosDefinition& dpd, std::string& error);
370 
380  static bool parseDepartPosLat(const std::string& val, const std::string& element, const std::string& id,
381  double& pos, DepartPosLatDefinition& dpd, std::string& error);
382 
392  static bool parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id,
393  double& speed, DepartSpeedDefinition& dsd, std::string& error);
394 
404  static bool parseArrivalLane(const std::string& val, const std::string& element, const std::string& id,
405  int& lane, ArrivalLaneDefinition& ald, std::string& error);
406 
416  static bool parseArrivalPos(const std::string& val, const std::string& element, const std::string& id,
417  double& pos, ArrivalPosDefinition& apd, std::string& error);
418 
428  static bool parseArrivalPosLat(const std::string& val, const std::string& element, const std::string& id,
429  double& pos, ArrivalPosLatDefinition& apd, std::string& error);
430 
431 
441  static bool parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id,
442  double& speed, ArrivalSpeedDefinition& asd, std::string& error);
444 
452  static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string& id);
453 
462  static bool parsePersonModes(const std::string& modes, const std::string& element, const std::string& id, SVCPermissions& modeSet, std::string& error);
463 
466 
468  std::string id;
469 
471  std::string routeid;
472 
474  std::string vtypeid;
475 
477  mutable RGBColor color;
478 
483 
486 
489 
492 
494  double departPos;
495 
498 
500  double departPosLat;
501 
504 
506  double departSpeed;
507 
510 
512 
517 
520 
522  double arrivalPos;
523 
526 
529 
532 
534  double arrivalSpeed;
535 
538 
540 
545 
548 
551 
554 
557 
559 
561  mutable std::string line;
562 
564  std::string fromTaz;
565 
567  std::string toTaz;
568 
572  class Stop : public Parameterised {
573 
574  public:
576  Stop();
577 
583  void write(OutputDevice& dev) const;
584 
586  std::string lane;
587 
589  std::string busstop;
590 
592  std::string containerstop;
593 
595  std::string parkingarea;
596 
598  std::string chargingStation;
599 
601  double startPos;
602 
604  double endPos;
605 
608 
611 
614 
616  bool triggered;
617 
620 
622  bool parking;
623 
625  std::set<std::string> awaitedPersons;
626 
628  std::set<std::string> awaitedContainers;
629 
632 
634  std::string actType;
635 
637  std::string tripId;
638 
640  std::string line;
641 
643  double speed;
644 
646  std::vector<std::tuple<std::string, double, double> > accessPos;
647 
649  int index;
650 
652  int parametersSet = 0;
653  };
654 
656  mutable std::vector<Stop> stops;
657 
659  mutable std::vector<std::string> via;
660 
663 
666 
668  double speedFactor;
669 
671  mutable int parametersSet;
672 
673 protected:
675  std::string getDepart() const;
676 
678  std::string getDepartLane() const;
679 
681  std::string getDepartPos() const;
682 
684  std::string getDepartPosLat() const;
685 
687  std::string getDepartSpeed() const;
688 
690  std::string getArrivalLane() const;
691 
693  std::string getArrivalPos() const;
694 
696  std::string getArrivalPosLat() const;
697 
699  std::string getArrivalSpeed() const;
700 };
701 
702 #endif
703 
704 /****************************************************************************/
705 
706 
SUMOVehicleParameter::Stop::awaitedPersons
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
Definition: SUMOVehicleParameter.h:625
SUMOVehicleParameter::personNumber
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons)
Definition: SUMOVehicleParameter.h:662
SUMOVehicleParameter::containerNumber
int containerNumber
The static number of containers in the vehicle when it departs.
Definition: SUMOVehicleParameter.h:665
ARRIVAL_POS_GIVEN
The arrival position is given.
Definition: SUMOVehicleParameter.h:234
SUMOVehicleParameter::wasSet
bool wasSet(int what) const
Returns whether the given parameter was set.
Definition: SUMOVehicleParameter.h:312
ArrivalPosDefinition
ArrivalPosDefinition
Possible ways to choose the arrival position.
Definition: SUMOVehicleParameter.h:230
SUMOVehicleParameter::parametersSet
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color)
Definition: SUMOVehicleParameter.h:671
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:42
SUMOTime.h
DEPART_POSLAT_RANDOM_FREE
If a fixed number of random choices fails, a free lateral position is chosen.
Definition: SUMOVehicleParameter.h:182
SUMOVehicleParameter::Stop::friendlyPos
bool friendlyPos
enable or disable friendly position (used by NETEDIT)
Definition: SUMOVehicleParameter.h:631
SUMOVehicleParameter::arrivalSpeedProcedure
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
Definition: SUMOVehicleParameter.h:537
ARRIVAL_SPEED_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:272
SUMOVehicleParameter::Stop::lane
std::string lane
The lane to stop at.
Definition: SUMOVehicleParameter.h:586
SUMOVehicleParameter::color
RGBColor color
The vehicle's color, TraCI may change this.
Definition: SUMOVehicleParameter.h:477
ARRIVAL_LANE_GIVEN
The arrival lane is given.
Definition: SUMOVehicleParameter.h:218
SUMOVehicleParameter::getArrivalPos
std::string getArrivalPos() const
obtain arrival pos parameter in string format
Definition: SUMOVehicleParameter.cpp:727
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
ARRIVAL_POS_RANDOM
The arrival position is chosen randomly.
Definition: SUMOVehicleParameter.h:236
SUMOVehicleParameter::getDepartSpeed
std::string getDepartSpeed() const
obtain depart speed parameter in string format
Definition: SUMOVehicleParameter.cpp:682
ARRIVAL_POSLAT_GIVEN
The position is given.
Definition: SUMOVehicleParameter.h:254
SUMOVehicleParameter::departSpeed
double departSpeed
(optional) The initial speed of the vehicle
Definition: SUMOVehicleParameter.h:506
ARRIVAL_LANE_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:216
SUMOVehicleParameter::defaultOptionOverrides
bool defaultOptionOverrides(const OptionsCont &oc, const std::string &optionName) const
Returns whether the defaults shall be used.
Definition: SUMOVehicleParameter.cpp:61
SUMOVehicleParameter::vtypeid
std::string vtypeid
The vehicle's type id.
Definition: SUMOVehicleParameter.h:474
VEHPARS_NUMBER_SET
const int VEHPARS_NUMBER_SET
Definition: SUMOVehicleParameter.h:51
SUMOVehicleParameter::departPosProcedure
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
Definition: SUMOVehicleParameter.h:497
DEPART_POS_STOP
depart position is endPos of first stop
Definition: SUMOVehicleParameter.h:156
VEHPARS_FORCE_REROUTE
const int VEHPARS_FORCE_REROUTE
Definition: SUMOVehicleParameter.h:62
SUMOVehicleParameter::repetitionOffset
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
Definition: SUMOVehicleParameter.h:550
SUMOVehicleParameter::parseDepartSpeed
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
Definition: SUMOVehicleParameter.cpp:384
SUMOVehicleParameter::Stop::busstop
std::string busstop
(Optional) bus stop if one is assigned to the stop
Definition: SUMOVehicleParameter.h:589
STOP_UNTIL_SET
const int STOP_UNTIL_SET
Definition: SUMOVehicleParameter.h:77
SUMOVehicleParameter::Stop::parametersSet
int parametersSet
Information for the output which parameter were set.
Definition: SUMOVehicleParameter.h:652
DEPART_POSLAT_LEFT
At the leftmost side of the lane.
Definition: SUMOVehicleParameter.h:176
DEPART_POS_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:142
SUMOVehicleParameter::parseDepartLane
static bool parseDepartLane(const std::string &val, const std::string &element, const std::string &id, int &lane, DepartLaneDefinition &dld, std::string &error)
Validates a given departLane value.
Definition: SUMOVehicleParameter.cpp:275
ARRIVAL_SPEED_CURRENT
The current speed is used.
Definition: SUMOVehicleParameter.h:276
STOP_SPEED_SET
const int STOP_SPEED_SET
Definition: SUMOVehicleParameter.h:86
DepartPosLatDefinition
DepartPosLatDefinition
Definition: SUMOVehicleParameter.h:166
ArrivalPosLatDefinition
ArrivalPosLatDefinition
Possible ways to choose the departure position.
Definition: SUMOVehicleParameter.h:250
DEPART_LANE_BEST_FREE
The least occupied lane from best lanes.
Definition: SUMOVehicleParameter.h:128
DEPART_POS_LAST
Insert behind the last vehicle as close as possible to still allow the specified departSpeed....
Definition: SUMOVehicleParameter.h:152
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
DepartDefinition
DepartDefinition
Possible ways to depart.
Definition: SUMOVehicleParameter.h:98
VEHPARS_ARRIVALSPEED_SET
const int VEHPARS_ARRIVALSPEED_SET
Definition: SUMOVehicleParameter.h:58
ArrivalLaneDefinition
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
Definition: SUMOVehicleParameter.h:214
SUMOVehicleParameter::departProcedure
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
Definition: SUMOVehicleParameter.h:485
SUMOVehicleParameter::Stop::line
std::string line
the new line id of the trip within a cyclical public transport route
Definition: SUMOVehicleParameter.h:640
SUMOVehicleParameter::parseArrivalPosLat
static bool parseArrivalPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosLatDefinition &apd, std::string &error)
Validates a given arrivalPosLat value.
Definition: SUMOVehicleParameter.cpp:478
SUMOVehicleParameter::Stop::parkingarea
std::string parkingarea
(Optional) parking area if one is assigned to the stop
Definition: SUMOVehicleParameter.h:595
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:297
STOP_EXTENSION_SET
const int STOP_EXTENSION_SET
Definition: SUMOVehicleParameter.h:78
SUMOVehicleParameter::parsePersonModes
static bool parsePersonModes(const std::string &modes, const std::string &element, const std::string &id, SVCPermissions &modeSet, std::string &error)
Validates a given person modes value.
Definition: SUMOVehicleParameter.cpp:550
STOP_TRIP_ID_SET
const int STOP_TRIP_ID_SET
Definition: SUMOVehicleParameter.h:84
SUMOVehicleParameter::parseArrivalPos
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
Definition: SUMOVehicleParameter.cpp:448
SUMOVehicleParameter::Stop::triggered
bool triggered
whether an arriving person lets the vehicle continue
Definition: SUMOVehicleParameter.h:616
SUMOVehicleParameter::SUMOVehicleParameter
SUMOVehicleParameter()
Constructor.
Definition: SUMOVehicleParameter.cpp:38
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:41
DEPART_POSLAT_RIGHT
At the rightmost side of the lane.
Definition: SUMOVehicleParameter.h:172
SUMOVehicleParameter::depart
SUMOTime depart
Definition: SUMOVehicleParameter.h:482
STOP_START_SET
const int STOP_START_SET
Definition: SUMOVehicleParameter.h:74
VEHPARS_PROB_SET
const int VEHPARS_PROB_SET
Definition: SUMOVehicleParameter.h:54
SUMOVehicleParameter::Stop::Stop
Stop()
constructor
Definition: SUMOVehicleParameter.cpp:159
VEHPARS_DEPARTSPEED_SET
const int VEHPARS_DEPARTSPEED_SET
Definition: SUMOVehicleParameter.h:49
RGBColor.h
DEPART_SPEED_LIMIT
The maximum lane speed is used (speedLimit)
Definition: SUMOVehicleParameter.h:204
SUMOVehicleParameter::tag
SumoXMLTag tag
The vehicle tag.
Definition: SUMOVehicleParameter.h:465
SUMOVehicleParameter::getDepartPosLat
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
Definition: SUMOVehicleParameter.cpp:649
DEPART_LANE_ALLOWED_FREE
The least occupied lane from lanes which allow the continuation.
Definition: SUMOVehicleParameter.h:126
ARRIVAL_POSLAT_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:252
VEHPARS_ARRIVALLANE_SET
const int VEHPARS_ARRIVALLANE_SET
Definition: SUMOVehicleParameter.h:56
VEHPARS_ROUTE_SET
const int VEHPARS_ROUTE_SET
Definition: SUMOVehicleParameter.h:55
SUMOVehicleParameter::line
std::string line
The vehicle's line (mainly for public transport)
Definition: SUMOVehicleParameter.h:561
DEPART_POSLAT_FREE
A free lateral position is chosen.
Definition: SUMOVehicleParameter.h:180
DEPART_POSLAT_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:184
RGBColor
Definition: RGBColor.h:39
DEPART_LANE_RANDOM
The lane is chosen randomly.
Definition: SUMOVehicleParameter.h:122
SUMOVehicleParameter::Stop::tripId
std::string tripId
id of the trip within a cyclical public transport route
Definition: SUMOVehicleParameter.h:637
ARRIVAL_POSLAT_RIGHT
At the rightmost side of the lane.
Definition: SUMOVehicleParameter.h:256
VEHPARS_ARRIVALPOS_SET
const int VEHPARS_ARRIVALPOS_SET
Definition: SUMOVehicleParameter.h:57
SUMOVehicleParameter::arrivalLaneProcedure
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
Definition: SUMOVehicleParameter.h:519
SUMOVehicleParameter::parseDepartPosLat
static bool parseDepartPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosLatDefinition &dpd, std::string &error)
Validates a given departPosLat value.
Definition: SUMOVehicleParameter.cpp:348
DEPART_POS_FREE
A free position is chosen.
Definition: SUMOVehicleParameter.h:148
SUMOVehicleParameter::getArrivalPosLat
std::string getArrivalPosLat() const
obtain arrival pos lat parameter in string format
Definition: SUMOVehicleParameter.cpp:751
SVCPermissions
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Definition: SUMOVehicleClass.h:218
DEPART_SPEED_DESIRED
The maximum lane speed is used (speedLimit * speedFactor)
Definition: SUMOVehicleParameter.h:202
SUMOVehicleParameter::getDepart
std::string getDepart() const
obtain depart parameter in string format
Definition: SUMOVehicleParameter.cpp:574
ARRIVAL_POSLAT_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:262
ARRIVAL_POSLAT_LEFT
At the leftmost side of the lane.
Definition: SUMOVehicleParameter.h:260
VEHPARS_COLOR_SET
const int VEHPARS_COLOR_SET
Definition: SUMOVehicleParameter.h:45
Parameterised.h
ARRIVAL_POS_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:242
DEPART_SPEED_GIVEN
The speed is given.
Definition: SUMOVehicleParameter.h:196
DEPART_SPEED_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:206
SUMOVehicleParameter::Stop::until
SUMOTime until
The time at which the vehicle may continue its journey.
Definition: SUMOVehicleParameter.h:610
SUMOVehicleParameter::parseArrivalLane
static bool parseArrivalLane(const std::string &val, const std::string &element, const std::string &id, int &lane, ArrivalLaneDefinition &ald, std::string &error)
Validates a given arrivalLane value.
Definition: SUMOVehicleParameter.cpp:419
ARRIVAL_POS_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:232
DEPART_LANE_GIVEN
The lane is given.
Definition: SUMOVehicleParameter.h:120
STOP_INDEX_FIT
const int STOP_INDEX_FIT
Definition: SUMOVehicleParameter.h:72
SUMOVehicleClass.h
SUMOVehicleParameter::id
std::string id
The vehicle's id.
Definition: SUMOVehicleParameter.h:468
SUMOVehicleParameter::~SUMOVehicleParameter
virtual ~SUMOVehicleParameter()
Destructor.
Definition: SUMOVehicleParameter.cpp:56
SUMOVehicleParameter::repetitionProbability
double repetitionProbability
The probability for emitting a vehicle per second.
Definition: SUMOVehicleParameter.h:553
VEHPARS_VIA_SET
const int VEHPARS_VIA_SET
Definition: SUMOVehicleParameter.h:68
SUMOVehicleParameter::arrivalPos
double arrivalPos
(optional) The position the vehicle shall arrive on
Definition: SUMOVehicleParameter.h:522
VEHPARS_LINE_SET
const int VEHPARS_LINE_SET
Definition: SUMOVehicleParameter.h:59
SUMOVehicleParameter::fromTaz
std::string fromTaz
The vehicle's origin zone (district)
Definition: SUMOVehicleParameter.h:564
ARRIVAL_LANE_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:222
SUMOVehicleParameter::arrivalPosProcedure
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
Definition: SUMOVehicleParameter.h:525
SUMOVehicleParameter::arrivalPosLat
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
Definition: SUMOVehicleParameter.h:528
SUMOVehicleParameter::parseArrivalSpeed
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
Definition: SUMOVehicleParameter.cpp:508
SUMOVehicleParameter::repetitionsDone
int repetitionsDone
The number of times the vehicle was already inserted.
Definition: SUMOVehicleParameter.h:547
SUMOVehicleParameter::parseDepart
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error)
Validates a given depart value.
Definition: SUMOVehicleParameter.cpp:244
SUMOVehicleParameter::Stop::write
void write(OutputDevice &dev) const
Writes the stop as XML.
Definition: SUMOVehicleParameter.cpp:175
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
DEPART_TRIGGERED
The departure is person triggered.
Definition: SUMOVehicleParameter.h:102
SUMOVehicleParameter::Stop::endPos
double endPos
The stopping position end.
Definition: SUMOVehicleParameter.h:604
VEHPARS_ARRIVALPOSLAT_SET
const int VEHPARS_ARRIVALPOSLAT_SET
Definition: SUMOVehicleParameter.h:67
ARRIVAL_LANE_CURRENT
The current lane shall be used.
Definition: SUMOVehicleParameter.h:220
DEPART_SPEED_RANDOM
The speed is chosen randomly.
Definition: SUMOVehicleParameter.h:198
DEPART_POS_RANDOM
The position is chosen randomly.
Definition: SUMOVehicleParameter.h:146
DEPART_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:108
SUMOVehicleParameter::routeid
std::string routeid
The vehicle's route id.
Definition: SUMOVehicleParameter.h:471
ARRIVAL_SPEED_GIVEN
The speed is given.
Definition: SUMOVehicleParameter.h:274
SUMOVehicleParameter::arrivalLane
int arrivalLane
Definition: SUMOVehicleParameter.h:516
SUMOVehicleParameter::getDepartPos
std::string getDepartPos() const
obtain depart pos parameter in string format
Definition: SUMOVehicleParameter.cpp:616
SUMO_TAG_VEHICLE
description of a vehicle
Definition: SUMOXMLDefinitions.h:119
SUMOVehicleParameter::getDepartLane
std::string getDepartLane() const
obtain depart lane parameter in string format
Definition: SUMOVehicleParameter.cpp:586
ARRIVAL_SPEED_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:278
VEHPARS_VPH_SET
const int VEHPARS_VPH_SET
Definition: SUMOVehicleParameter.h:53
SUMOVehicleParameter::departPosLat
double departPosLat
(optional) The lateral position the vehicle shall depart from
Definition: SUMOVehicleParameter.h:500
VEHPARS_DEPARTLANE_SET
const int VEHPARS_DEPARTLANE_SET
Definition: SUMOVehicleParameter.h:47
SUMOVehicleParameter::Stop::actType
std::string actType
act Type (only used by Persons) (used by NETEDIT)
Definition: SUMOVehicleParameter.h:634
SUMOVehicleParameter::write
void write(OutputDevice &dev, const OptionsCont &oc, const SumoXMLTag tag=SUMO_TAG_VEHICLE, const std::string &typeID="") const
Writes the parameters as a beginning element.
Definition: SUMOVehicleParameter.cpp:67
SUMOVehicleParameter::Stop::startPos
double startPos
The stopping position start.
Definition: SUMOVehicleParameter.h:601
DepartLaneDefinition
DepartLaneDefinition
Possible ways to choose a lane on depart.
Definition: SUMOVehicleParameter.h:116
SUMOVehicleParameter::repetitionEnd
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
Definition: SUMOVehicleParameter.h:556
SUMOVehicleParameter::departLane
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
Definition: SUMOVehicleParameter.h:488
VEHPARS_SPEEDFACTOR_SET
const int VEHPARS_SPEEDFACTOR_SET
Definition: SUMOVehicleParameter.h:69
SUMOVehicleParameter::Stop::accessPos
std::vector< std::tuple< std::string, double, double > > accessPos
lanes and positions connected to this stop (only used by duarouter where Stop is used to store stoppi...
Definition: SUMOVehicleParameter.h:646
VEHPARS_VTYPE_SET
const int VEHPARS_VTYPE_SET
Definition: SUMOVehicleParameter.h:46
SUMOVehicleParameter::departLaneProcedure
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
Definition: SUMOVehicleParameter.h:491
SUMOVehicleParameter::Stop::containerTriggered
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: SUMOVehicleParameter.h:619
VEHPARS_DEPARTPOSLAT_SET
const int VEHPARS_DEPARTPOSLAT_SET
Definition: SUMOVehicleParameter.h:66
DEPART_LANE_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:132
SUMOVehicleParameter::via
std::vector< std::string > via
List of the via-edges the vehicle must visit.
Definition: SUMOVehicleParameter.h:659
SUMOVehicleParameter::Stop::index
int index
at which position in the stops list
Definition: SUMOVehicleParameter.h:649
VEHPARS_CONTAINER_NUMBER_SET
const int VEHPARS_CONTAINER_NUMBER_SET
Definition: SUMOVehicleParameter.h:65
VEHPARS_DEPARTPOS_SET
const int VEHPARS_DEPARTPOS_SET
Definition: SUMOVehicleParameter.h:48
DEPART_POSLAT_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:168
VEHPARS_PERSON_NUMBER_SET
const int VEHPARS_PERSON_NUMBER_SET
Definition: SUMOVehicleParameter.h:64
VEHPARS_FROM_TAZ_SET
const int VEHPARS_FROM_TAZ_SET
Definition: SUMOVehicleParameter.h:60
DEPART_POSLAT_RANDOM
The lateral position is chosen randomly.
Definition: SUMOVehicleParameter.h:178
DEPART_POS_RANDOM_FREE
If a fixed number of random choices fails, a free position is chosen.
Definition: SUMOVehicleParameter.h:154
SUMOVehicleParameter::Stop::extension
SUMOTime extension
The maximum time extension for boarding / loading.
Definition: SUMOVehicleParameter.h:613
STOP_DURATION_SET
const int STOP_DURATION_SET
Definition: SUMOVehicleParameter.h:76
DepartPosDefinition
DepartPosDefinition
Possible ways to choose the departure position.
Definition: SUMOVehicleParameter.h:140
DEPART_GIVEN
The time is given.
Definition: SUMOVehicleParameter.h:100
STOP_INDEX_END
const int STOP_INDEX_END
Definition: SUMOVehicleParameter.h:71
ARRIVAL_POSLAT_CENTER
At the center of the lane.
Definition: SUMOVehicleParameter.h:258
SUMOVehicleParameter::arrivalPosLatProcedure
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
Definition: SUMOVehicleParameter.h:531
STOP_EXPECTED_SET
const int STOP_EXPECTED_SET
Definition: SUMOVehicleParameter.h:81
DEPART_SPEED_MAX
The maximum safe speed is used.
Definition: SUMOVehicleParameter.h:200
DEPART_LANE_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:118
VEHPARS_TO_TAZ_SET
const int VEHPARS_TO_TAZ_SET
Definition: SUMOVehicleParameter.h:61
STOP_TRIGGER_SET
const int STOP_TRIGGER_SET
Definition: SUMOVehicleParameter.h:79
STOP_CONTAINER_TRIGGER_SET
const int STOP_CONTAINER_TRIGGER_SET
Definition: SUMOVehicleParameter.h:82
ARRIVAL_POS_MAX
The maximum arrival position is used.
Definition: SUMOVehicleParameter.h:240
config.h
DEPART_POS_BASE
Back-at-zero position.
Definition: SUMOVehicleParameter.h:150
DEPART_SPEED_DEFAULT
No information given; use default.
Definition: SUMOVehicleParameter.h:194
STOP_EXPECTED_CONTAINERS_SET
const int STOP_EXPECTED_CONTAINERS_SET
Definition: SUMOVehicleParameter.h:83
STOP_PARKING_SET
const int STOP_PARKING_SET
Definition: SUMOVehicleParameter.h:80
VEHPARS_PERSON_CAPACITY_SET
const int VEHPARS_PERSON_CAPACITY_SET
Definition: SUMOVehicleParameter.h:63
DepartSpeedDefinition
DepartSpeedDefinition
Possible ways to choose the departure speed.
Definition: SUMOVehicleParameter.h:192
VEHPARS_PERIOD_SET
const int VEHPARS_PERIOD_SET
Definition: SUMOVehicleParameter.h:52
STOP_END_SET
const int STOP_END_SET
Definition: SUMOVehicleParameter.h:75
SUMOVehicleParameter::toTaz
std::string toTaz
The vehicle's destination zone (district)
Definition: SUMOVehicleParameter.h:567
ARRIVAL_POS_CENTER
Half the road length.
Definition: SUMOVehicleParameter.h:238
DEPART_POS_GIVEN
The position is given.
Definition: SUMOVehicleParameter.h:144
SUMOVehicleParameter::speedFactor
double speedFactor
individual speedFactor (overriding distribution from vType)
Definition: SUMOVehicleParameter.h:668
SUMOVehicleParameter::Stop::speed
double speed
the speed at which this stop counts as reached (waypoint mode)
Definition: SUMOVehicleParameter.h:643
DEPART_POS_DEF_MAX
Tag for the last element in the enum for safe int casting.
Definition: SUMOVehicleParameter.h:158
SUMOVehicleParameter::parseDepartPos
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
Definition: SUMOVehicleParameter.cpp:312
SUMOVehicleParameter::departPosLatProcedure
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.
Definition: SUMOVehicleParameter.h:503
SUMOVehicleParameter::Stop::duration
SUMOTime duration
The stopping duration.
Definition: SUMOVehicleParameter.h:607
DEPART_POSLAT_CENTER
At the center of the lane.
Definition: SUMOVehicleParameter.h:174
DEPART_CONTAINER_TRIGGERED
The departure is container triggered.
Definition: SUMOVehicleParameter.h:104
SUMOVehicleParameter::repetitionNumber
int repetitionNumber
Definition: SUMOVehicleParameter.h:544
VEHPARS_END_SET
const int VEHPARS_END_SET
Definition: SUMOVehicleParameter.h:50
SUMOVehicleParameter::getArrivalLane
std::string getArrivalLane() const
obtain arrival lane parameter in string format
Definition: SUMOVehicleParameter.cpp:709
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
SUMOVehicleParameter::stops
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
Definition: SUMOVehicleParameter.h:656
SUMOVehicleParameter::Stop::awaitedContainers
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
Definition: SUMOVehicleParameter.h:628
SUMOVehicleParameter::Stop::parking
bool parking
whether the vehicle is removed from the net while stopping
Definition: SUMOVehicleParameter.h:622
SUMOVehicleParameter::Stop::chargingStation
std::string chargingStation
(Optional) charging station if one is assigned to the stop
Definition: SUMOVehicleParameter.h:598
SUMOVehicleParameter::getArrivalSpeed
std::string getArrivalSpeed() const
obtain arrival speed parameter in string format
Definition: SUMOVehicleParameter.cpp:775
SUMOVehicleParameter::Stop::containerstop
std::string containerstop
(Optional) container stop if one is assigned to the stop
Definition: SUMOVehicleParameter.h:592
POSITION_EPS
#define POSITION_EPS
Definition: config.h:172
DEPART_POSLAT_GIVEN
The position is given.
Definition: SUMOVehicleParameter.h:170
DEPART_LANE_FREE
The least occupied lane is used.
Definition: SUMOVehicleParameter.h:124
MIN_STOP_LENGTH
const double MIN_STOP_LENGTH
Definition: SUMOVehicleParameter.h:88
DEPART_LANE_FIRST_ALLOWED
The rightmost lane the vehicle may use.
Definition: SUMOVehicleParameter.h:130
SUMOVehicleParameter::interpretEdgePos
static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string &id)
Interprets negative edge positions and fits them onto a given edge.
Definition: SUMOVehicleParameter.cpp:537
STOP_LINE_SET
const int STOP_LINE_SET
Definition: SUMOVehicleParameter.h:85
SUMOVehicleParameter::departPos
double departPos
(optional) The position the vehicle shall depart from
Definition: SUMOVehicleParameter.h:494
SUMOVehicleParameter::departSpeedProcedure
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
Definition: SUMOVehicleParameter.h:509
DEPART_NOW
The vehicle is discarded if emission fails (not fully implemented yet)
Definition: SUMOVehicleParameter.h:106
SUMOVehicleParameter::Stop
Definition of vehicle stop (position and duration)
Definition: SUMOVehicleParameter.h:572
SUMOVehicleParameter::arrivalSpeed
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
Definition: SUMOVehicleParameter.h:534
ArrivalSpeedDefinition
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
Definition: SUMOVehicleParameter.h:270