49 #ifdef CHECK_MEMORY_LEAKS 51 #endif // CHECK_MEMORY_LEAKS 74 myUsingTTTimeLine(false),
75 myUsingETimeLine(false),
76 myCombinedPermissions(0) {
77 while (
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.
ROEdge & getEdge() const
Returns the lane's edge.
A single lane the router may use.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
unsigned int getNumSuccessors() const
Returns the number of edges this edge is connected to.
SUMOReal getDistanceTo(const ROEdge *other) const
optimistic distance heuristic for use in routing
SVCPermissions getPermissions() const
Returns the list of allowed vehicle classes.
SUMOReal getSplitTime(SUMOReal low, SUMOReal high) const
Returns the time point at which the value changes.
static SUMOReal getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, SUMOReal time)
static bool myInterpolate
Information whether to interpolate at interval boundaries.
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.
EdgeFunc getFunc() const
Returns the function of the edge.
void add(SUMOReal begin, SUMOReal end, T value)
Adds a value for a time interval into the container.
const SVCPermissions SVCAll
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)
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.
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. ...
bool hasLoadedTravelTime(SUMOReal time) const
Returns whether a travel time for this edge was loaded.
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...
const RONode * getToJunction() const
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding 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.
const SUMOVTypeParameter * getType() const
Returns the type of the vehicle.
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.
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
bool isConnectedTo(const ROEdge *const e, const ROVehicle *const vehicle) const
returns the information whether this edge is directly connected to the given
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 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)
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.
const std::vector< const ROLane * > & getOutgoingLanes() const
get the list of outgoing lanes
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].
const RONode * getFromJunction() const
std::string myID
The name of the object.
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.
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
SUMOReal getEffort(const ROVehicle *const veh, SUMOReal time) const
Returns the effort for this edge.
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
const ROEdgeVector & getSuccessors() const
Returns the following edges.
SUMOReal getLength() const
Returns the length of the lane.
unsigned int getNumPredecessors() const
Returns the number of edges connected to this edge.
bool getStoredEffort(SUMOReal time, SUMOReal &ret) const
Retrieves the stored effort.
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
Base class for nodes used by the router.
SUMOReal getTravelTime(const ROVehicle *const veh, SUMOReal time) const
Returns the travel time for this edge.
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
SUMOReal getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
An edge representing a whole district.
SUMOVehicleClass getVClass() const
const Position & getPosition() const
Returns the position of the node.
EdgeFunc myFunc
The function of the edge.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
vehicles ignoring classes