Eclipse SUMO - Simulation of Urban MObility
ROEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-2022 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 /****************************************************************************/
23 // A basic edge for routing applications
24 /****************************************************************************/
25 #pragma once
26 #include <config.h>
27 
28 #include <string>
29 #include <map>
30 #include <vector>
31 #include <algorithm>
32 #include <utils/common/Named.h>
33 #include <utils/common/StdDefs.h>
38 #include <utils/geom/Boundary.h>
39 #ifdef HAVE_FOX
41 #endif
43 #include "RONode.h"
44 #include "ROVehicle.h"
45 
46 
47 // ===========================================================================
48 // class declarations
49 // ===========================================================================
50 class ROLane;
51 class ROEdge;
52 
53 typedef std::vector<ROEdge*> ROEdgeVector;
54 typedef std::vector<const ROEdge*> ConstROEdgeVector;
55 typedef std::vector<std::pair<const ROEdge*, const ROEdge*> > ROConstEdgePairVector;
56 
57 
58 // ===========================================================================
59 // class definitions
60 // ===========================================================================
70 class ROEdge : public Named, public Parameterised {
71 public:
79  ROEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority);
80 
81 
83  virtual ~ROEdge();
84 
85 
87 
88 
97  virtual void addLane(ROLane* lane);
98 
99 
106  virtual void addSuccessor(ROEdge* s, ROEdge* via = nullptr, std::string dir = "");
107 
108 
112  inline void setFunction(SumoXMLEdgeFunc func) {
113  myFunction = func;
114  }
115 
116 
120  inline void setSource(const bool isSource = true) {
121  myAmSource = isSource;
122  }
123 
124 
128  inline void setSink(const bool isSink = true) {
129  myAmSink = isSink;
130  }
131 
132 
136  inline void setRestrictions(const std::map<SUMOVehicleClass, double>* restrictions) {
137  myRestrictions = restrictions;
138  }
139 
140  inline void setTimePenalty(double value) {
141  myTimePenalty = value;
142  }
143 
145  inline bool isInternal() const {
147  }
148 
150  inline bool isCrossing() const {
152  }
153 
155  inline bool isWalkingArea() const {
157  }
158 
159  inline bool isTazConnector() const {
161  }
162 
163  void setOtherTazConnector(const ROEdge* edge) {
164  myOtherTazConnector = edge;
165  }
166 
167  const ROEdge* getOtherTazConnector() const {
168  return myOtherTazConnector;
169  }
170 
180  void buildTimeLines(const std::string& measure, const bool boundariesOverride);
181 
182  void cacheParamRestrictions(const std::vector<std::string>& restrictionKeys);
184 
185 
186 
188 
189 
194  inline SumoXMLEdgeFunc getFunction() const {
195  return myFunction;
196  }
197 
198 
202  inline bool isSink() const {
203  return myAmSink;
204  }
205 
206 
210  double getLength() const {
211  return myLength;
212  }
213 
217  int getNumericalID() const {
218  return myIndex;
219  }
220 
221 
225  double getSpeedLimit() const {
226  return mySpeed;
227  }
228 
230  // sufficient for the astar air-distance heuristic
231  double getLengthGeometryFactor() const;
232 
237  inline double getVClassMaxSpeed(SUMOVehicleClass vclass) const {
238  if (myRestrictions != 0) {
239  std::map<SUMOVehicleClass, double>::const_iterator r = myRestrictions->find(vclass);
240  if (r != myRestrictions->end()) {
241  return r->second;
242  }
243  }
244  return mySpeed;
245  }
246 
247 
251  int getNumLanes() const {
252  return (int) myLanes.size();
253  }
254 
255 
262  bool isConnectedTo(const ROEdge& e, const SUMOVehicleClass vClass) const;
263 
264 
269  inline bool prohibits(const ROVehicle* const vehicle) const {
270  const SUMOVehicleClass vclass = vehicle->getVClass();
271  return (myCombinedPermissions & vclass) != vclass;
272  }
273 
275  return myCombinedPermissions;
276  }
277 
282  inline bool restricts(const ROVehicle* const vehicle) const {
283  const std::vector<double>& vTypeRestrictions = vehicle->getType()->paramRestrictions;
284  assert(vTypeRestrictions.size() == myParamRestrictions.size());
285  for (int i = 0; i < (int)vTypeRestrictions.size(); i++) {
286  if (vTypeRestrictions[i] > myParamRestrictions[i]) {
287  return true;
288  }
289  }
290  return false;
291  }
292 
293 
298  bool allFollowersProhibit(const ROVehicle* const vehicle) const;
300 
301 
302 
304 
305 
312  void addEffort(double value, double timeBegin, double timeEnd);
313 
314 
321  void addTravelTime(double value, double timeBegin, double timeEnd);
322 
323 
331  int getNumSuccessors() const;
332 
333 
339 
345 
346 
354  int getNumPredecessors() const;
355 
356 
361  const ROEdgeVector& getPredecessors() const {
362  return myApproachingEdges;
363  }
364 
366  const ROEdge* getNormalBefore() const;
367 
369  const ROEdge* getNormalAfter() const;
370 
378  double getEffort(const ROVehicle* const veh, double time) const;
379 
380 
386  bool hasLoadedTravelTime(double time) const;
387 
388 
395  double getTravelTime(const ROVehicle* const veh, double time) const;
396 
397 
406  static inline double getEffortStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
407  return edge->getEffort(veh, time);
408  }
409 
410 
418  static inline double getTravelTimeStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
419  return edge->getTravelTime(veh, time);
420  }
421 
422  static inline double getTravelTimeStaticRandomized(const ROEdge* const edge, const ROVehicle* const veh, double time) {
423  return edge->getTravelTime(veh, time) * RandHelper::rand(1., gWeightsRandomFactor);
424  }
425 
427  static inline double getTravelTimeAggregated(const ROEdge* const edge, const ROVehicle* const veh, double time) {
428  return edge->getTravelTime(veh, time);
429  }
430 
432  static inline double getTravelTimeStaticPriorityFactor(const ROEdge* const edge, const ROVehicle* const veh, double time) {
433  double result = edge->getTravelTime(veh, time);
434  // lower priority should result in higher effort (and the edge with
435  // minimum priority receives a factor of myPriorityFactor
436  const double relativeInversePrio = 1 - ((edge->getPriority() - myMinEdgePriority) / myEdgePriorityRange);
437  result *= 1 + relativeInversePrio * myPriorityFactor;
438  return result;
439  }
440 
446  inline double getMinimumTravelTime(const ROVehicle* const veh) const {
447  if (isTazConnector()) {
448  return 0;
449  } else if (veh != 0) {
450  return myLength / MIN2(veh->getType()->maxSpeed, veh->getChosenSpeedFactor() * mySpeed);
451  } else {
452  return myLength / mySpeed;
453  }
454  }
455 
456 
457  template<PollutantsInterface::EmissionType ET>
458  static double getEmissionEffort(const ROEdge* const edge, const ROVehicle* const veh, double time) {
459  double ret = 0;
460  if (!edge->getStoredEffort(time, ret)) {
461  const SUMOVTypeParameter* const type = veh->getType();
462  const double vMax = MIN2(type->maxSpeed, edge->mySpeed);
464  ret = PollutantsInterface::computeDefault(type->emissionClass, ET, vMax, accel, 0, edge->getTravelTime(veh, time)); // @todo: give correct slope
465  }
466  return ret;
467  }
468 
469 
470  static double getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, double time);
471 
472  static double getStoredEffort(const ROEdge* const edge, const ROVehicle* const /*veh*/, double time) {
473  double ret = 0;
474  edge->getStoredEffort(time, ret);
475  return ret;
476  }
478 
479 
481  double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate = false) const;
482 
483 
485  static const ROEdgeVector& getAllEdges();
486 
488  static int dictSize() {
489  return (int)myEdges.size();
490  };
491 
492  static void setGlobalOptions(const bool interpolate) {
493  myInterpolate = interpolate;
494  }
495 
496  static void disableTimelineWarning() {
497  myHaveTTWarned = true;
498  }
499 
501  static const Position getStopPosition(const SUMOVehicleParameter::Stop& stop);
502 
504  int getPriority() const {
505  return myPriority;
506  }
507 
508  const RONode* getFromJunction() const {
509  return myFromJunction;
510  }
511 
512  const RONode* getToJunction() const {
513  return myToJunction;
514  }
515 
520  const std::vector<ROLane*>& getLanes() const {
521  return myLanes;
522  }
523 
525  inline const ROEdge* getBidiEdge() const {
526  return myBidiEdge;
527  }
528 
530  inline void setBidiEdge(const ROEdge* bidiEdge) {
531  myBidiEdge = bidiEdge;
532  }
533 
535  if (myReversedRoutingEdge == nullptr) {
537  }
538  return myReversedRoutingEdge;
539  }
540 
542  if (myRailwayRoutingEdge == nullptr) {
544  }
545  return myRailwayRoutingEdge;
546  }
547 
549  bool hasStoredEffort() const {
550  return myUsingETimeLine;
551  }
552 
554  static bool initPriorityFactor(double priorityFactor);
555 
556 protected:
563  bool getStoredEffort(double time, double& ret) const;
564 
565 
566 
567 protected:
571 
573  const int myIndex;
574 
576  const int myPriority;
577 
579  double mySpeed;
580 
582  double myLength;
583 
590 
595 
597  static bool myInterpolate;
598 
600  static bool myHaveEWarned;
602  static bool myHaveTTWarned;
603 
606 
608 
611 
614 
616  const std::map<SUMOVehicleClass, double>* myRestrictions;
617 
619  std::vector<ROLane*> myLanes;
620 
623 
626 
629 
632 
635 
637  std::vector<double> myParamRestrictions;
638 
640 
642  static double myPriorityFactor;
644  static double myMinEdgePriority;
646  static double myEdgePriorityRange;
647 
649  mutable std::map<SUMOVehicleClass, ROEdgeVector> myClassesSuccessorMap;
650 
652  mutable std::map<SUMOVehicleClass, ROConstEdgePairVector> myClassesViaSuccessorMap;
653 
657 
658 #ifdef HAVE_FOX
660  mutable FXMutex myLock;
661 #endif
662 
663 private:
665  ROEdge(const ROEdge& src);
666 
668  ROEdge& operator=(const ROEdge& src);
669 
670 };
std::vector< ROEdge * > ROEdgeVector
Definition: RODFRouteDesc.h:33
std::vector< std::pair< const ROEdge *, const ROEdge * > > ROConstEdgePairVector
Definition: ROEdge.h:55
std::vector< const ROEdge * > ConstROEdgeVector
Definition: ROEdge.h:54
std::vector< ROEdge * > ROEdgeVector
Definition: ROEdge.h:51
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
@ SUMO_ATTR_ACCEL
@ SUMO_ATTR_SIGMA
double gWeightsRandomFactor
Definition: StdDefs.cpp:29
T MIN2(T a, T b)
Definition: StdDefs.h:74
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
Base class for objects which have an id.
Definition: Named.h:54
An upper class for objects with additional parameters.
Definition: Parameterised.h:41
static double computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const double tt, const EnergyParams *param=0)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
A basic edge for routing applications.
Definition: ROEdge.h:70
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
Definition: ROEdge.cpp:339
static double myPriorityFactor
Coefficient for factoring edge priority into routing weight.
Definition: ROEdge.h:642
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition: ROEdge.h:237
bool hasStoredEffort() const
whether effort data was loaded for this edge
Definition: ROEdge.h:549
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition: ROEdge.h:217
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
Definition: ROEdge.cpp:267
double getDistanceTo(const ROEdge *other, const bool doBoundaryEstimate=false) const
optimistic distance heuristic for use in routing
Definition: ROEdge.cpp:162
void setFunction(SumoXMLEdgeFunc func)
Sets the function of the edge.
Definition: ROEdge.h:112
ReversedEdge< ROEdge, ROVehicle > * getReversedRoutingEdge() const
Definition: ROEdge.h:534
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself
Definition: ROEdge.cpp:279
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
Definition: ROEdge.cpp:138
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
Definition: ROEdge.cpp:182
ROEdge & operator=(const ROEdge &src)
Invalidated assignment operator.
static double getStoredEffort(const ROEdge *const edge, const ROVehicle *const, double time)
Definition: ROEdge.h:472
ReversedEdge< ROEdge, ROVehicle > * myReversedRoutingEdge
a reversed version for backward routing
Definition: ROEdge.h:655
bool restricts(const ROVehicle *const vehicle) const
Returns whether this edge has restriction parameters forbidding the given vehicle to pass it.
Definition: ROEdge.h:282
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
Definition: ROEdge.cpp:290
int getNumLanes() const
Returns the number of lanes this edge has.
Definition: ROEdge.h:251
ROEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROEdge.cpp:56
std::vector< ROLane * > myLanes
This edge's lanes.
Definition: ROEdge.h:619
void setRestrictions(const std::map< SUMOVehicleClass, double > *restrictions)
Sets the vehicle class specific speed limits of the edge.
Definition: ROEdge.h:136
const ROEdge * getOtherTazConnector() const
Definition: ROEdge.h:167
static bool initPriorityFactor(double priorityFactor)
initialize priority factor range
Definition: ROEdge.cpp:442
int getPriority() const
get edge priority (road class)
Definition: ROEdge.h:504
static ROEdgeVector myEdges
Definition: ROEdge.h:639
bool myAmSource
Definition: ROEdge.h:585
RailEdge< ROEdge, ROVehicle > * myRailwayRoutingEdge
Definition: ROEdge.h:656
static double getTravelTimeStaticPriorityFactor(const ROEdge *const edge, const ROVehicle *const veh, double time)
Return traveltime weighted by edge priority (scaled penalty for low-priority edges)
Definition: ROEdge.h:432
const int myIndex
The index (numeric id) of the edge.
Definition: ROEdge.h:573
SumoXMLEdgeFunc myFunction
The function of the edge.
Definition: ROEdge.h:613
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
Definition: ROEdge.h:589
void setSource(const bool isSource=true)
Sets whether the edge is a source.
Definition: ROEdge.h:120
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition: ROEdge.h:649
bool isTazConnector() const
Definition: ROEdge.h:159
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
Definition: ROEdge.h:652
void setBidiEdge(const ROEdge *bidiEdge)
set opposite superposable/congruent edge
Definition: ROEdge.h:530
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
Definition: ROEdge.h:637
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
Definition: ROEdge.h:594
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
Definition: ROEdge.h:269
double getSpeedLimit() const
Returns the speed allowed on this edge.
Definition: ROEdge.h:225
const ROEdge * myOtherTazConnector
the other taz-connector if this edge isTazConnector, otherwise nullptr
Definition: ROEdge.h:625
bool isSink() const
Returns whether the edge acts as a sink.
Definition: ROEdge.h:202
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
Definition: ROEdge.cpp:94
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
Definition: ROEdge.h:592
bool isInternal() const
return whether this edge is an internal edge
Definition: ROEdge.h:145
virtual ~ROEdge()
Destructor.
Definition: ROEdge.cpp:86
void setSink(const bool isSink=true)
Sets whether the edge is a sink.
Definition: ROEdge.h:128
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges including vias, restricted by vClass.
Definition: ROEdge.cpp:400
static double getTravelTimeAggregated(const ROEdge *const edge, const ROVehicle *const veh, double time)
Alias for getTravelTimeStatic (there is no routing device to provide aggregated travel times)
Definition: ROEdge.h:427
ROEdge(const ROEdge &src)
Invalidated copy constructor.
static double getEmissionEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.h:458
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Definition: ROEdge.cpp:249
const ROEdge * myBidiEdge
the bidirectional rail edge or nullpr
Definition: ROEdge.h:628
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
Definition: ROEdge.h:631
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.cpp:213
RONode * myFromJunction
the junctions for this edge
Definition: ROEdge.h:569
const ROEdge * getBidiEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition: ROEdge.h:525
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Definition: ROEdge.h:597
const RONode * getFromJunction() const
Definition: ROEdge.h:508
static void disableTimelineWarning()
Definition: ROEdge.h:496
SumoXMLEdgeFunc getFunction() const
Returns the function of the edge.
Definition: ROEdge.h:194
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
Definition: ROEdge.cpp:188
double getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
Definition: ROEdge.h:446
static int dictSize()
Returns the number of edges.
Definition: ROEdge.h:488
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
Definition: ROEdge.h:520
double myLength
The length of the edge.
Definition: ROEdge.h:582
bool myAmSink
whether the edge is a source or a sink
Definition: ROEdge.h:585
SVCPermissions getPermissions() const
Definition: ROEdge.h:274
void setOtherTazConnector(const ROEdge *edge)
Definition: ROEdge.h:163
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
Definition: ROEdge.cpp:364
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
Definition: ROEdge.cpp:145
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
Definition: ROEdge.cpp:324
int getNumPredecessors() const
Returns the number of edges connected to this edge.
Definition: ROEdge.cpp:258
static double getTravelTimeStaticRandomized(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.h:422
static double myEdgePriorityRange
the difference between maximum and minimum priority for all edges
Definition: ROEdge.h:646
double myTimePenalty
flat penalty when computing traveltime
Definition: ROEdge.h:634
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this edge.
Definition: ROEdge.h:616
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
Definition: ROEdge.h:622
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Definition: ROEdge.cpp:356
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
Definition: ROEdge.h:602
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
Definition: ROEdge.cpp:152
static double getEffortStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the effort for the given edge.
Definition: ROEdge.h:406
bool isWalkingArea() const
return whether this edge is walking area
Definition: ROEdge.h:155
double getLengthGeometryFactor() const
return a lower bound on shape.length() / myLength that is
Definition: ROEdge.cpp:333
double getLength() const
Returns the length of the edge.
Definition: ROEdge.h:210
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
Definition: ROEdge.h:605
ROConstEdgePairVector myFollowingViaEdges
Definition: ROEdge.h:607
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Definition: ROEdge.h:587
static void setGlobalOptions(const bool interpolate)
Definition: ROEdge.h:492
const ROEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of incoming edges.
Definition: ROEdge.h:361
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: ROEdge.h:150
static double getTravelTimeStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition: ROEdge.h:418
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:109
const int myPriority
The edge priority (road class)
Definition: ROEdge.h:576
static double myMinEdgePriority
Minimum priority for all edges.
Definition: ROEdge.h:644
bool isConnectedTo(const ROEdge &e, const SUMOVehicleClass vClass) const
returns the information whether this edge is directly connected to the given
Definition: ROEdge.cpp:436
static bool myHaveEWarned
Information whether the edge has reported missing weights.
Definition: ROEdge.h:600
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
Definition: ROEdge.cpp:350
RONode * myToJunction
Definition: ROEdge.h:570
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
Definition: ROEdge.h:610
double mySpeed
The maximum speed allowed on this edge.
Definition: ROEdge.h:579
const RONode * getToJunction() const
Definition: ROEdge.h:512
RailEdge< ROEdge, ROVehicle > * getRailwayRoutingEdge() const
Definition: ROEdge.h:541
void setTimePenalty(double value)
Definition: ROEdge.h:140
A single lane the router may use.
Definition: ROLane.h:48
Base class for nodes used by the router.
Definition: RONode.h:43
SUMOVehicleClass getVClass() const
Definition: RORoutable.h:109
const SUMOVTypeParameter * getType() const
Returns the type of the routable.
Definition: RORoutable.h:82
A vehicle as used by router.
Definition: ROVehicle.h:50
double getChosenSpeedFactor() const
Returns an upper bound for the speed factor of this vehicle.
Definition: ROVehicle.h:109
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
Definition: RandHelper.h:119
Structure representing possible vehicle parameter.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
std::vector< double > paramRestrictions
cached value of parameters which may restrict access to certain edges
double maxSpeed
The vehicle type's maximum speed [m/s].
double getCFParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
SUMOVehicleClass vehicleClass
The vehicle's class.
static double getDefaultImperfection(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle c...
static double getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
Definition of vehicle stop (position and duration)