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.dev/sumo
3 // Copyright (C) 2002-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 /****************************************************************************/
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 
144  inline double getTimePenalty() const {
145  return myTimePenalty;
146  }
147 
149  inline bool isNormal() const {
151  }
152 
154  inline bool isInternal() const {
156  }
157 
159  inline bool isCrossing() const {
161  }
162 
164  inline bool isWalkingArea() const {
166  }
167 
168  inline bool isTazConnector() const {
170  }
171 
172  void setOtherTazConnector(const ROEdge* edge) {
173  myOtherTazConnector = edge;
174  }
175 
176  const ROEdge* getOtherTazConnector() const {
177  return myOtherTazConnector;
178  }
179 
189  void buildTimeLines(const std::string& measure, const bool boundariesOverride);
190 
191  void cacheParamRestrictions(const std::vector<std::string>& restrictionKeys);
193 
194 
195 
197 
198 
203  inline SumoXMLEdgeFunc getFunction() const {
204  return myFunction;
205  }
206 
207 
211  inline bool isSink() const {
212  return myAmSink;
213  }
214 
215 
219  double getLength() const {
220  return myLength;
221  }
222 
226  int getNumericalID() const {
227  return myIndex;
228  }
229 
230 
234  double getSpeedLimit() const {
235  return mySpeed;
236  }
237 
239  // sufficient for the astar air-distance heuristic
240  double getLengthGeometryFactor() const;
241 
246  inline double getVClassMaxSpeed(SUMOVehicleClass vclass) const {
247  if (myRestrictions != 0) {
248  std::map<SUMOVehicleClass, double>::const_iterator r = myRestrictions->find(vclass);
249  if (r != myRestrictions->end()) {
250  return r->second;
251  }
252  }
253  return mySpeed;
254  }
255 
256 
260  int getNumLanes() const {
261  return (int) myLanes.size();
262  }
263 
264 
271  bool isConnectedTo(const ROEdge& e, const SUMOVehicleClass vClass) const;
272 
273 
278  inline bool prohibits(const ROVehicle* const vehicle) const {
279  const SUMOVehicleClass vclass = vehicle->getVClass();
280  return (myCombinedPermissions & vclass) != vclass;
281  }
282 
284  return myCombinedPermissions;
285  }
286 
291  inline bool restricts(const ROVehicle* const vehicle) const {
292  const std::vector<double>& vTypeRestrictions = vehicle->getType()->paramRestrictions;
293  assert(vTypeRestrictions.size() == myParamRestrictions.size());
294  for (int i = 0; i < (int)vTypeRestrictions.size(); i++) {
295  if (vTypeRestrictions[i] > myParamRestrictions[i]) {
296  return true;
297  }
298  }
299  return false;
300  }
301 
302 
307  bool allFollowersProhibit(const ROVehicle* const vehicle) const;
309 
310 
311 
313 
314 
321  void addEffort(double value, double timeBegin, double timeEnd);
322 
323 
330  void addTravelTime(double value, double timeBegin, double timeEnd);
331 
332 
340  int getNumSuccessors() const;
341 
342 
348 
353  const ROConstEdgePairVector& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING, bool ignoreTransientPermissions = false) const;
354 
355 
363  int getNumPredecessors() const;
364 
365 
370  const ROEdgeVector& getPredecessors() const {
371  return myApproachingEdges;
372  }
373 
375  const ROEdge* getNormalBefore() const;
376 
378  const ROEdge* getNormalAfter() const;
379 
387  double getEffort(const ROVehicle* const veh, double time) const;
388 
389 
395  bool hasLoadedTravelTime(double time) const;
396 
397 
404  double getTravelTime(const ROVehicle* const veh, double time) const;
405 
406 
415  static inline double getEffortStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
416  return edge->getEffort(veh, time);
417  }
418 
419 
427  static inline double getTravelTimeStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
428  return edge->getTravelTime(veh, time);
429  }
430 
431  static inline double getTravelTimeStaticRandomized(const ROEdge* const edge, const ROVehicle* const veh, double time) {
432  return edge->getTravelTime(veh, time) * RandHelper::rand(1., gWeightsRandomFactor);
433  }
434 
436  static inline double getTravelTimeAggregated(const ROEdge* const edge, const ROVehicle* const veh, double time) {
437  return edge->getTravelTime(veh, time);
438  }
439 
441  static inline double getTravelTimeStaticPriorityFactor(const ROEdge* const edge, const ROVehicle* const veh, double time) {
442  double result = edge->getTravelTime(veh, time);
443  // lower priority should result in higher effort (and the edge with
444  // minimum priority receives a factor of myPriorityFactor
445  const double relativeInversePrio = 1 - ((edge->getPriority() - myMinEdgePriority) / myEdgePriorityRange);
446  result *= 1 + relativeInversePrio * myPriorityFactor;
447  return result;
448  }
449 
455  inline double getMinimumTravelTime(const ROVehicle* const veh) const {
456  if (isTazConnector()) {
457  return 0;
458  } else if (veh != 0) {
459  return myLength / MIN2(veh->getType()->maxSpeed, veh->getChosenSpeedFactor() * mySpeed);
460  } else {
461  return myLength / mySpeed;
462  }
463  }
464 
465 
466  template<PollutantsInterface::EmissionType ET>
467  static double getEmissionEffort(const ROEdge* const edge, const ROVehicle* const veh, double time) {
468  double ret = 0;
469  if (!edge->getStoredEffort(time, ret)) {
470  const SUMOVTypeParameter* const type = veh->getType();
471  const double vMax = MIN2(type->maxSpeed, edge->mySpeed);
473  ret = PollutantsInterface::computeDefault(type->emissionClass, ET, vMax, accel, 0, edge->getTravelTime(veh, time), nullptr); // @todo: give correct slope
474  }
475  return ret;
476  }
477 
478 
479  static double getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, double time);
480 
481  static double getStoredEffort(const ROEdge* const edge, const ROVehicle* const /*veh*/, double time) {
482  double ret = 0;
483  edge->getStoredEffort(time, ret);
484  return ret;
485  }
487 
488 
490  double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate = false) const;
491 
492 
494  static const ROEdgeVector& getAllEdges();
495 
496  static void setGlobalOptions(const bool interpolate) {
497  myInterpolate = interpolate;
498  }
499 
500  static void disableTimelineWarning() {
501  myHaveTTWarned = true;
502  }
503 
505  static const Position getStopPosition(const SUMOVehicleParameter::Stop& stop);
506 
508  int getPriority() const {
509  return myPriority;
510  }
511 
512  const RONode* getFromJunction() const {
513  return myFromJunction;
514  }
515 
516  const RONode* getToJunction() const {
517  return myToJunction;
518  }
519 
524  const std::vector<ROLane*>& getLanes() const {
525  return myLanes;
526  }
527 
529  inline const ROEdge* getBidiEdge() const {
530  return myBidiEdge;
531  }
532 
534  inline void setBidiEdge(const ROEdge* bidiEdge) {
535  myBidiEdge = bidiEdge;
536  }
537 
539  if (myReversedRoutingEdge == nullptr) {
541  }
542  return myReversedRoutingEdge;
543  }
544 
546  if (myRailwayRoutingEdge == nullptr) {
548  }
549  return myRailwayRoutingEdge;
550  }
551 
553  bool hasStoredEffort() const {
554  return myUsingETimeLine;
555  }
556 
558  static bool initPriorityFactor(double priorityFactor);
559 
560 protected:
567  bool getStoredEffort(double time, double& ret) const;
568 
569 
570 
571 protected:
575 
577  const int myIndex;
578 
580  const int myPriority;
581 
583  double mySpeed;
584 
586  double myLength;
587 
594 
599 
601  static bool myInterpolate;
602 
604  static bool myHaveEWarned;
606  static bool myHaveTTWarned;
607 
610 
612 
615 
618 
620  const std::map<SUMOVehicleClass, double>* myRestrictions;
621 
623  std::vector<ROLane*> myLanes;
624 
627 
630 
633 
636 
639 
641  std::vector<double> myParamRestrictions;
642 
644 
646  static double myPriorityFactor;
648  static double myMinEdgePriority;
650  static double myEdgePriorityRange;
651 
653  mutable std::map<SUMOVehicleClass, ROEdgeVector> myClassesSuccessorMap;
654 
656  mutable std::map<SUMOVehicleClass, ROConstEdgePairVector> myClassesViaSuccessorMap;
657 
661 
662 #ifdef HAVE_FOX
664  mutable FXMutex myLock;
665 #endif
666 
667 private:
669  ROEdge(const ROEdge& src);
670 
672  ROEdge& operator=(const ROEdge& src);
673 
674 };
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
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
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:32
T MIN2(T a, T b)
Definition: StdDefs.h:76
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)
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:341
static double myPriorityFactor
Coefficient for factoring edge priority into routing weight.
Definition: ROEdge.h:646
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition: ROEdge.h:246
bool hasStoredEffort() const
whether effort data was loaded for this edge
Definition: ROEdge.h:553
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition: ROEdge.h:226
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
Definition: ROEdge.cpp:269
double getDistanceTo(const ROEdge *other, const bool doBoundaryEstimate=false) const
optimistic distance heuristic for use in routing
Definition: ROEdge.cpp:164
void setFunction(SumoXMLEdgeFunc func)
Sets the function of the edge.
Definition: ROEdge.h:112
ReversedEdge< ROEdge, ROVehicle > * getReversedRoutingEdge() const
Definition: ROEdge.h:538
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself
Definition: ROEdge.cpp:281
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
Definition: ROEdge.cpp:140
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
Definition: ROEdge.cpp:184
ROEdge & operator=(const ROEdge &src)
Invalidated assignment operator.
static double getStoredEffort(const ROEdge *const edge, const ROVehicle *const, double time)
Definition: ROEdge.h:481
ReversedEdge< ROEdge, ROVehicle > * myReversedRoutingEdge
a reversed version for backward routing
Definition: ROEdge.h:659
bool restricts(const ROVehicle *const vehicle) const
Returns whether this edge has restriction parameters forbidding the given vehicle to pass it.
Definition: ROEdge.h:291
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
Definition: ROEdge.cpp:292
int getNumLanes() const
Returns the number of lanes this edge has.
Definition: ROEdge.h:260
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:623
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:176
static bool initPriorityFactor(double priorityFactor)
initialize priority factor range
Definition: ROEdge.cpp:444
int getPriority() const
get edge priority (road class)
Definition: ROEdge.h:508
static ROEdgeVector myEdges
Definition: ROEdge.h:643
bool myAmSource
Definition: ROEdge.h:589
RailEdge< ROEdge, ROVehicle > * myRailwayRoutingEdge
Definition: ROEdge.h:660
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:441
const int myIndex
The index (numeric id) of the edge.
Definition: ROEdge.h:577
SumoXMLEdgeFunc myFunction
The function of the edge.
Definition: ROEdge.h:617
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
Definition: ROEdge.h:593
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:653
bool isNormal() const
return whether this edge is a normal edge
Definition: ROEdge.h:149
bool isTazConnector() const
Definition: ROEdge.h:168
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
Definition: ROEdge.h:656
void setBidiEdge(const ROEdge *bidiEdge)
set opposite superposable/congruent edge
Definition: ROEdge.h:534
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
Definition: ROEdge.h:641
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
Definition: ROEdge.h:598
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
Definition: ROEdge.h:278
double getSpeedLimit() const
Returns the speed allowed on this edge.
Definition: ROEdge.h:234
const ROEdge * myOtherTazConnector
the other taz-connector if this edge isTazConnector, otherwise nullptr
Definition: ROEdge.h:629
bool isSink() const
Returns whether the edge acts as a sink.
Definition: ROEdge.h:211
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
Definition: ROEdge.cpp:96
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
Definition: ROEdge.h:596
bool isInternal() const
return whether this edge is an internal edge
Definition: ROEdge.h:154
virtual ~ROEdge()
Destructor.
Definition: ROEdge.cpp:86
void setSink(const bool isSink=true)
Sets whether the edge is a sink.
Definition: ROEdge.h:128
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:436
ROEdge(const ROEdge &src)
Invalidated copy constructor.
static double getEmissionEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.h:467
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Definition: ROEdge.cpp:251
double getTimePenalty() const
Definition: ROEdge.h:144
const ROEdge * myBidiEdge
the bidirectional rail edge or nullpr
Definition: ROEdge.h:632
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
Definition: ROEdge.h:635
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.cpp:215
RONode * myFromJunction
the junctions for this edge
Definition: ROEdge.h:573
const ROEdge * getBidiEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition: ROEdge.h:529
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Definition: ROEdge.h:601
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
Returns the following edges including vias, restricted by vClass.
Definition: ROEdge.cpp:402
const RONode * getFromJunction() const
Definition: ROEdge.h:512
static void disableTimelineWarning()
Definition: ROEdge.h:500
SumoXMLEdgeFunc getFunction() const
Returns the function of the edge.
Definition: ROEdge.h:203
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
Definition: ROEdge.cpp:190
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:455
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
Definition: ROEdge.h:524
double myLength
The length of the edge.
Definition: ROEdge.h:586
bool myAmSink
whether the edge is a source or a sink
Definition: ROEdge.h:589
SVCPermissions getPermissions() const
Definition: ROEdge.h:283
void setOtherTazConnector(const ROEdge *edge)
Definition: ROEdge.h:172
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
Definition: ROEdge.cpp:366
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
Definition: ROEdge.cpp:147
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
Definition: ROEdge.cpp:326
int getNumPredecessors() const
Returns the number of edges connected to this edge.
Definition: ROEdge.cpp:260
static double getTravelTimeStaticRandomized(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition: ROEdge.h:431
static double myEdgePriorityRange
the difference between maximum and minimum priority for all edges
Definition: ROEdge.h:650
double myTimePenalty
flat penalty when computing traveltime
Definition: ROEdge.h:638
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this edge.
Definition: ROEdge.h:620
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
Definition: ROEdge.h:626
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Definition: ROEdge.cpp:358
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
Definition: ROEdge.h:606
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
Definition: ROEdge.cpp:154
static double getEffortStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the effort for the given edge.
Definition: ROEdge.h:415
bool isWalkingArea() const
return whether this edge is walking area
Definition: ROEdge.h:164
double getLengthGeometryFactor() const
return a lower bound on shape.length() / myLength that is
Definition: ROEdge.cpp:335
double getLength() const
Returns the length of the edge.
Definition: ROEdge.h:219
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
Definition: ROEdge.h:609
ROConstEdgePairVector myFollowingViaEdges
Definition: ROEdge.h:611
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Definition: ROEdge.h:591
static void setGlobalOptions(const bool interpolate)
Definition: ROEdge.h:496
const ROEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of incoming edges.
Definition: ROEdge.h:370
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition: ROEdge.h:159
static double getTravelTimeStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition: ROEdge.h:427
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:111
const int myPriority
The edge priority (road class)
Definition: ROEdge.h:580
static double myMinEdgePriority
Minimum priority for all edges.
Definition: ROEdge.h:648
bool isConnectedTo(const ROEdge &e, const SUMOVehicleClass vClass) const
returns the information whether this edge is directly connected to the given
Definition: ROEdge.cpp:438
static bool myHaveEWarned
Information whether the edge has reported missing weights.
Definition: ROEdge.h:604
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
Definition: ROEdge.cpp:352
RONode * myToJunction
Definition: ROEdge.h:574
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
Definition: ROEdge.h:614
double mySpeed
The maximum speed allowed on this edge.
Definition: ROEdge.h:583
const RONode * getToJunction() const
Definition: ROEdge.h:516
RailEdge< ROEdge, ROVehicle > * getRailwayRoutingEdge() const
Definition: ROEdge.h:545
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.cpp:94
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 (technical) 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)