49 #ifdef CHECK_MEMORY_LEAKS 51 #endif // CHECK_MEMORY_LEAKS 74 myUsingTTTimeLine(false),
75 myUsingETimeLine(false),
76 myCombinedPermissions(0) {
77 while ((
int)
myEdges.size() <= index) {
81 if (from == 0 && to == 0) {
89 for (std::vector<ROLane*>::iterator i =
myLanes.begin(); i !=
myLanes.end(); ++i) {
173 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / max speed.");
198 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / edge's speed.");
241 if (measure ==
"CO") {
244 if (measure ==
"CO2") {
247 if (measure ==
"HC") {
250 if (measure ==
"PMx") {
253 if (measure ==
"NOx") {
256 if (measure ==
"fuel") {
259 if (measure ==
"electricity") {
273 if (!(*i)->prohibits(vehicle)) {
293 FXMutexLock locker(myLock);
301 std::set<ROEdge*> followers;
302 for (std::vector<ROLane*>::const_iterator it =
myLanes.begin(); it !=
myLanes.end(); ++it) {
306 for (std::vector<const ROLane*>::const_iterator it2 = outgoing.begin(); it2 != outgoing.end(); ++it2) {
307 const ROLane* next = *it2;
309 followers.insert(&next->
getEdge());
317 followers.insert(*it);
321 followers.begin(), followers.end());
332 return std::find(followers.begin(), followers.end(), e) != followers.end();
void fillGaps(T value, bool extendOverBoundaries=false)
Sets a default value for all unset intervals.
static ROEdgeVector myEdges
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
SUMOVehicleClass getVClass() const
const Position & getPosition() const
Returns the position of the node.
A single lane the router may use.
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static SUMOReal getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, SUMOReal time)
static bool myInterpolate
Information whether to interpolate at interval boundaries.
SUMOReal getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
const RONode * getFromJunction() const
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.
bool describesTime(SUMOReal time) const
Returns whether a value for the given time is known.
SUMOReal getDistanceTo(const ROEdge *other) const
optimistic distance heuristic for use in routing
void add(SUMOReal begin, SUMOReal end, T value)
Adds a value for a time interval into the container.
const std::vector< const ROLane * > & getOutgoingLanes() const
get the list of outgoing lanes
const SVCPermissions SVCAll
const RONode * getToJunction() const
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
ROEdge & getEdge() const
Returns the lane's edge.
void addTravelTime(SUMOReal value, SUMOReal timeBegin, SUMOReal timeEnd)
Adds a travel time value.
#define WRITE_WARNING(msg)
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
int getNumPredecessors() const
Returns the number of edges connected to this edge.
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
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. ...
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...
ValueTimeLine< SUMOReal > myEfforts
Container storing passing time varying over time for the edge.
An edge where vehicles disappear (no vehicle may leave this edge)
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
SUMOReal getTravelTime(const ROVehicle *const veh, SUMOReal time) const
Returns the travel time for this edge.
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
EdgeFunc getFunc() const
Returns the function of the edge.
An edge where vehicles are inserted at (no vehicle may come from back)
static bool myHaveEWarned
Information whether the edge has reported missing weights.
SUMOReal myLength
The length of the edge.
bool hasLoadedTravelTime(SUMOReal time) const
Returns whether a travel time for this edge was loaded.
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
std::vector< ROEdge * > ROEdgeVector
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
SVCPermissions getPermissions() const
Returns the list of allowed vehicle classes.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
std::vector< ROLane * > myLanes
This edge's lanes.
virtual ~ROEdge()
Destructor.
A basic edge for routing applications.
Base class for objects which have an id.
SUMOReal getLength() const
Returns the length of the lane.
SUMOReal mySpeed
The maximum speed allowed on this edge.
SUMOReal maxSpeed
The vehicle type's maximum speed [m/s].
std::string myID
The name of the object.
const SUMOVTypeParameter * getType() const
Returns the type of the vehicle.
void addEffort(SUMOReal value, SUMOReal timeBegin, SUMOReal timeEnd)
Adds a weight value.
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
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.
ROEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
bool isConnectedTo(const ROEdge *const e, const ROVehicle *const vehicle) const
returns the information whether this edge is directly connected to the given
SUMOReal getSpeed() const
Returns the maximum speed allowed on this lane.
const ROEdgeVector & getSuccessors() const
Returns the following edges.
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
SUMOReal getEffort(const ROVehicle *const veh, SUMOReal time) const
Returns the effort for this edge.
Base class for nodes used by the router.
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
bool getStoredEffort(SUMOReal time, SUMOReal &ret) const
Retrieves the stored effort.
An edge representing a whole district.
SUMOReal getSplitTime(SUMOReal low, SUMOReal high) const
Returns the time point at which the value changes.
EdgeFunc myFunc
The function of the edge.
T getValue(SUMOReal time) const
Returns the value for the given time.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
vehicles ignoring classes