70 myUsingTTTimeLine(false),
71 myUsingETimeLine(false),
72 myCombinedPermissions(0) {
73 while ((
int)
myEdges.size() <= index) {
77 if (from == 0 && to == 0) {
85 for (std::vector<ROLane*>::iterator i =
myLanes.begin(); i !=
myLanes.end(); ++i) {
95 const double speed = lane->
getSpeed();
160 const double inTT = lineTT;
169 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / max speed.");
194 WRITE_WARNING(
"No interval matches passed time " +
toString(time) +
" in edge '" +
myID +
"'.\n Using edge's length / edge's speed.");
237 if (measure ==
"CO") {
240 if (measure ==
"CO2") {
243 if (measure ==
"HC") {
246 if (measure ==
"PMx") {
249 if (measure ==
"NOx") {
252 if (measure ==
"fuel") {
255 if (measure ==
"electricity") {
269 if (!(*i)->prohibits(vehicle)) {
289 FXMutexLock locker(myLock);
297 std::set<ROEdge*> followers;
298 for (std::vector<ROLane*>::const_iterator it =
myLanes.begin(); it !=
myLanes.end(); ++it) {
302 for (std::vector<const ROLane*>::const_iterator it2 = outgoing.begin(); it2 != outgoing.end(); ++it2) {
303 const ROLane* next = *it2;
305 followers.insert(&next->
getEdge());
313 followers.insert(*it);
317 followers.begin(), followers.end());
328 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.
double getSplitTime(double low, double high) const
Returns the time point at which the value changes.
double myLength
The length of the edge.
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
A single lane the router may use.
double mySpeed
The maximum speed allowed on this edge.
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...
double getLength() const
Returns the length of the lane.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
static bool myInterpolate
Information whether to interpolate at interval boundaries.
std::vector< double > & getParameter()
Returns the parameters of this distribution.
const RONode * getFromJunction() const
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
bool describesTime(double time) const
Returns whether a value for the given time is known.
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort 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 std::vector< const ROLane * > & getOutgoingLanes() const
get the list of outgoing lanes
const SVCPermissions SVCAll
all VClasses are allowed
const RONode * getToJunction() const
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
ROEdge & getEdge() const
Returns the lane's edge.
void add(double begin, double end, T value)
Adds a value for a time interval into the container.
#define WRITE_WARNING(msg)
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
double getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
int getNumPredecessors() const
Returns the number of edges connected to this edge.
double getDistanceTo(const ROEdge *other) const
optimistic distance heuristic for use in routing
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
A vehicle as used by router.
double maxSpeed
The vehicle type's maximum speed [m/s].
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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.
T getValue(double time) const
Returns the value for the given time.
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.
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
std::vector< ROEdge * > ROEdgeVector
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
bool getStoredEffort(double time, double &ret) const
Retrieves the stored effort.
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::vector< ROLane * > myLanes
This edge's 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.
double getSpeed() const
Returns the maximum speed allowed on this lane.
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...
const SUMOVTypeParameter * getType() const
Returns the type of the vehicle.
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.
bool isConnectedTo(const ROEdge *const e, const ROVehicle *const vehicle) const
returns the information whether this edge is directly connected to the given
const ROEdgeVector & getSuccessors() const
Returns the following edges.
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
Base class for nodes used by the router.
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
An edge representing a whole district.
EdgeFunc myFunc
The function of the edge.
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