48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
68 :
Named(id), myFromNode(from), myToNode(to), myIndex(index), myPriority(priority),
69 mySpeed(-1), myLength(0),
70 myUsingTTTimeLine(false),
71 myUsingETimeLine(false),
72 myCombinedPermissions(0),
75 while (
myEdges.size() <= index) {
83 for (std::vector<ROLane*>::iterator i =
myLanes.begin(); i !=
myLanes.end(); ++i) {
161 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / max speed.");
264 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / edge's speed.");
313 if (measure ==
"CO") {
316 if (measure ==
"CO2") {
319 if (measure ==
"HC") {
322 if (measure ==
"PMx") {
325 if (measure ==
"NOx") {
328 if (measure ==
"fuel") {
342 if (!(*i)->prohibits(vehicle)) {
void fillGaps(T value, bool extendOverBoundaries=false)
Sets a default value for all unset intervals.
RONode * getToNode() const
Returns the node this edge ends at.
SUMOReal get(const SumoXMLAttr attr, const SUMOReal defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
EdgeType getType() const
Returns the type of the edge.
static bool myUseBoundariesOnOverrideTT
Whether overriding weight boundaries shall be reported.
A single lane the router may use.
SUMOReal getDistanceTo(const ROEdge *other) const
optimistic distance heuristic for use in routing
static std::vector< ROEdge * > myEdges
SUMOReal getSplitTime(SUMOReal low, SUMOReal high) const
Returns the time point at which the value changes.
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Structure representing possible vehicle parameter.
EdgeType
Possible types of edges.
static ROEdge * dictionary(size_t index)
Returns the ROEdge at the index.
ValueTimeLine< SUMOReal > myTravelTimes
Container storing passing time varying over time for the edge.
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
SUMOVehicleClass vehicleClass
The vehicle's class.
SUMOReal getPMxEffort(const ROVehicle *const veh, SUMOReal time) const
const SUMOVTypeParameter * getType() const
Returns the type of the vehicle.
const Position & getPosition()
Returns the position of the node.
SUMOReal getCO2Effort(const ROVehicle *const veh, SUMOReal time) const
std::vector< ROEdge * > myApproachingEdges
List of edges that approached this edge.
void add(SUMOReal begin, SUMOReal end, T value)
Adds a value for a time interval into the container.
static bool myUseBoundariesOnOverrideE
Whether overriding weight boundaries shall be reported.
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
SUMOReal getSpeed() const
Returns the maximum speed allowed on this lane.
void addTravelTime(SUMOReal value, SUMOReal timeBegin, SUMOReal timeEnd)
Adds a travel time value.
#define WRITE_WARNING(msg)
RONode * getFromNode() const
Returns the node this edge starts at.
static SUMOReal computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed. ...
static SUMOReal getDefaultImperfection(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle c...
An edge where vehicles are inserted at (no vehicle may come from back)
A vehicle as used by router.
SUMOReal speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street...
void setType(EdgeType type)
Sets the type of te edge.
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeding edges prohibit the given vehicle to pass them.
bool describesTime(SUMOReal time) const
Returns whether a value for the given time is known.
ValueTimeLine< SUMOReal > myEfforts
Container storing passing time varying over time for the edge.
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
static bool myHaveEWarned
Information whether the edge has reported missing weights.
SUMOReal myLength
The length of the edge.
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
static SUMOReal computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const SUMOReal tt)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
SUMOReal getHCEffort(const ROVehicle *const veh, SUMOReal time) const
SUMOReal getNOxEffort(const ROVehicle *const veh, SUMOReal time) const
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
T getValue(SUMOReal time) const
Returns the value for the given time.
std::vector< ROLane * > myLanes
This edge's lanes.
ROEdge(const std::string &id, RONode *from, RONode *to, unsigned int index, const int priority)
Constructor.
virtual ~ROEdge()
Destructor.
A basic edge for routing applications.
Base class for objects which have an id.
SUMOReal mySpeed
The maximum speed allowed on this edge.
SUMOReal maxSpeed
The vehicle type's maximum speed [m/s].
std::vector< ROEdge * > myFollowingEdges
List of edges that may be approached from this edge.
unsigned int getNoFollowing() const
Returns the number of edges this edge is connected to.
std::string myID
The name of the object.
void addEffort(SUMOReal value, SUMOReal timeBegin, SUMOReal timeEnd)
Adds a weight value.
static SUMOReal compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope)
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.
SUMOReal getFuelEffort(const ROVehicle *const veh, SUMOReal time) const
unsigned int getNumApproaching() const
Returns the number of edges this edge is connected to.
SUMOReal getEffort(const ROVehicle *const veh, SUMOReal time) const
Returns the effort for this edge.
void buildTimeLines(const std::string &measure)
Builds the internal representation of the travel time/effort.
SUMOReal getLength() const
Returns the length of the lane.
bool getStoredEffort(SUMOReal time, SUMOReal &ret) const
Retrieves the stored effort.
SUMOReal getNoiseEffort(const ROVehicle *const veh, SUMOReal time) const
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
SUMOReal getCOEffort(const ROVehicle *const veh, SUMOReal time) const
static SUMOReal getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
Base class for nodes used by the router.
SUMOReal getTravelTime(const ROVehicle *const veh, SUMOReal time) const
Returns the travel time for this edge.
An edge where vehicles disappear (no vehicle may leave this edge)
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
virtual void addFollower(ROEdge *s, std::string dir="")
Adds information about a connected edge.
SUMOReal getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
EdgeType myType
The type of the edge.
SVCPermissions getPermissions()
Returns the list of allowed vehicle classes.
SUMOEmissionClass emissionClass
The emission class of this vehicle.