71 myUsingTTTimeLine(false),
72 myUsingETimeLine(false),
73 myCombinedPermissions(0) {
74 while ((
int)
myEdges.size() <= index) {
78 if (from == 0 && to == 0) {
86 for (std::vector<ROLane*>::iterator i =
myLanes.begin(); i !=
myLanes.end(); ++i) {
96 const double speed = lane->
getSpeed();
179 const double inTT = lineTT;
188 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / max speed.");
213 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / edge's speed.");
253 const ROEdge* result =
this;
264 const ROEdge* result =
this;
278 if (measure ==
"CO") {
281 if (measure ==
"CO2") {
284 if (measure ==
"HC") {
287 if (measure ==
"PMx") {
290 if (measure ==
"NOx") {
293 if (measure ==
"fuel") {
296 if (measure ==
"electricity") {
310 if (!(*i)->prohibits(vehicle)) {
330 FXMutexLock locker(myLock);
338 std::set<ROEdge*> followers;
339 for (std::vector<ROLane*>::const_iterator it =
myLanes.begin(); it !=
myLanes.end(); ++it) {
343 for (std::vector<const ROLane*>::const_iterator it2 = outgoing.begin(); it2 != outgoing.end(); ++it2) {
344 const ROLane* next = *it2;
346 followers.insert(&next->
getEdge());
353 if ((*it)->isTazConnector()) {
354 followers.insert(*it);
358 followers.begin(), followers.end());
369 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.
double myLength
The length of the edge.
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
A single lane the router may use.
double mySpeed
The maximum speed allowed on this edge.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
SVCPermissions getPermissions() const
Returns the list of allowed vehicle classes.
double getLength() const
Returns the length of the lane.
static bool myInterpolate
Information whether to interpolate at interval boundaries.
Boundary myTazBoundary
The bounding rectangle of incoming or outgoing edges for taz connectors.
std::vector< double > & getParameter()
Returns the parameters of this distribution.
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
double getSpeed() const
Returns the maximum speed allowed on this lane.
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
bool isTazConnector() const
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
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. ...
const SVCPermissions SVCAll
all VClasses are allowed
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
void add(double begin, double end, T value)
Adds a value for a time interval into the container.
#define WRITE_WARNING(msg)
T getValue(double time) const
Returns the value for the given time.
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.
A vehicle as used by router.
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 getStoredEffort(double time, double &ret) const
Retrieves the stored effort.
bool isInternal() const
return whether this edge is an internal edge
double maxSpeed
The vehicle type's maximum speed [m/s].
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const SUMOVTypeParameter * getType() const
Returns the type of the routable.
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
static bool myHaveEWarned
Information whether the edge has reported missing weights.
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
double getSplitTime(double low, double high) const
Returns the time point at which the value changes.
std::vector< ROEdge * > ROEdgeVector
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
bool myAmSink
whether the edge is a source or a sink
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
std::vector< ROLane * > myLanes
This edge's lanes.
double getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
const std::vector< const ROLane * > & getOutgoingLanes() const
get the list of outgoing lanes
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
virtual ~ROEdge()
Destructor.
A basic edge for routing applications.
Base class for objects which have an id.
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
double getDistanceTo(const ROEdge *other) const
optimistic distance heuristic for use in routing
const RONode * getFromJunction() const
std::string myID
The name of the object.
static double compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fue...
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
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.
double distanceTo2D(const Position &p) const
returns the euclidean distance in the x-y-plane
int getNumPredecessors() const
Returns the number of edges connected to this edge.
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
const ROEdgeVector & getSuccessors() const
Returns the following edges.
bool describesTime(double time) const
Returns whether a value for the given time is known.
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself ...
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself ...
Base class for nodes used by the router.
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
SUMOVehicleClass getVClass() const
const Position & getPosition() const
Returns the position of the node.
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street...
SUMOEmissionClass emissionClass
The emission class of this vehicle.
vehicles ignoring classes