Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ROEdge.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2002-2025 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#include <config.h>
27
30#include <algorithm>
31#include <cassert>
32#include <iostream>
36#include "ROLane.h"
37#include "RONet.h"
38#include "ROVehicle.h"
39#include "ROEdge.h"
40
41
42// ===========================================================================
43// static member definitions
44// ===========================================================================
45bool ROEdge::myInterpolate = false;
46bool ROEdge::myHaveTTWarned = false;
47bool ROEdge::myHaveEWarned = false;
50double ROEdge::myMinEdgePriority(std::numeric_limits<double>::max());
52
53
54// ===========================================================================
55// method definitions
56// ===========================================================================
57ROEdge::ROEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority, const std::string& type) :
58 Named(id),
59 myFromJunction(from),
60 myToJunction(to),
61 myIndex(index),
62 myPriority(priority),
63 myType(type),
64 mySpeed(-1),
65 myLength(0),
66 myAmSink(false),
67 myAmSource(false),
68 myUsingTTTimeLine(false),
69 myUsingETimeLine(false),
70 myRestrictions(nullptr),
71 myCombinedPermissions(0),
72 myOtherTazConnector(nullptr),
73 myTimePenalty(0) {
74 while ((int)myEdges.size() <= index) {
75 myEdges.push_back(0);
76 }
77 myEdges[index] = this;
78 if (from == nullptr && to == nullptr) {
79 // TAZ edge, no lanes
81 } else {
82 // TODO we should not calculate the boundary here, the position for the nodes is not valid yet
83 myBoundary.add(from->getPosition());
85 }
86}
87
88
89ROEdge::ROEdge(const std::string& id, const RONode* from, const RONode* to, SVCPermissions p) :
90 Named(id),
91 myFromJunction(const_cast<RONode*>(from)),
92 myToJunction(const_cast<RONode*>(to)),
93 myIndex(-1),
94 myPriority(0),
95 myType(""),
96 mySpeed(std::numeric_limits<double>::max()),
97 myLength(0),
98 myAmSink(false),
99 myAmSource(false),
100 myUsingTTTimeLine(false),
101 myUsingETimeLine(false),
102 myCombinedPermissions(p),
103 myOtherTazConnector(nullptr),
104 myTimePenalty(0)
105{ }
106
107
109 for (ROLane* const lane : myLanes) {
110 delete lane;
111 }
115}
116
117
118void
120 const double speed = lane->getSpeed();
121 if (speed > mySpeed) {
122 mySpeed = speed;
123 myLength = lane->getLength();
124 }
125 mySpeed = speed > mySpeed ? speed : mySpeed;
126 myLanes.push_back(lane);
127
128 // integrate new allowed classes
130}
131
132
133void
134ROEdge::addSuccessor(ROEdge* s, ROEdge* via, std::string) {
135 if (isInternal()) {
136 // for internal edges after an internal junction,
137 // this is called twice and only the second call counts
138 myFollowingEdges.clear();
139 myFollowingViaEdges.clear();
140 }
141 if (find(myFollowingEdges.begin(), myFollowingEdges.end(), s) == myFollowingEdges.end()) {
142 myFollowingEdges.push_back(s);
143 myFollowingViaEdges.push_back(std::make_pair(s, via));
144 if (isTazConnector() && s->getFromJunction() != nullptr) {
146 }
147 if (!isInternal()) {
148 s->myApproachingEdges.push_back(this);
149 if (s->isTazConnector() && getToJunction() != nullptr) {
150 s->myBoundary.add(getToJunction()->getPosition());
151 }
152 }
153 if (via != nullptr) {
154 if (via->myApproachingEdges.size() == 0) {
155 via->myApproachingEdges.push_back(this);
156 }
157 }
158 }
159}
160
161
162void
163ROEdge::addEffort(double value, double timeBegin, double timeEnd) {
164 myEfforts.add(timeBegin, timeEnd, value);
165 myUsingETimeLine = true;
166}
167
168
169void
170ROEdge::addTravelTime(double value, double timeBegin, double timeEnd) {
171 myTravelTimes.add(timeBegin, timeEnd, value);
172 myUsingTTTimeLine = true;
173}
174
175
176double
177ROEdge::getEffort(const ROVehicle* const veh, double time) const {
178 double ret = 0;
179 if (!getStoredEffort(time, ret)) {
181 }
182 return ret;
183}
184
185
186double
187ROEdge::getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate) const {
188 assert(this != other);
189 if (doBoundaryEstimate) {
190 return myBoundary.distanceTo2D(other->myBoundary);
191 }
192 if (isTazConnector()) {
193 if (other->isTazConnector()) {
194 return myBoundary.distanceTo2D(other->myBoundary);
195 }
197 }
198 if (other->isTazConnector()) {
199 return other->myBoundary.distanceTo2D(getToJunction()->getPosition());
200 }
201 return getLanes()[0]->getShape()[-1].distanceTo2D(other->getLanes()[0]->getShape()[0]);
202 //return getToJunction()->getPosition().distanceTo2D(other->getFromJunction()->getPosition());
203}
204
205
206bool
207ROEdge::hasLoadedTravelTime(double time) const {
209}
210
211
212double
213ROEdge::getTravelTime(const ROVehicle* const veh, double time) const {
214 if (myUsingTTTimeLine) {
215 if (myTravelTimes.describesTime(time)) {
216 double lineTT = myTravelTimes.getValue(time);
217 if (myInterpolate) {
218 const double inTT = lineTT;
219 const double split = (double)(myTravelTimes.getSplitTime(time, time + inTT) - time);
220 if (split >= 0) {
221 lineTT = myTravelTimes.getValue(time + inTT) * ((double)1. - split / inTT) + split;
222 }
223 }
224 return MAX2(getMinimumTravelTime(veh), lineTT);
225 } else {
226 if (!myHaveTTWarned) {
227 WRITE_WARNINGF(TL("No interval matches passed time=% in edge '%'.\n Using edge's length / max speed."), time, myID);
228 myHaveTTWarned = true;
229 }
230 }
231 }
232 const double speed = veh != nullptr ? MIN2(veh->getMaxSpeed(), veh->getType()->speedFactor.getParameter()[0] * getVClassMaxSpeed(veh->getVClass())) : mySpeed;
233 return myLength / speed + myTimePenalty;
234}
235
236
237double
238ROEdge::getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, double time) {
239 double ret = 0;
240 if (!edge->getStoredEffort(time, ret)) {
241 const double v = MIN2(veh->getMaxSpeed(), edge->getVClassMaxSpeed(veh->getVClass()));
243 }
244 return ret;
245}
246
247
248bool
249ROEdge::getStoredEffort(double time, double& ret) const {
250 if (myUsingETimeLine) {
251 if (!myEfforts.describesTime(time)) {
252 if (!myHaveEWarned) {
253 WRITE_WARNINGF(TL("No interval matches passed time=% in edge '%'.\n Using edge's length / edge's speed."), time, myID);
254 myHaveEWarned = true;
255 }
256 return false;
257 }
258 if (myInterpolate) {
259 const double inTT = myTravelTimes.getValue(time);
260 const double ratio = (myEfforts.getSplitTime(time, time + inTT) - time) / inTT;
261 if (ratio >= 0.) {
262 ret = ratio * myEfforts.getValue(time) + (1. - ratio) * myEfforts.getValue(time + inTT);
263 return true;
264 }
265 }
266 ret = myEfforts.getValue(time);
267 return true;
268 }
269 return false;
270}
271
272
273int
275 if (myAmSink) {
276 return 0;
277 }
278 return (int) myFollowingEdges.size();
279}
280
281
282int
284 if (myAmSource) {
285 return 0;
286 }
287 return (int) myApproachingEdges.size();
288}
289
290
291const ROEdge*
293 const ROEdge* result = this;
294 while (result->isInternal()) {
295 assert(myApproachingEdges.size() == 1);
296 result = result->myApproachingEdges.front();
297 }
298 return result;
299}
300
301
302
303const ROEdge*
305 const ROEdge* result = this;
306 while (result->isInternal()) {
307 assert(myFollowingEdges.size() == 1);
308 result = result->myFollowingEdges.front();
309 }
310 return result;
311}
312
313
314void
315ROEdge::buildTimeLines(const std::string& measure, const bool boundariesOverride) {
316 if (myUsingETimeLine) {
317 double value = myLength / mySpeed;
318 const SUMOEmissionClass c = PollutantsInterface::getClassByName("HBEFA4/default");
319 if (measure == "CO") {
320 value = PollutantsInterface::compute(c, PollutantsInterface::CO, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
321 }
322 if (measure == "CO2") {
323 value = PollutantsInterface::compute(c, PollutantsInterface::CO2, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
324 }
325 if (measure == "HC") {
326 value = PollutantsInterface::compute(c, PollutantsInterface::HC, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
327 }
328 if (measure == "PMx") {
329 value = PollutantsInterface::compute(c, PollutantsInterface::PM_X, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
330 }
331 if (measure == "NOx") {
332 value = PollutantsInterface::compute(c, PollutantsInterface::NO_X, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
333 }
334 if (measure == "fuel") {
335 value = PollutantsInterface::compute(c, PollutantsInterface::FUEL, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
336 }
337 if (measure == "electricity") {
338 value = PollutantsInterface::compute(c, PollutantsInterface::ELEC, mySpeed, 0, 0, nullptr) * value; // @todo: give correct slope
339 }
340 myEfforts.fillGaps(value, boundariesOverride);
341 }
342 if (myUsingTTTimeLine) {
343 myTravelTimes.fillGaps(myLength / mySpeed + myTimePenalty, boundariesOverride);
344 }
345}
346
347
348void
349ROEdge::cacheParamRestrictions(const std::vector<std::string>& restrictionKeys) {
350 for (const std::string& key : restrictionKeys) {
351 const std::string value = getParameter(key, "1e40");
353 }
354}
355
356
357double
359 return myLanes.empty() ? 1. : myLanes[0]->getShape().length() / myLanes[0]->getLength();
360}
361
362
363bool
364ROEdge::allFollowersProhibit(const ROVehicle* const vehicle) const {
365 for (ROEdgeVector::const_iterator i = myFollowingEdges.begin(); i != myFollowingEdges.end(); ++i) {
366 if (!(*i)->prohibits(vehicle)) {
367 return false;
368 }
369 }
370 return true;
371}
372
373
374const ROEdgeVector&
376 return myEdges;
377}
378
379
380const Position
382 const double middle = (stop.endPos + stop.startPos) / 2.;
384 return (edge->getFromJunction()->getPosition() + edge->getToJunction()->getPosition()) * (middle / edge->getLength());
385}
386
387
388const ROEdgeVector&
390 if (vClass == SVC_IGNORING || !RONet::getInstance()->hasPermissions() || isTazConnector()) {
391 return myFollowingEdges;
392 }
393#ifdef HAVE_FOX
394 FXMutexLock locker(myLock);
395#endif
396 std::map<SUMOVehicleClass, ROEdgeVector>::const_iterator i = myClassesSuccessorMap.find(vClass);
397 if (i != myClassesSuccessorMap.end()) {
398 // can use cached value
399 return i->second;
400 }
401 // this vClass is requested for the first time. rebuild all successors
402 std::set<ROEdge*> followers;
403 for (const ROLane* const lane : myLanes) {
404 if ((lane->getPermissions() & vClass) != 0) {
405 for (const auto& next : lane->getOutgoingViaLanes()) {
406 if ((next.first->getPermissions() & vClass) != 0 && (next.second == nullptr || (next.second->getPermissions() & vClass) != 0)) {
407 followers.insert(&next.first->getEdge());
408 }
409 }
410 }
411 }
412 // also add district edges (they are not connected at the lane level
413 for (ROEdgeVector::const_iterator it = myFollowingEdges.begin(); it != myFollowingEdges.end(); ++it) {
414 if ((*it)->isTazConnector()) {
415 followers.insert(*it);
416 }
417 }
418 myClassesSuccessorMap[vClass].insert(myClassesSuccessorMap[vClass].begin(),
419 followers.begin(), followers.end());
420 return myClassesSuccessorMap[vClass];
421}
422
423
425ROEdge::getViaSuccessors(SUMOVehicleClass vClass, bool /*ignoreTransientPermissions*/) const {
426 if (vClass == SVC_IGNORING || !RONet::getInstance()->hasPermissions() || isTazConnector()) {
427 return myFollowingViaEdges;
428 }
429#ifdef HAVE_FOX
430 FXMutexLock locker(myLock);
431#endif
432 std::map<SUMOVehicleClass, ROConstEdgePairVector>::const_iterator i = myClassesViaSuccessorMap.find(vClass);
433 if (i != myClassesViaSuccessorMap.end()) {
434 // can use cached value
435 return i->second;
436 }
437 // this vClass is requested for the first time. rebuild all successors
438 std::set<std::pair<const ROEdge*, const ROEdge*> > followers;
439 for (const ROLane* const lane : myLanes) {
440 if ((lane->getPermissions() & vClass) != 0) {
441 for (const auto& next : lane->getOutgoingViaLanes()) {
442 if ((next.first->getPermissions() & vClass) != 0 && (next.second == nullptr || (next.second->getPermissions() & vClass) != 0)) {
443 followers.insert(std::make_pair(&next.first->getEdge(), next.second));
444 }
445 }
446 }
447 }
448 // also add district edges (they are not connected at the lane level
449 for (const ROEdge* e : myFollowingEdges) {
450 if (e->isTazConnector()) {
451 followers.insert(std::make_pair(e, e));
452 }
453 }
454 myClassesViaSuccessorMap[vClass].insert(myClassesViaSuccessorMap[vClass].begin(),
455 followers.begin(), followers.end());
456 return myClassesViaSuccessorMap[vClass];
457}
458
459
460bool
461ROEdge::isConnectedTo(const ROEdge& e, const SUMOVehicleClass vClass) const {
462 const ROEdgeVector& followers = getSuccessors(vClass);
463 return std::find(followers.begin(), followers.end(), &e) != followers.end();
464}
465
466bool
467ROEdge::initPriorityFactor(double priorityFactor) {
468 myPriorityFactor = priorityFactor;
469 double maxEdgePriority = -std::numeric_limits<double>::max();
470 for (ROEdge* edge : myEdges) {
471 maxEdgePriority = MAX2(maxEdgePriority, (double)edge->getPriority());
472 myMinEdgePriority = MIN2(myMinEdgePriority, (double)edge->getPriority());
473 }
474 myEdgePriorityRange = maxEdgePriority - myMinEdgePriority;
475 if (myEdgePriorityRange == 0) {
476 WRITE_WARNING(TL("Option weights.priority-factor does not take effect because all edges have the same priority."));
478 return false;
479 }
480 return true;
481}
482
483
484/****************************************************************************/
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
#define WRITE_WARNINGF(...)
Definition MsgHandler.h:288
#define WRITE_WARNING(msg)
Definition MsgHandler.h:287
#define TL(string)
Definition MsgHandler.h:305
std::vector< ROEdge * > ROEdgeVector
std::vector< std::pair< const ROEdge *, const ROEdge * > > ROConstEdgePairVector
Definition ROEdge.h:57
std::vector< ROEdge * > ROEdgeVector
Definition ROEdge.h:55
const SVCPermissions SVCAll
all VClasses are allowed
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
int SUMOEmissionClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
T MIN2(T a, T b)
Definition StdDefs.h:76
T MAX2(T a, T b)
Definition StdDefs.h:82
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition Boundary.cpp:75
double distanceTo2D(const Position &p) const
returns the euclidean distance in the x-y-plane
Definition Boundary.cpp:262
std::vector< double > & getParameter()
Returns the parameters of this distribution.
static double computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed.
Base class for objects which have an id.
Definition Named.h:54
std::string myID
The name of the object.
Definition Named.h:125
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
static double compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const EnergyParams *param)
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fue...
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A basic edge for routing applications.
Definition ROEdge.h:72
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:668
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition ROEdge.h:251
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:187
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:163
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
Definition ROEdge.cpp:207
static double getStoredEffort(const ROEdge *const edge, const ROVehicle *const, double time)
Definition ROEdge.h:486
ReversedEdge< ROEdge, ROVehicle > * myReversedRoutingEdge
a reversed version for backward routing
Definition ROEdge.h:681
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
Definition ROEdge.cpp:315
std::vector< ROLane * > myLanes
This edge's lanes.
Definition ROEdge.h:645
static bool initPriorityFactor(double priorityFactor)
initialize priority factor range
Definition ROEdge.cpp:467
ROEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority, const std::string &type)
Constructor.
Definition ROEdge.cpp:57
static ROEdgeVector myEdges
Definition ROEdge.h:665
bool myAmSource
Definition ROEdge.h:611
RailEdge< ROEdge, ROVehicle > * myRailwayRoutingEdge
Definition ROEdge.h:684
const RONode * getToJunction() const
Definition ROEdge.h:526
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:615
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition ROEdge.h:675
bool isTazConnector() const
Definition ROEdge.h:173
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
Definition ROEdge.h:678
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
Definition ROEdge.h:663
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:620
const RONode * getFromJunction() const
Definition ROEdge.h:522
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
Definition ROEdge.cpp:119
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
Definition ROEdge.h:618
bool isInternal() const
return whether this edge is an internal edge
Definition ROEdge.h:159
virtual ~ROEdge()
Destructor.
Definition ROEdge.cpp:108
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Definition ROEdge.cpp:274
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
Definition ROEdge.h:657
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.cpp:238
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Definition ROEdge.h:623
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
Returns the following edges including vias, restricted by vClass.
Definition ROEdge.cpp:425
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
Definition ROEdge.cpp:213
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:460
double myLength
The length of the edge.
Definition ROEdge.h:608
bool myAmSink
whether the edge is a source or a sink
Definition ROEdge.h:611
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:170
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 myEdgePriorityRange
the difference between maximum and minimum priority for all edges
Definition ROEdge.h:672
double myTimePenalty
flat penalty when computing traveltime
Definition ROEdge.h:660
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
Definition ROEdge.h:648
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:628
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
Definition ROEdge.cpp:177
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
Definition ROEdge.h:534
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:224
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
Definition ROEdge.h:631
FlippedEdge< ROEdge, RONode, ROVehicle > * myFlippedRoutingEdge
An extended version of the reversed edge for backward routing (used for the arc flag router)
Definition ROEdge.h:683
ROConstEdgePairVector myFollowingViaEdges
Definition ROEdge.h:633
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Definition ROEdge.h:613
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition ROEdge.cpp:134
static double myMinEdgePriority
Minimum priority for all edges.
Definition ROEdge.h:670
bool isConnectedTo(const ROEdge &e, const SUMOVehicleClass vClass) const
returns the information whether this edge is directly connected to the given
Definition ROEdge.cpp:461
static bool myHaveEWarned
Information whether the edge has reported missing weights.
Definition ROEdge.h:626
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
Definition ROEdge.cpp:375
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
Definition ROEdge.h:636
double mySpeed
The maximum speed allowed on this edge.
Definition ROEdge.h:605
A single lane the router may use.
Definition ROLane.h:48
double getLength() const
Returns the length of the lane.
Definition ROLane.h:70
SVCPermissions getPermissions() const
Returns the list of allowed vehicle classes.
Definition ROLane.h:86
double getSpeed() const
Returns the maximum speed allowed on this lane.
Definition ROLane.h:78
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
Definition RONet.cpp:56
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
Definition RONet.h:161
Base class for nodes used by the router.
Definition RONode.h:46
const Position & getPosition() const
Returns the position of the node.
Definition RONode.h:67
SUMOVehicleClass getVClass() const
Definition RORoutable.h:109
const SUMOVTypeParameter * getType() const
Returns the type of the routable.
Definition RORoutable.h:82
double getMaxSpeed() const
Returns the vehicle's maximum speed.
Definition RORoutable.h:121
A vehicle as used by router.
Definition ROVehicle.h:50
SUMOEmissionClass emissionClass
The emission class of this vehicle.
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
Definition of vehicle stop (position and duration)
std::string lane
The lane to stop at.
double startPos
The stopping position start.
double endPos
The stopping position end.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
double getSplitTime(double low, double high) const
Returns the time point at which the value changes.
bool describesTime(double time) const
Returns whether a value for the given time is known.
T getValue(double time) const
Returns the value for the given time.
void fillGaps(T value, bool extendOverBoundaries=false)
Sets a default value for all unset intervals.
void add(double begin, double end, T value)
Adds a value for a time interval into the container.
Definition json.hpp:4471