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.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
21 // Structure representing possible vehicle parameter
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include <string>
28 #include <utils/common/RGBColor.h>
29 #include <utils/common/SUMOTime.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class OutputDevice;
37 class OptionsCont;
38 
39 
40 // ===========================================================================
41 // value definitions
42 // ===========================================================================
43 const int VEHPARS_COLOR_SET = 1;
44 const int VEHPARS_VTYPE_SET = 2;
45 const int VEHPARS_DEPARTLANE_SET = 2 << 1;
46 const int VEHPARS_DEPARTPOS_SET = 2 << 2;
47 const int VEHPARS_DEPARTSPEED_SET = 2 << 3;
48 const int VEHPARS_END_SET = 2 << 4;
49 const int VEHPARS_NUMBER_SET = 2 << 5;
50 const int VEHPARS_PERIOD_SET = 2 << 6;
51 const int VEHPARS_VPH_SET = 2 << 7;
52 const int VEHPARS_PROB_SET = 2 << 8;
53 const int VEHPARS_POISSON_SET = 2 << 9;
54 const int VEHPARS_ROUTE_SET = 2 << 10;
55 const int VEHPARS_ARRIVALLANE_SET = 2 << 11;
56 const int VEHPARS_ARRIVALPOS_SET = 2 << 12;
57 const int VEHPARS_ARRIVALSPEED_SET = 2 << 13;
58 const int VEHPARS_LINE_SET = 2 << 14;
59 const int VEHPARS_FROM_TAZ_SET = 2 << 15;
60 const int VEHPARS_TO_TAZ_SET = 2 << 16;
61 const int VEHPARS_FORCE_REROUTE = 2 << 17;
62 const int VEHPARS_PERSON_CAPACITY_SET = 2 << 18;
63 const int VEHPARS_PERSON_NUMBER_SET = 2 << 19;
64 const int VEHPARS_CONTAINER_NUMBER_SET = 2 << 20;
65 const int VEHPARS_DEPARTPOSLAT_SET = 2 << 21;
66 const int VEHPARS_ARRIVALPOSLAT_SET = 2 << 22;
67 const int VEHPARS_VIA_SET = 2 << 23;
68 const int VEHPARS_SPEEDFACTOR_SET = 2 << 24;
69 const int VEHPARS_DEPARTEDGE_SET = 2 << 25;
70 const int VEHPARS_ARRIVALEDGE_SET = 2 << 26;
71 const int VEHPARS_CALIBRATORSPEED_SET = 2 << 27;
73 const int VEHPARS_CFMODEL_PARAMS_SET = 2 << 29;
74 const int VEHPARS_PARKING_BADGES_SET = 2 << 30;
75 
76 const int STOP_INDEX_END = -1;
77 const int STOP_INDEX_FIT = -2;
78 const int STOP_INDEX_REPEAT = -3;
79 
80 const int STOP_START_SET = 1;
81 const int STOP_END_SET = 2;
82 const int STOP_DURATION_SET = 2 << 1;
83 const int STOP_UNTIL_SET = 2 << 2;
84 const int STOP_EXTENSION_SET = 2 << 3;
85 const int STOP_TRIGGER_SET = 2 << 4;
86 const int STOP_PARKING_SET = 2 << 5;
87 const int STOP_EXPECTED_SET = 2 << 6;
88 const int STOP_CONTAINER_TRIGGER_SET = 2 << 7;
89 const int STOP_EXPECTED_CONTAINERS_SET = 2 << 8;
90 const int STOP_TRIP_ID_SET = 2 << 9;
91 const int STOP_LINE_SET = 2 << 10;
92 const int STOP_SPEED_SET = 2 << 11;
93 const int STOP_SPLIT_SET = 2 << 12;
94 const int STOP_JOIN_SET = 2 << 13;
95 const int STOP_ARRIVAL_SET = 2 << 14;
96 const int STOP_PERMITTED_SET = 2 << 15;
97 const int STOP_ENDED_SET = 2 << 16;
98 const int STOP_STARTED_SET = 2 << 17;
99 const int STOP_POSLAT_SET = 2 << 18;
100 const int STOP_ONDEMAND_SET = 2 << 19;
101 const int STOP_JUMP_SET = 2 << 20;
102 
103 const double MIN_STOP_LENGTH = 2 * POSITION_EPS;
104 
105 
106 // ===========================================================================
107 // enum definitions
108 // ===========================================================================
113 enum class DepartDefinition {
115  GIVEN,
117  TRIGGERED,
121  NOW,
123  SPLIT,
125  BEGIN,
127  DEF_MAX
128 };
129 
130 
137  DEFAULT,
139  GIVEN,
141  RANDOM,
143  FREE,
145  ALLOWED_FREE,
147  BEST_FREE,
150 };
151 
152 
159  DEFAULT,
161  GIVEN,
165  RANDOM,
167  FREE,
169  BASE,
171  LAST,
173  RANDOM_FREE,
177  SPLIT_FRONT,
179  STOP
180 };
181 
182 
189  DEFAULT,
191  GIVEN,
195  RIGHT,
197  CENTER,
199  LEFT,
201  RANDOM,
203  FREE,
206 };
207 
208 
215  DEFAULT,
217  GIVEN,
221  RANDOM,
223  MAX,
225  DESIRED,
227  LIMIT,
229  LAST,
231  AVG
232 };
233 
234 
241  DEFAULT,
243  GIVEN,
245  RANDOM,
246 };
247 
248 
255  DEFAULT = 0,
257  CURRENT = 1,
259  GIVEN = 2,
261  RANDOM = 3,
263  FIRST_ALLOWED = 4
264 };
265 
266 
273  DEFAULT,
275  GIVEN,
277  RANDOM,
279  CENTER,
281  MAX
282 };
283 
284 
291  DEFAULT,
293  GIVEN,
295  RIGHT,
297  CENTER,
299  LEFT
300 };
301 
302 
309  DEFAULT,
311  GIVEN,
313  CURRENT
314 };
315 
316 
317 // ===========================================================================
318 // struct definitions
319 // ===========================================================================
333 public:
339 
341  virtual ~SUMOVehicleParameter();
342 
346  class Stop : public Parameterised {
347  public:
349  virtual ~Stop() {}
350 
356  void write(OutputDevice& dev, const bool close = true, const bool writeTagAndParents = true) const;
357 
359  std::vector<std::string> getStoppingPlaceIDs() const;
360 
362  std::vector<std::string> getTriggers() const;
363 
365  std::string edge;
366 
368  std::string lane;
369 
371  std::string busstop;
372 
374  std::string containerstop;
375 
377  std::string parkingarea;
378 
380  std::string chargingStation;
381 
383  std::string overheadWireSegment;
384 
386  double startPos = 0.;
387 
389  double endPos = 0.;
390 
393 
396 
399 
402 
405 
407  bool triggered = false;
408 
410  bool containerTriggered = false;
411 
413  bool joinTriggered = false;
414 
417 
419  std::set<std::string> awaitedPersons;
420 
422  std::set<std::string> permitted;
423 
425  std::set<std::string> awaitedContainers;
426 
428  bool friendlyPos = false;
429 
431  std::string actType;
432 
434  std::string tripId;
435 
437  std::string line;
438 
440  std::string split;
441 
443  std::string join;
444 
446  double speed = 0.;
447 
450 
452  bool onDemand = false;
453 
456 
458  mutable SUMOTime started = -1;
459 
461  mutable SUMOTime ended = -1;
462 
464  std::vector<std::tuple<std::string, double, double> > accessPos;
465 
467  int index = 0;
468 
470  mutable int routeIndex = 0;
471 
473  int parametersSet = 0;
474 
476  bool collision = false;
477 
479  bool breakDown = false;
480 
482  int getFlags() const;
483  };
484 
485 
490  bool wasSet(int what) const {
491  return (parametersSet & what) != 0;
492  }
493 
502  void write(OutputDevice& dev, const OptionsCont& oc, const SumoXMLTag altTag = SUMO_TAG_VEHICLE, const std::string& typeID = "") const;
503 
509  bool defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const;
510 
513 
522  static bool parseDepart(const std::string& val, const std::string& element, const std::string& id,
523  SUMOTime& depart, DepartDefinition& dd, std::string& error, const std::string& attr = "departure");
524 
534  static bool parseDepartLane(const std::string& val, const std::string& element, const std::string& id,
535  int& lane, DepartLaneDefinition& dld, std::string& error);
536 
546  static bool parseDepartPos(const std::string& val, const std::string& element, const std::string& id,
547  double& pos, DepartPosDefinition& dpd, std::string& error);
548 
558  static bool parseDepartPosLat(const std::string& val, const std::string& element, const std::string& id,
559  double& pos, DepartPosLatDefinition& dpd, std::string& error);
560 
570  static bool parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id,
571  double& speed, DepartSpeedDefinition& dsd, std::string& error);
572 
582  static bool parseRouteIndex(const std::string& val, const std::string& element, const std::string& id,
583  const SumoXMLAttr attr,
584  int& edgeIndex, RouteIndexDefinition& rid, std::string& error);
585 
595  static bool parseArrivalLane(const std::string& val, const std::string& element, const std::string& id,
596  int& lane, ArrivalLaneDefinition& ald, std::string& error);
597 
607  static bool parseArrivalPos(const std::string& val, const std::string& element, const std::string& id,
608  double& pos, ArrivalPosDefinition& apd, std::string& error);
609 
619  static bool parseArrivalPosLat(const std::string& val, const std::string& element, const std::string& id,
620  double& pos, ArrivalPosLatDefinition& apd, std::string& error);
621 
622 
632  static bool parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id,
633  double& speed, ArrivalSpeedDefinition& asd, std::string& error);
635 
643  static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string& id, bool silent = false);
644 
653  static bool parsePersonModes(const std::string& modes, const std::string& element, const std::string& id, SVCPermissions& modeSet, std::string& error);
654 
656  static void parseStopTriggers(const std::vector<std::string>& triggers, bool expectTrigger, Stop& stop);
657 
659  static ParkingType parseParkingType(const std::string& value);
660 
663 
665  std::string id;
666 
668  std::string routeid;
669 
671  std::string vtypeid;
672 
674  mutable RGBColor color;
675 
680 
683 
686 
689 
691  double departPos;
692 
695 
697  double departPosLat;
698 
701 
703  double departSpeed;
704 
707 
710 
713 
715 
720 
723 
725  double arrivalPos;
726 
729 
732 
735 
737  double arrivalSpeed;
738 
741 
744 
747 
749 
754 
757 
760 
763 
766 
768  double poissonRate;
769 
772 
774 
776  mutable std::string line;
777 
779  std::string fromTaz;
780 
782  std::string toTaz;
783 
785  mutable std::vector<Stop> stops;
786 
788  mutable std::vector<std::string> via;
789 
791  std::vector<std::string> parkingBadges;
792 
795 
797  std::string vTypes;
798 
801 
804 
806  double speedFactor;
807 
810 
813 
815  mutable int parametersSet;
816 
817 public:
819  void incrementFlow(double scale, SumoRNG* rng = nullptr);
820 
821 protected:
823  std::string getDepart() const;
824 
826  std::string getDepartLane() const;
827 
829  std::string getDepartPos() const;
830 
832  std::string getDepartPosLat() const;
833 
835  std::string getDepartSpeed() const;
836 
838  std::string getDepartEdge() const;
839 
841  std::string getArrivalLane() const;
842 
844  std::string getArrivalPos() const;
845 
847  std::string getArrivalPosLat() const;
848 
850  std::string getArrivalSpeed() const;
851 
853  std::string getArrivalEdge() const;
854 
856  std::string getInsertionChecks() const;
857 
859  bool areInsertionChecksValid(const std::string& value) const;
860 
862  void parseInsertionChecks(const std::string& value);
863 };
long long int SUMOTime
Definition: GUI.h:35
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
const int VEHPARS_CFMODEL_PARAMS_SET
const int VEHPARS_DEPARTEDGE_SET
const int VEHPARS_ARRIVALEDGE_SET
const int VEHPARS_PARKING_BADGES_SET
const int VEHPARS_PROB_SET
RouteIndexDefinition
Possible ways to choose the departure and arrival edge.
@ DEFAULT
No information given; use default.
const int STOP_ARRIVAL_SET
const int STOP_DURATION_SET
const int STOP_INDEX_END
const int VEHPARS_VPH_SET
const int VEHPARS_END_SET
const int VEHPARS_JUNCTIONMODEL_PARAMS_SET
const int VEHPARS_ROUTE_SET
const int VEHPARS_COLOR_SET
const int STOP_POSLAT_SET
const int STOP_EXPECTED_SET
const int VEHPARS_POISSON_SET
DepartLaneDefinition
Possible ways to choose a lane on depart.
@ RANDOM
The lane is chosen randomly.
@ BEST_FREE
The least occupied lane from best lanes.
@ ALLOWED_FREE
The least occupied lane from lanes which allow the continuation.
@ DEFAULT
No information given; use default.
@ FIRST_ALLOWED
The rightmost lane the vehicle may use.
@ FREE
The least occupied lane is used.
const int VEHPARS_TO_TAZ_SET
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
@ DEFAULT
No information given; use default.
@ CURRENT
The current speed is used.
DepartPosLatDefinition
Possible ways to choose the lateral departure position.
@ RIGHT
At the rightmost side of the lane.
@ DEFAULT
No information given; use default.
@ LEFT
At the leftmost side of the lane.
@ CENTER
At the center of the lane.
DepartPosDefinition
Possible ways to choose the departure position.
@ GIVEN_VEHROUTE
The position is set by the vehroute device.
@ DEFAULT
No information given; use default.
@ SPLIT_FRONT
depart position for a split vehicle is in front of the continuing vehicle
@ RANDOM_LOCATION
The position may be chosen freely in a polygon defined by a taz.
@ BASE
Back-at-zero position.
@ LAST
Insert behind the last vehicle as close as possible to still allow the specified departSpeed....
@ RANDOM_FREE
If a fixed number of random choices fails, a free position is chosen.
const int STOP_SPEED_SET
const int STOP_UNTIL_SET
const int VEHPARS_SPEEDFACTOR_SET
const int STOP_LINE_SET
const int STOP_PARKING_SET
const int STOP_TRIP_ID_SET
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
@ DEFAULT
No information given; use default.
@ CURRENT
The current lane shall be used.
const int VEHPARS_DEPARTPOS_SET
const int VEHPARS_CONTAINER_NUMBER_SET
const int STOP_PERMITTED_SET
const int VEHPARS_ARRIVALLANE_SET
DepartSpeedDefinition
Possible ways to choose the departure speed.
@ MAX
The maximum safe speed is used.
@ LIMIT
The maximum lane speed is used (speedLimit)
@ DEFAULT
No information given; use default.
@ DESIRED
The maximum lane speed is used (speedLimit * speedFactor)
@ AVG
The average speed on the lane. Fallback to DepartSpeedDefinition::DESIRED if there is no vehicle on t...
const int VEHPARS_DEPARTLANE_SET
const int STOP_SPLIT_SET
const int VEHPARS_ARRIVALPOSLAT_SET
const int STOP_START_SET
const int VEHPARS_FROM_TAZ_SET
const int VEHPARS_NUMBER_SET
const int STOP_JOIN_SET
const int VEHPARS_ARRIVALSPEED_SET
const int VEHPARS_CALIBRATORSPEED_SET
const int STOP_CONTAINER_TRIGGER_SET
const int STOP_EXTENSION_SET
const int STOP_INDEX_REPEAT
const int VEHPARS_FORCE_REROUTE
const int STOP_INDEX_FIT
const int STOP_ENDED_SET
const int STOP_TRIGGER_SET
ArrivalPosDefinition
Possible ways to choose the arrival position.
@ DEFAULT
No information given; use default.
@ CENTER
Half the road length.
const int STOP_JUMP_SET
const int STOP_ONDEMAND_SET
const int STOP_END_SET
const int VEHPARS_LINE_SET
const double MIN_STOP_LENGTH
const int STOP_STARTED_SET
const int VEHPARS_PERSON_NUMBER_SET
const int STOP_EXPECTED_CONTAINERS_SET
const int VEHPARS_DEPARTSPEED_SET
const int VEHPARS_PERIOD_SET
ArrivalPosLatDefinition
Possible ways to choose the lateral arrival position.
@ RIGHT
At the rightmost side of the lane.
@ DEFAULT
No information given; use default.
@ LEFT
At the leftmost side of the lane.
@ CENTER
At the center of the lane.
const int VEHPARS_VTYPE_SET
const int VEHPARS_PERSON_CAPACITY_SET
const int VEHPARS_ARRIVALPOS_SET
DepartDefinition
Possible ways to depart.
@ BEGIN
The departure is at simulation start.
@ GIVEN
The time is given.
@ NOW
The vehicle is discarded if emission fails (not fully implemented yet)
@ SPLIT
The departure is triggered by a train split.
@ CONTAINER_TRIGGERED
The departure is container triggered.
@ DEF_MAX
Tag for the last element in the enum for safe int casting.
@ TRIGGERED
The departure is person triggered.
const int VEHPARS_VIA_SET
const int VEHPARS_DEPARTPOSLAT_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_VEHICLE
description of a vehicle
ParkingType
Numbers representing special SUMO-XML-attribute values Information on whether a car is parking on the...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
const double INVALID_DOUBLE
invalid double
Definition: StdDefs.h:64
A storage for options typed value containers)
Definition: OptionsCont.h:89
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
An upper class for objects with additional parameters.
Definition: Parameterised.h:41
Definition of vehicle stop (position and duration)
int getFlags() const
return flags as per Vehicle::getStops
SUMOTime started
the time at which this stop was reached
std::string edge
The edge to stop at.
ParkingType parking
whether the vehicle is removed from the net while stopping
std::string lane
The lane to stop at.
SUMOTime extension
The maximum time extension for boarding / loading.
bool friendlyPos
enable or disable friendly position (used by netedit)
double speed
the speed at which this stop counts as reached (waypoint mode)
std::string parkingarea
(Optional) parking area if one is assigned to the stop
std::string split
the id of the vehicle (train portion) that splits of upon reaching this stop
double startPos
The stopping position start.
std::string line
the new line id of the trip within a cyclical public transport route
int routeIndex
at which position within the route (only used for state saving)
double posLat
the lateral offset when stopping
bool breakDown
Whether this stop was triggered by a car failure / mechanical problem / lack of energy.
bool onDemand
whether the stop may be skipped
std::string chargingStation
(Optional) charging station if one is assigned to the stop
std::string overheadWireSegment
(Optional) overhead line segment if one is assigned to the stop
std::vector< std::string > getTriggers() const
write trigger attribute
std::set< std::string > permitted
IDs of persons or containers that may board/load at this stop.
int parametersSet
Information for the output which parameter were set.
int index
at which position in the stops list
SUMOTime jump
transfer time if there shall be a jump from this stop to the next route edge
std::string join
the id of the vehicle (train portion) to which this vehicle shall be joined
SUMOTime until
The time at which the vehicle may continue its journey.
std::string actType
act Type (only used by Persons) (used by netedit)
bool triggered
whether an arriving person lets the vehicle continue
void write(OutputDevice &dev, const bool close=true, const bool writeTagAndParents=true) const
Writes the stop as XML.
SUMOTime ended
the time at which this stop was ended
double endPos
The stopping position end.
SUMOTime waitUntil
The earliest pickup time for a taxi stop.
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...
std::vector< std::string > getStoppingPlaceIDs() const
return list of stopping place ids
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
std::string busstop
(Optional) bus stop if one is assigned to the stop
bool joinTriggered
whether an joined vehicle lets this vehicle continue
std::string tripId
id of the trip within a cyclical public transport route
std::string containerstop
(Optional) container stop if one is assigned to the stop
bool containerTriggered
whether an arriving container lets the vehicle continue
bool collision
Whether this stop was triggered by a collision.
SUMOTime arrival
The (expected) time at which the vehicle reaches the stop.
SUMOTime duration
The stopping duration.
Structure representing possible vehicle parameter.
double departPosLat
(optional) The lateral position the vehicle shall depart from
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
virtual ~SUMOVehicleParameter()
Destructor.
std::string getArrivalSpeed() const
obtain arrival speed parameter in string format
double repetitionProbability
The probability for emitting a vehicle per second.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color)
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
double departSpeed
(optional) The initial speed of the vehicle
SumoXMLTag tag
The vehicle tag.
void incrementFlow(double scale, SumoRNG *rng=nullptr)
increment flow
std::string vtypeid
The vehicle's type id.
std::string getDepartLane() const
obtain depart lane parameter in string format
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
double speedFactor
individual speedFactor (overriding distribution from vType)
void parseInsertionChecks(const std::string &value)
parses insertion checks
SUMOVehicleParameter()
Constructor.
std::vector< std::string > via
List of the via-edges the vehicle must visit.
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.
int repetitionsDone
The number of times the vehicle was already inserted.
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.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
SUMOTime repetitionTotalOffset
The offset between depart and the time for the next vehicle insertions.
void write(OutputDevice &dev, const OptionsCont &oc, const SumoXMLTag altTag=SUMO_TAG_VEHICLE, const std::string &typeID="") const
Writes the parameters as a beginning element.
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
std::string getArrivalLane() const
obtain arrival lane parameter in string format
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.
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.
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons)
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.
double poissonRate
The rate for emitting vehicles with a poisson distribution.
RouteIndexDefinition arrivalEdgeProcedure
Information how the vehicle's final edge shall be chosen.
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.
SVCPermissions modes
The modes a person or container can use.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
std::string getDepartSpeed() const
obtain depart speed parameter in string format
std::string getArrivalPos() const
obtain arrival pos parameter in string format
std::string vTypes
The types of usable (auto-generated) vehicles for a person / container.
std::string getDepart() const
obtain depart parameter in string format
double departPos
(optional) The position the vehicle shall depart from
std::string getDepartEdge() const
obtain depart edge parameter in string format
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
RGBColor color
The vehicle's color, TraCI may change this.
bool areInsertionChecksValid(const std::string &value) const
check if given insertion checks are valid
double arrivalPos
(optional) The position the vehicle shall arrive on
double calibratorSpeed
speed (used by calibrator flows
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.
std::string getInsertionChecks() const
get insertion checks in string format
std::string getArrivalEdge() const
obtain arrival edge parameter in string format
std::string routeid
The vehicle's route id.
std::string id
The vehicle's id.
std::vector< std::string > parkingBadges
The parking access rights.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
int departEdge
(optional) The initial edge within the route of the vehicle
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error, const std::string &attr="departure")
Validates a given depart value.
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.
bool wasSet(int what) const
Returns whether the given parameter was set.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
static bool parseRouteIndex(const std::string &val, const std::string &element, const std::string &id, const SumoXMLAttr attr, int &edgeIndex, RouteIndexDefinition &rid, std::string &error)
Validates a given departEdge or arrivalEdge value.
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.
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
std::string getArrivalPosLat() const
obtain arrival pos lat parameter in string format
std::string getDepartPos() const
obtain depart pos parameter in string format
std::string toTaz
The vehicle's destination zone (district)
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string &id, bool silent=false)
Interprets negative edge positions and fits them onto a given edge.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
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.
int insertionChecks
bitset of InsertionCheck
bool defaultOptionOverrides(const OptionsCont &oc, const std::string &optionName) const
Returns whether the defaults shall be used.
int arrivalEdge
(optional) The final edge within the route of the vehicle
std::string fromTaz
The vehicle's origin zone (district)
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
std::string line
The vehicle's line (mainly for public transport)
int containerNumber
The static number of containers in the vehicle when it departs.
static ParkingType parseParkingType(const std::string &value)
parses parking type value
static void parseStopTriggers(const std::vector< std::string > &triggers, bool expectTrigger, Stop &stop)
parses stop trigger values
RouteIndexDefinition departEdgeProcedure
Information how the vehicle's initial edge shall be chosen.
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
Definition of vehicle stop (position and duration)
Definition: MSStop.h:35