Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2026 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/****************************************************************************/
24// A basic edge for routing applications
25/****************************************************************************/
26#pragma once
27#include <config.h>
28
29#include <string>
30#include <map>
31#include <vector>
32#include <algorithm>
33#include <utils/common/Named.h>
39#include <utils/geom/Boundary.h>
41#ifdef HAVE_FOX
43#endif
45#include "RONet.h"
46#include "RONode.h"
47#include "ROVehicle.h"
48
49
50// ===========================================================================
51// class declarations
52// ===========================================================================
53class ROLane;
54class ROEdge;
55
56typedef std::vector<ROEdge*> ROEdgeVector;
57typedef std::vector<const ROEdge*> ConstROEdgeVector;
58typedef std::vector<std::pair<const ROEdge*, const ROEdge*> > ROConstEdgePairVector;
59
60
61// ===========================================================================
62// class definitions
63// ===========================================================================
73class ROEdge : public Named, public Parameterised {
74public:
82 ROEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority, const std::string& type, const std::string& routingType);
83
85 ROEdge(const std::string& id, const RONode* from, const RONode* to, SVCPermissions p);
86
87
89 virtual ~ROEdge();
90
91
93
94
103 virtual void addLane(ROLane* lane);
104
105
112 virtual void addSuccessor(ROEdge* s, ROEdge* via = nullptr, std::string dir = "");
113
114
118 inline void setFunction(SumoXMLEdgeFunc func) {
119 myFunction = func;
120 }
121
122
126 inline void setSource(const bool isSource = true) {
127 myAmSource = isSource;
128 }
129
130
134 inline void setSink(const bool isSink = true) {
136 }
137
138
142 inline void setSpeedRestrictions(const std::map<SUMOVehicleClass, double>* restrictions) {
143 mySpeedRestrictions = restrictions;
144 }
145
146 inline void setTimePenalty(double value) {
147 myTimePenalty = value;
148 }
149
150 inline double getTimePenalty() const {
151 return myTimePenalty;
152 }
153
155 inline bool isNormal() const {
157 }
158
160 inline bool isInternal() const {
162 }
163
165 inline bool isCrossing() const {
167 }
168
170 inline bool isWalkingArea() const {
172 }
173
174 inline bool isTazConnector() const {
176 }
177
178 void setOtherTazConnector(const ROEdge* edge) {
179 myOtherTazConnector = edge;
180 }
181
183 return myOtherTazConnector;
184 }
185
195 void buildTimeLines(const std::string& measure, const bool boundariesOverride);
196
197 void cacheParamRestrictions(const std::vector<std::string>& restrictionKeys);
199
200
201
203
204
210 return myFunction;
211 }
212
213
217 inline bool isSink() const {
218 return myAmSink;
219 }
220
221
225 double getLength() const {
226 return myLength;
227 }
228
232 int getNumericalID() const {
233 return myIndex;
234 }
235
236
240 double getSpeedLimit() const {
241 return mySpeed;
242 }
243
245 // sufficient for the astar air-distance heuristic
246 double getLengthGeometryFactor() const;
247
251 int getNumLanes() const {
252 return (int) myLanes.size();
253 }
254
255
262 bool isConnectedTo(const ROEdge& e, const SUMOVehicleClass vClass, bool ignoreTransientPermissions = false) const;
263
264
269 inline bool prohibits(const ROVehicle* const vehicle, bool checkRestrictions = false) const {
270 const SUMOVehicleClass vclass = vehicle->getVClass();
271 return (myCombinedPermissions & vclass) != vclass || (checkRestrictions && restricts(vehicle));
272 }
273
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
344 const ROConstEdgePairVector& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING, bool ignoreTransientPermissions = false) const;
345
348 myClassesSuccessorMap.clear();
350 }
351
359 int getNumPredecessors() const;
360
361
367 return myApproachingEdges;
368 }
369
371 const ROEdge* getNormalBefore() const;
372
374 const ROEdge* getNormalAfter() const;
375
383 double getEffort(const ROVehicle* const veh, double time) const;
384
385
391 bool hasLoadedTravelTime(double time) const;
392
393
400 double getTravelTime(const ROVehicle* const veh, double time) const;
401
402
411 static inline double getEffortStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
412 return edge->getEffort(veh, time);
413 }
414
415
423 static inline double getTravelTimeStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
424 return edge->getTravelTime(veh, time) * getRoutingFactor(edge, veh);
425 }
426
427 static inline double getTravelTimeStaticRandomized(const ROEdge* const edge, const ROVehicle* const veh, double time) {
428 return edge->getTravelTime(veh, time)
430 * getRoutingFactor(edge, veh);
431 }
432
434 static inline double getTravelTimeAggregated(const ROEdge* const edge, const ROVehicle* const veh, double time) {
435 return edge->getTravelTime(veh, time) * getRoutingFactor(edge, veh);
436 }
437
439 static inline double getTravelTimeStaticPriorityFactor(const ROEdge* const edge, const ROVehicle* const veh, double time) {
440 double result = edge->getTravelTime(veh, time);
441 // lower priority should result in higher effort (and the edge with
442 // minimum priority receives a factor of myPriorityFactor
443 const double relativeInversePrio = 1 - ((edge->getPriority() - myMinEdgePriority) / myEdgePriorityRange);
444 result *= 1 + relativeInversePrio * myPriorityFactor;
445 return result * getRoutingFactor(edge, veh);
446 }
447
448 static inline double getRoutingFactor(const ROEdge* const edge, const ROVehicle* const veh) {
449 return gRoutingPreferences ? 1 / edge->getPreference(veh->getVTypeParameter()) : 1;
450 }
451
452
458 inline double getMinimumTravelTime(const ROVehicle* const veh) const {
459 if (isTazConnector()) {
460 return 0;
461 } else if (veh != 0) {
462 return myLength / getMaxSpeed(veh);
463 } else {
464 return myLength / mySpeed;
465 }
466 }
467
468 inline double getMaxSpeed(const RORoutable* const veh) const {
469 return MIN2(veh->getMaxSpeed(), veh->getChosenSpeedFactor() * getVClassMaxSpeed(veh->getVClass()));
470 }
471
476 inline double getVClassMaxSpeed(SUMOVehicleClass vclass) const {
477 if (mySpeedRestrictions != 0) {
478 std::map<SUMOVehicleClass, double>::const_iterator r = mySpeedRestrictions->find(vclass);
479 if (r != mySpeedRestrictions->end()) {
480 return r->second;
481 }
482 }
483 return mySpeed;
484 }
485
486 template<PollutantsInterface::EmissionType ET>
487 static double getEmissionEffort(const ROEdge* const edge, const ROVehicle* const veh, double time) {
488 double ret = 0;
489 if (!edge->getStoredEffort(time, ret)) {
490 const SUMOVTypeParameter* const type = veh->getType();
491 const double vMax = edge->getMaxSpeed(veh);
493 ret = PollutantsInterface::computeDefault(type->emissionClass, ET, vMax, accel, 0, edge->getTravelTime(veh, time), nullptr); // @todo: give correct slope
494 }
495 return ret;
496 }
497
498
499 static double getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, double time);
500
501 static double getStoredEffort(const ROEdge* const edge, const ROVehicle* const /*veh*/, double time) {
502 double ret = 0;
503 edge->getStoredEffort(time, ret);
504 return ret;
505 }
507
508
510 double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate = false) const;
511
512
514 static const ROEdgeVector& getAllEdges();
515
516 static void setGlobalOptions(const bool interpolate) {
517 myInterpolate = interpolate;
518 }
519
521 myHaveTTWarned = true;
522 }
523
525 static const Position getStopPosition(const SUMOVehicleParameter::Stop& stop);
526
528 inline double getPreference(const SUMOVTypeParameter& pars) const {
530 }
531
533 int getPriority() const {
534 return myPriority;
535 }
536
538 const std::string& getType() const {
539 return myType;
540 }
541
542 const std::string& getRoutingType() const {
543 return myRoutingType.empty() ? myType : myRoutingType;
544 }
545
546 const RONode* getFromJunction() const {
547 return myFromJunction;
548 }
549
550 const RONode* getToJunction() const {
551 return myToJunction;
552 }
553
558 const std::vector<ROLane*>& getLanes() const {
559 return myLanes;
560 }
561
563 inline const ROEdge* getBidiEdge() const {
564 return myBidiEdge;
565 }
566
568 inline void setBidiEdge(const ROEdge* bidiEdge) {
569 myBidiEdge = bidiEdge;
570 }
571
578
580 // @note If not called before, the flipped routing edge is created
587
594
596 bool hasStoredEffort() const {
597 return myUsingETimeLine;
598 }
599
601 static bool initPriorityFactor(double priorityFactor);
602
603protected:
610 bool getStoredEffort(double time, double& ret) const;
611
612protected:
616
618 const int myIndex;
619
621 const int myPriority;
622
624 const std::string myType;
625
627 const std::string myRoutingType;
628
630 double mySpeed;
631
633 double myLength;
634
641
646
648 static bool myInterpolate;
649
651 static bool myHaveEWarned;
653 static bool myHaveTTWarned;
654
657
659
662
665
667 const std::map<SUMOVehicleClass, double>* mySpeedRestrictions;
668
670 std::vector<ROLane*> myLanes;
671
674
677
680
683
686
688 std::vector<double> myParamRestrictions;
689
691
693 static double myPriorityFactor;
695 static double myMinEdgePriority;
697 static double myEdgePriorityRange;
698
700 mutable std::map<SUMOVehicleClass, ROEdgeVector> myClassesSuccessorMap;
701
703 mutable std::map<SUMOVehicleClass, ROConstEdgePairVector> myClassesViaSuccessorMap;
704
710
711#ifdef HAVE_FOX
713 mutable FXMutex myLock;
714#endif
715
716private:
718 ROEdge(const ROEdge& src);
719
721 ROEdge& operator=(const ROEdge& src);
722
723};
std::vector< ROEdge * > ROEdgeVector
std::vector< std::pair< const ROEdge *, const ROEdge * > > ROConstEdgePairVector
Definition ROEdge.h:58
std::vector< const ROEdge * > ConstROEdgeVector
Definition ROEdge.h:57
std::vector< ROEdge * > ROEdgeVector
Definition ROEdge.h:56
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
bool gRoutingPreferences
Definition StdDefs.cpp:37
double gWeightsRandomFactor
Definition StdDefs.cpp:35
T MIN2(T a, T b)
Definition StdDefs.h:80
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
The edge type representing backward edges with flipped nodes.
Definition FlippedEdge.h:43
Base class for objects which have an id.
Definition Named.h:54
An upper class for objects with additional parameters.
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:73
void resetSuccessors()
reset after lane permissions changes
Definition ROEdge.h:347
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
Definition ROEdge.cpp:364
static double myPriorityFactor
Coefficient for factoring edge priority into routing weight.
Definition ROEdge.h:693
RailEdge< ROEdge, ROVehicle > * getRailwayRoutingEdge() const
Definition ROEdge.h:588
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition ROEdge.h:476
double getPreference(const SUMOVTypeParameter &pars) const
return loaded edge preference based on routingType
Definition ROEdge.h:528
bool hasStoredEffort() const
whether effort data was loaded for this edge
Definition ROEdge.h:596
const ROEdge * getBidiEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition ROEdge.h:563
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition ROEdge.h:232
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
Definition ROEdge.cpp:292
double getDistanceTo(const ROEdge *other, const bool doBoundaryEstimate=false) const
optimistic distance heuristic for use in routing
Definition ROEdge.cpp:188
void setFunction(SumoXMLEdgeFunc func)
Sets the function of the edge.
Definition ROEdge.h:118
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself
Definition ROEdge.cpp:304
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
Definition ROEdge.cpp:164
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
Definition ROEdge.cpp:208
static double getStoredEffort(const ROEdge *const edge, const ROVehicle *const, double time)
Definition ROEdge.h:501
ReversedEdge< ROEdge, ROVehicle > * myReversedRoutingEdge
a reversed version for backward routing
Definition ROEdge.h:706
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:315
int getNumLanes() const
Returns the number of lanes this edge has.
Definition ROEdge.h:251
std::vector< ROLane * > myLanes
This edge's lanes.
Definition ROEdge.h:670
static bool initPriorityFactor(double priorityFactor)
initialize priority factor range
Definition ROEdge.cpp:469
int getPriority() const
get edge priority (road class)
Definition ROEdge.h:533
static ROEdgeVector myEdges
Definition ROEdge.h:690
bool myAmSource
Definition ROEdge.h:636
RailEdge< ROEdge, ROVehicle > * myRailwayRoutingEdge
Definition ROEdge.h:709
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:439
const RONode * getToJunction() const
Definition ROEdge.h:550
const int myIndex
The index (numeric id) of the edge.
Definition ROEdge.h:618
SumoXMLEdgeFunc myFunction
The function of the edge.
Definition ROEdge.h:664
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:640
void setSource(const bool isSource=true)
Sets whether the edge is a source.
Definition ROEdge.h:126
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition ROEdge.h:700
bool isNormal() const
return whether this edge is a normal edge
Definition ROEdge.h:155
bool isTazConnector() const
Definition ROEdge.h:174
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
Definition ROEdge.h:703
void setBidiEdge(const ROEdge *bidiEdge)
set opposite superposable/congruent edge
Definition ROEdge.h:568
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
Definition ROEdge.h:688
const ROEdge * getOtherTazConnector() const
Definition ROEdge.h:182
void setSpeedRestrictions(const std::map< SUMOVehicleClass, double > *restrictions)
Sets the vehicle class specific speed limits of the edge.
Definition ROEdge.h:142
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:645
const RONode * getFromJunction() const
Definition ROEdge.h:546
double getSpeedLimit() const
Returns the speed allowed on this edge.
Definition ROEdge.h:240
const ROEdge * myOtherTazConnector
the other taz-connector if this edge isTazConnector, otherwise nullptr
Definition ROEdge.h:676
bool isSink() const
Returns whether the edge acts as a sink.
Definition ROEdge.h:217
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
Definition ROEdge.cpp:120
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
Definition ROEdge.h:643
bool isInternal() const
return whether this edge is an internal edge
Definition ROEdge.h:160
const std::string myType
the type of this edge
Definition ROEdge.h:624
virtual ~ROEdge()
Destructor.
Definition ROEdge.cpp:109
void setSink(const bool isSink=true)
Sets whether the edge is a sink.
Definition ROEdge.h:134
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:434
ROEdge(const ROEdge &src)
Invalidated copy constructor.
static double getEmissionEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.h:487
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Definition ROEdge.cpp:274
double getTimePenalty() const
Definition ROEdge.h:150
const ROEdge * myBidiEdge
the bidirectional rail edge or nullpr
Definition ROEdge.h:679
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
Definition ROEdge.h:682
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.cpp:239
bool prohibits(const ROVehicle *const vehicle, bool checkRestrictions=false) const
Returns whether this edge prohibits the given vehicle to pass it.
Definition ROEdge.h:269
bool isConnectedTo(const ROEdge &e, const SUMOVehicleClass vClass, bool ignoreTransientPermissions=false) const
returns the information whether this edge is directly connected to the given
Definition ROEdge.cpp:461
RONode * myFromJunction
the junctions for this edge
Definition ROEdge.h:614
const std::string & getRoutingType() const
Definition ROEdge.h:542
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Definition ROEdge.h:648
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
Returns the following edges including vias, restricted by vClass.
Definition ROEdge.cpp:425
ROEdge & operator=(const ROEdge &src)
Invalidated assignment operator.
const ROEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of incoming edges.
Definition ROEdge.h:366
static void disableTimelineWarning()
Definition ROEdge.h:520
SumoXMLEdgeFunc getFunction() const
Returns the function of the edge.
Definition ROEdge.h:209
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
Definition ROEdge.cpp:214
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:458
double myLength
The length of the edge.
Definition ROEdge.h:633
const std::map< SUMOVehicleClass, double > * mySpeedRestrictions
The vClass speed restrictions for this edge.
Definition ROEdge.h:667
bool myAmSink
whether the edge is a source or a sink
Definition ROEdge.h:636
SVCPermissions getPermissions() const
Definition ROEdge.h:274
void setOtherTazConnector(const ROEdge *edge)
Definition ROEdge.h:178
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
Definition ROEdge.cpp:389
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
Definition ROEdge.cpp:171
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
Definition ROEdge.cpp:349
int getNumPredecessors() const
Returns the number of edges connected to this edge.
Definition ROEdge.cpp:283
static double getTravelTimeStaticRandomized(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.h:427
static double myEdgePriorityRange
the difference between maximum and minimum priority for all edges
Definition ROEdge.h:697
double myTimePenalty
flat penalty when computing traveltime
Definition ROEdge.h:685
const std::string myRoutingType
the routing type of the edge (used to look up vType and vClass specific routing preferences)
Definition ROEdge.h:627
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
Definition ROEdge.h:673
FlippedEdge< ROEdge, RONode, ROVehicle > * getFlippedRoutingEdge() const
Returns the flipped routing edge.
Definition ROEdge.h:581
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Definition ROEdge.cpp:381
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
Definition ROEdge.h:653
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
Definition ROEdge.cpp:178
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
Definition ROEdge.h:558
static double getEffortStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the effort for the given edge.
Definition ROEdge.h:411
bool isWalkingArea() const
return whether this edge is walking area
Definition ROEdge.h:170
double getLengthGeometryFactor() const
return a lower bound on shape.length() / myLength that is
Definition ROEdge.cpp:358
double getLength() const
Returns the length of the edge.
Definition ROEdge.h:225
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
Definition ROEdge.h:656
double getMaxSpeed(const RORoutable *const veh) const
Definition ROEdge.h:468
FlippedEdge< ROEdge, RONode, ROVehicle > * myFlippedRoutingEdge
An extended version of the reversed edge for backward routing (used for the arc flag router)
Definition ROEdge.h:708
ROConstEdgePairVector myFollowingViaEdges
Definition ROEdge.h:658
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Definition ROEdge.h:638
const std::string & getType() const
get edge type
Definition ROEdge.h:538
static void setGlobalOptions(const bool interpolate)
Definition ROEdge.h:516
static double getRoutingFactor(const ROEdge *const edge, const ROVehicle *const veh)
Definition ROEdge.h:448
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition ROEdge.h:165
static double getTravelTimeStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition ROEdge.h:423
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition ROEdge.cpp:135
const int myPriority
The edge priority (road class)
Definition ROEdge.h:621
static double myMinEdgePriority
Minimum priority for all edges.
Definition ROEdge.h:695
static bool myHaveEWarned
Information whether the edge has reported missing weights.
Definition ROEdge.h:651
ReversedEdge< ROEdge, ROVehicle > * getReversedRoutingEdge() const
Definition ROEdge.h:572
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
Definition ROEdge.cpp:375
RONode * myToJunction
Definition ROEdge.h:615
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
Definition ROEdge.h:661
double mySpeed
The maximum speed allowed on this edge.
Definition ROEdge.h:630
void setTimePenalty(double value)
Definition ROEdge.h:146
A single lane the router may use.
Definition ROLane.h:48
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
Definition RONet.cpp:56
double getPreference(const std::string &routingType, const SUMOVTypeParameter &pars) const
retriefe edge type specific routing preference
Definition RONet.cpp:154
Base class for nodes used by the router.
Definition RONode.h:46
A routable thing such as a vehicle or person.
Definition RORoutable.h:53
SUMOVehicleClass getVClass() const
Definition RORoutable.h:124
long long int getRandomSeed() const
return vehicle-specific random number
Definition RORoutable.h:100
const SUMOVTypeParameter * getType() const
Returns the type of the routable.
Definition RORoutable.h:86
double getChosenSpeedFactor() const
Returns an upper bound for the speed factor of this vehicle.
Definition RORoutable.h:107
double getMaxSpeed() const
Returns the vehicle's maximum speed.
Definition RORoutable.h:136
A vehicle as used by router.
Definition ROVehicle.h:50
const SUMOVTypeParameter & getVTypeParameter() const
Returns the vehicle's type definition.
Definition ROVehicle.h:114
the edge type representing backward edges
Definition RailEdge.h:38
static double randHash(long long int x)
return a value scrambled value from [0, 1]
Definition RandHelper.h:269
the edge type representing backward edges
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 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)