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-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/****************************************************************************/
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>
40#ifdef HAVE_FOX
42#endif
44#include "RONode.h"
45#include "ROVehicle.h"
47
48
49// ===========================================================================
50// class declarations
51// ===========================================================================
52class ROLane;
53class ROEdge;
54
55typedef std::vector<ROEdge*> ROEdgeVector;
56typedef std::vector<const ROEdge*> ConstROEdgeVector;
57typedef std::vector<std::pair<const ROEdge*, const ROEdge*> > ROConstEdgePairVector;
58
59
60// ===========================================================================
61// class definitions
62// ===========================================================================
72class ROEdge : public Named, public Parameterised {
73public:
81 ROEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority);
82
84 ROEdge(const std::string& id, const RONode* from, const RONode* to, SVCPermissions p);
85
86
88 virtual ~ROEdge();
89
90
92
93
102 virtual void addLane(ROLane* lane);
103
104
111 virtual void addSuccessor(ROEdge* s, ROEdge* via = nullptr, std::string dir = "");
112
113
117 inline void setFunction(SumoXMLEdgeFunc func) {
118 myFunction = func;
119 }
120
121
125 inline void setSource(const bool isSource = true) {
126 myAmSource = isSource;
127 }
128
129
133 inline void setSink(const bool isSink = true) {
135 }
136
137
141 inline void setRestrictions(const std::map<SUMOVehicleClass, double>* restrictions) {
142 myRestrictions = restrictions;
143 }
144
145 inline void setTimePenalty(double value) {
146 myTimePenalty = value;
147 }
148
149 inline double getTimePenalty() const {
150 return myTimePenalty;
151 }
152
154 inline bool isNormal() const {
156 }
157
159 inline bool isInternal() const {
161 }
162
164 inline bool isCrossing() const {
166 }
167
169 inline bool isWalkingArea() const {
171 }
172
173 inline bool isTazConnector() const {
175 }
176
177 void setOtherTazConnector(const ROEdge* edge) {
178 myOtherTazConnector = edge;
179 }
180
182 return myOtherTazConnector;
183 }
184
194 void buildTimeLines(const std::string& measure, const bool boundariesOverride);
195
196 void cacheParamRestrictions(const std::vector<std::string>& restrictionKeys);
198
199
200
202
203
209 return myFunction;
210 }
211
212
216 inline bool isSink() const {
217 return myAmSink;
218 }
219
220
224 double getLength() const {
225 return myLength;
226 }
227
231 int getNumericalID() const {
232 return myIndex;
233 }
234
235
239 double getSpeedLimit() const {
240 return mySpeed;
241 }
242
244 // sufficient for the astar air-distance heuristic
245 double getLengthGeometryFactor() const;
246
251 inline double getVClassMaxSpeed(SUMOVehicleClass vclass) const {
252 if (myRestrictions != 0) {
253 std::map<SUMOVehicleClass, double>::const_iterator r = myRestrictions->find(vclass);
254 if (r != myRestrictions->end()) {
255 return r->second;
256 }
257 }
258 return mySpeed;
259 }
260
261
265 int getNumLanes() const {
266 return (int) myLanes.size();
267 }
268
269
276 bool isConnectedTo(const ROEdge& e, const SUMOVehicleClass vClass) const;
277
278
283 inline bool prohibits(const ROVehicle* const vehicle) const {
284 const SUMOVehicleClass vclass = vehicle->getVClass();
285 return (myCombinedPermissions & vclass) != vclass;
286 }
287
290 }
291
296 inline bool restricts(const ROVehicle* const vehicle) const {
297 const std::vector<double>& vTypeRestrictions = vehicle->getType()->paramRestrictions;
298 assert(vTypeRestrictions.size() == myParamRestrictions.size());
299 for (int i = 0; i < (int)vTypeRestrictions.size(); i++) {
300 if (vTypeRestrictions[i] > myParamRestrictions[i]) {
301 return true;
302 }
303 }
304 return false;
305 }
306
307
312 bool allFollowersProhibit(const ROVehicle* const vehicle) const;
314
315
316
318
319
326 void addEffort(double value, double timeBegin, double timeEnd);
327
328
335 void addTravelTime(double value, double timeBegin, double timeEnd);
336
337
345 int getNumSuccessors() const;
346
347
353
358 const ROConstEdgePairVector& getViaSuccessors(SUMOVehicleClass vClass = SVC_IGNORING, bool ignoreTransientPermissions = false) const;
359
360
368 int getNumPredecessors() const;
369
370
376 return myApproachingEdges;
377 }
378
380 const ROEdge* getNormalBefore() const;
381
383 const ROEdge* getNormalAfter() const;
384
392 double getEffort(const ROVehicle* const veh, double time) const;
393
394
400 bool hasLoadedTravelTime(double time) const;
401
402
409 double getTravelTime(const ROVehicle* const veh, double time) const;
410
411
420 static inline double getEffortStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
421 return edge->getEffort(veh, time);
422 }
423
424
432 static inline double getTravelTimeStatic(const ROEdge* const edge, const ROVehicle* const veh, double time) {
433 return edge->getTravelTime(veh, time);
434 }
435
436 static inline double getTravelTimeStaticRandomized(const ROEdge* const edge, const ROVehicle* const veh, double time) {
437 return edge->getTravelTime(veh, time) * RandHelper::rand(1., gWeightsRandomFactor);
438 }
439
441 static inline double getTravelTimeAggregated(const ROEdge* const edge, const ROVehicle* const veh, double time) {
442 return edge->getTravelTime(veh, time);
443 }
444
446 static inline double getTravelTimeStaticPriorityFactor(const ROEdge* const edge, const ROVehicle* const veh, double time) {
447 double result = edge->getTravelTime(veh, time);
448 // lower priority should result in higher effort (and the edge with
449 // minimum priority receives a factor of myPriorityFactor
450 const double relativeInversePrio = 1 - ((edge->getPriority() - myMinEdgePriority) / myEdgePriorityRange);
451 result *= 1 + relativeInversePrio * myPriorityFactor;
452 return result;
453 }
454
460 inline double getMinimumTravelTime(const ROVehicle* const veh) const {
461 if (isTazConnector()) {
462 return 0;
463 } else if (veh != 0) {
464 return myLength / MIN2(veh->getType()->maxSpeed, veh->getChosenSpeedFactor() * mySpeed);
465 } else {
466 return myLength / mySpeed;
467 }
468 }
469
470
471 template<PollutantsInterface::EmissionType ET>
472 static double getEmissionEffort(const ROEdge* const edge, const ROVehicle* const veh, double time) {
473 double ret = 0;
474 if (!edge->getStoredEffort(time, ret)) {
475 const SUMOVTypeParameter* const type = veh->getType();
476 const double vMax = MIN2(type->maxSpeed, edge->mySpeed);
478 ret = PollutantsInterface::computeDefault(type->emissionClass, ET, vMax, accel, 0, edge->getTravelTime(veh, time), nullptr); // @todo: give correct slope
479 }
480 return ret;
481 }
482
483
484 static double getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, double time);
485
486 static double getStoredEffort(const ROEdge* const edge, const ROVehicle* const /*veh*/, double time) {
487 double ret = 0;
488 edge->getStoredEffort(time, ret);
489 return ret;
490 }
492
493
495 double getDistanceTo(const ROEdge* other, const bool doBoundaryEstimate = false) const;
496
497
499 static const ROEdgeVector& getAllEdges();
500
501 static void setGlobalOptions(const bool interpolate) {
502 myInterpolate = interpolate;
503 }
504
506 myHaveTTWarned = true;
507 }
508
510 static const Position getStopPosition(const SUMOVehicleParameter::Stop& stop);
511
513 int getPriority() const {
514 return myPriority;
515 }
516
517 const RONode* getFromJunction() const {
518 return myFromJunction;
519 }
520
521 const RONode* getToJunction() const {
522 return myToJunction;
523 }
524
529 const std::vector<ROLane*>& getLanes() const {
530 return myLanes;
531 }
532
534 inline const ROEdge* getBidiEdge() const {
535 return myBidiEdge;
536 }
537
539 inline void setBidiEdge(const ROEdge* bidiEdge) {
540 myBidiEdge = bidiEdge;
541 }
542
549
551 // @note If not called before, the flipped routing edge is created
558
565
567 bool hasStoredEffort() const {
568 return myUsingETimeLine;
569 }
570
572 static bool initPriorityFactor(double priorityFactor);
573
574protected:
581 bool getStoredEffort(double time, double& ret) const;
582
583
584
585protected:
589
591 const int myIndex;
592
594 const int myPriority;
595
597 double mySpeed;
598
600 double myLength;
601
608
613
615 static bool myInterpolate;
616
618 static bool myHaveEWarned;
620 static bool myHaveTTWarned;
621
624
626
629
632
634 const std::map<SUMOVehicleClass, double>* myRestrictions;
635
637 std::vector<ROLane*> myLanes;
638
641
644
647
650
653
655 std::vector<double> myParamRestrictions;
656
658
660 static double myPriorityFactor;
662 static double myMinEdgePriority;
664 static double myEdgePriorityRange;
665
667 mutable std::map<SUMOVehicleClass, ROEdgeVector> myClassesSuccessorMap;
668
670 mutable std::map<SUMOVehicleClass, ROConstEdgePairVector> myClassesViaSuccessorMap;
671
677
678#ifdef HAVE_FOX
680 mutable FXMutex myLock;
681#endif
682
683private:
685 ROEdge(const ROEdge& src);
686
688 ROEdge& operator=(const ROEdge& src);
689
690};
std::vector< ROEdge * > ROEdgeVector
std::vector< std::pair< const ROEdge *, const ROEdge * > > ROConstEdgePairVector
Definition ROEdge.h:57
std::vector< const ROEdge * > ConstROEdgeVector
Definition ROEdge.h:56
std::vector< ROEdge * > ROEdgeVector
Definition ROEdge.h:55
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
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:72
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
Definition ROEdge.cpp:361
static double myPriorityFactor
Coefficient for factoring edge priority into routing weight.
Definition ROEdge.h:660
RailEdge< ROEdge, ROVehicle > * getRailwayRoutingEdge() const
Definition ROEdge.h:559
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
Definition ROEdge.h:251
bool hasStoredEffort() const
whether effort data was loaded for this edge
Definition ROEdge.h:567
const ROEdge * getBidiEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
Definition ROEdge.h:534
int getNumericalID() const
Returns the index (numeric id) of the edge.
Definition ROEdge.h:231
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
Definition ROEdge.cpp:289
double getDistanceTo(const ROEdge *other, const bool doBoundaryEstimate=false) const
optimistic distance heuristic for use in routing
Definition ROEdge.cpp:184
void setFunction(SumoXMLEdgeFunc func)
Sets the function of the edge.
Definition ROEdge.h:117
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself
Definition ROEdge.cpp:301
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
Definition ROEdge.cpp:160
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
Definition ROEdge.cpp:204
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:673
bool restricts(const ROVehicle *const vehicle) const
Returns whether this edge has restriction parameters forbidding the given vehicle to pass it.
Definition ROEdge.h:296
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
Definition ROEdge.cpp:312
int getNumLanes() const
Returns the number of lanes this edge has.
Definition ROEdge.h:265
std::vector< ROLane * > myLanes
This edge's lanes.
Definition ROEdge.h:637
void setRestrictions(const std::map< SUMOVehicleClass, double > *restrictions)
Sets the vehicle class specific speed limits of the edge.
Definition ROEdge.h:141
static bool initPriorityFactor(double priorityFactor)
initialize priority factor range
Definition ROEdge.cpp:464
int getPriority() const
get edge priority (road class)
Definition ROEdge.h:513
static ROEdgeVector myEdges
Definition ROEdge.h:657
bool myAmSource
Definition ROEdge.h:603
RailEdge< ROEdge, ROVehicle > * myRailwayRoutingEdge
Definition ROEdge.h:676
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:446
const RONode * getToJunction() const
Definition ROEdge.h:521
const int myIndex
The index (numeric id) of the edge.
Definition ROEdge.h:591
SumoXMLEdgeFunc myFunction
The function of the edge.
Definition ROEdge.h:631
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:607
void setSource(const bool isSource=true)
Sets whether the edge is a source.
Definition ROEdge.h:125
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
Definition ROEdge.h:667
bool isNormal() const
return whether this edge is a normal edge
Definition ROEdge.h:154
bool isTazConnector() const
Definition ROEdge.h:173
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
Definition ROEdge.h:670
void setBidiEdge(const ROEdge *bidiEdge)
set opposite superposable/congruent edge
Definition ROEdge.h:539
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
Definition ROEdge.h:655
const ROEdge * getOtherTazConnector() const
Definition ROEdge.h:181
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
Definition ROEdge.h:612
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
Definition ROEdge.h:283
const RONode * getFromJunction() const
Definition ROEdge.h:517
double getSpeedLimit() const
Returns the speed allowed on this edge.
Definition ROEdge.h:239
const ROEdge * myOtherTazConnector
the other taz-connector if this edge isTazConnector, otherwise nullptr
Definition ROEdge.h:643
bool isSink() const
Returns whether the edge acts as a sink.
Definition ROEdge.h:216
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
Definition ROEdge.cpp:116
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
Definition ROEdge.h:610
bool isInternal() const
return whether this edge is an internal edge
Definition ROEdge.h:159
virtual ~ROEdge()
Destructor.
Definition ROEdge.cpp:105
void setSink(const bool isSink=true)
Sets whether the edge is a sink.
Definition ROEdge.h:133
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:441
ROEdge(const ROEdge &src)
Invalidated copy constructor.
static double getEmissionEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.h:472
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Definition ROEdge.cpp:271
double getTimePenalty() const
Definition ROEdge.h:149
const ROEdge * myBidiEdge
the bidirectional rail edge or nullpr
Definition ROEdge.h:646
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
Definition ROEdge.h:649
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.cpp:235
RONode * myFromJunction
the junctions for this edge
Definition ROEdge.h:587
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Definition ROEdge.h:615
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
Returns the following edges including vias, restricted by vClass.
Definition ROEdge.cpp:422
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:375
static void disableTimelineWarning()
Definition ROEdge.h:505
SumoXMLEdgeFunc getFunction() const
Returns the function of the edge.
Definition ROEdge.h:208
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
Definition ROEdge.cpp:210
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:600
bool myAmSink
whether the edge is a source or a sink
Definition ROEdge.h:603
SVCPermissions getPermissions() const
Definition ROEdge.h:288
void setOtherTazConnector(const ROEdge *edge)
Definition ROEdge.h:177
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
Definition ROEdge.cpp:386
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
Definition ROEdge.cpp:167
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
Definition ROEdge.cpp:346
int getNumPredecessors() const
Returns the number of edges connected to this edge.
Definition ROEdge.cpp:280
static double getTravelTimeStaticRandomized(const ROEdge *const edge, const ROVehicle *const veh, double time)
Definition ROEdge.h:436
static double myEdgePriorityRange
the difference between maximum and minimum priority for all edges
Definition ROEdge.h:664
double myTimePenalty
flat penalty when computing traveltime
Definition ROEdge.h:652
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this edge.
Definition ROEdge.h:634
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
Definition ROEdge.h:640
FlippedEdge< ROEdge, RONode, ROVehicle > * getFlippedRoutingEdge() const
Returns the flipped routing edge.
Definition ROEdge.h:552
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Definition ROEdge.cpp:378
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
Definition ROEdge.h:620
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
Definition ROEdge.cpp:174
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
Definition ROEdge.h:529
static double getEffortStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the effort for the given edge.
Definition ROEdge.h:420
bool isWalkingArea() const
return whether this edge is walking area
Definition ROEdge.h:169
double getLengthGeometryFactor() const
return a lower bound on shape.length() / myLength that is
Definition ROEdge.cpp:355
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:623
FlippedEdge< ROEdge, RONode, ROVehicle > * myFlippedRoutingEdge
An extended version of the reversed edge for backward routing (used for the arc flag router)
Definition ROEdge.h:675
ROConstEdgePairVector myFollowingViaEdges
Definition ROEdge.h:625
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Definition ROEdge.h:605
static void setGlobalOptions(const bool interpolate)
Definition ROEdge.h:501
bool isCrossing() const
return whether this edge is a pedestrian crossing
Definition ROEdge.h:164
static double getTravelTimeStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the travel time for the given edge.
Definition ROEdge.h:432
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition ROEdge.cpp:131
const int myPriority
The edge priority (road class)
Definition ROEdge.h:594
static double myMinEdgePriority
Minimum priority for all edges.
Definition ROEdge.h:662
bool isConnectedTo(const ROEdge &e, const SUMOVehicleClass vClass) const
returns the information whether this edge is directly connected to the given
Definition ROEdge.cpp:458
static bool myHaveEWarned
Information whether the edge has reported missing weights.
Definition ROEdge.h:618
ReversedEdge< ROEdge, ROVehicle > * getReversedRoutingEdge() const
Definition ROEdge.h:543
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
Definition ROEdge.cpp:372
RONode * myToJunction
Definition ROEdge.h:588
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
Definition ROEdge.h:628
double mySpeed
The maximum speed allowed on this edge.
Definition ROEdge.h:597
void setTimePenalty(double value)
Definition ROEdge.h:145
A single lane the router may use.
Definition ROLane.h:48
Base class for nodes used by the router.
Definition RONode.h:46
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
the edge type representing backward edges
Definition RailEdge.h:38
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
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 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)