 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
81 ROEdge(
const std::string&
id,
RONode* from,
RONode* to,
int index,
const int priority);
174 void buildTimeLines(
const std::string& measure,
const bool boundariesOverride);
233 std::map<SUMOVehicleClass, double>::const_iterator r =
myRestrictions->find(vclass);
279 for (
int i = 0; i < (int)vTypeRestrictions.size(); i++) {
306 void addEffort(
double value,
double timeBegin,
double timeEnd);
315 void addTravelTime(
double value,
double timeBegin,
double timeEnd);
429 }
else if (veh != 0) {
437 template<PollutantsInterface::EmissionType ET>
581 mutable FXMutex myLock;
int getPriority() const
get edge priority (road class)
static const ROEdgeVector & getAllEdges()
Returns all ROEdges.
bool isInternal() const
return whether this edge is an internal edge
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
bool allFollowersProhibit(const ROVehicle *const vehicle) const
Returns whether this edge succeeding edges prohibit the given vehicle to pass them.
int getNumLanes() const
Returns the number of lanes this edge has.
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this edge.
ROEdgeVector myFollowingEdges
List of edges that may be approached from this edge.
bool isCrossing() const
return whether this edge is a pedestrian crossing
std::vector< ROLane * > myLanes
This edge's lanes.
double getTravelTime(const ROVehicle *const veh, double time) const
Returns the travel time for this edge.
An upper class for objects with additional parameters.
Base class for objects which have an id.
void setTimePenalty(double value)
bool restricts(const ROVehicle *const vehicle) const
Returns whether this edge has restriction parameters forbidding the given vehicle to pass it.
bool myUsingTTTimeLine
Information whether the time line shall be used instead of the length value.
static double getEffortStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the effort for the given edge.
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
ValueTimeLine< double > myEfforts
Container storing passing time varying over time for the edge.
static bool myHaveEWarned
Information whether the edge has reported missing weights.
static double getTravelTimeStatic(const ROEdge *const edge, const ROVehicle *const veh, double time)
Returns the travel time for the given edge.
std::map< SUMOVehicleClass, ROConstEdgePairVector > myClassesViaSuccessorMap
The successors with vias available for a given vClass.
ROConstEdgePairVector myFollowingViaEdges
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
A single lane the router may use.
ROEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
static int dictSize()
Returns the number of edges.
const SUMOVTypeParameter * getType() const
Returns the type of the routable.
A vehicle as used by router.
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
std::vector< std::pair< const ROEdge *, const ROEdge * > > ROConstEdgePairVector
const int myPriority
The edge priority (road class)
static double getDefaultImperfection(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle c...
double getChosenSpeedFactor() const
Returns an upper bound for the speed factor of this vehicle.
void setSource(const bool isSource=true)
Sets whether the edge is a source.
static double getNoiseEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
SumoXMLEdgeFunc myFunction
The function of the edge.
static void setGlobalOptions(const bool interpolate)
SUMOVehicleClass getVClass() const
double gWeightsRandomFactor
const ROConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges including vias, restricted by vClass.
double getEffort(const ROVehicle *const veh, double time) const
Returns the effort for this edge.
const ROEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of incoming edges.
static ROEdgeVector myEdges
SVCPermissions myCombinedPermissions
The list of allowed vehicle classes combined across lanes.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
double mySpeed
The maximum speed allowed on this edge.
void addTravelTime(double value, double timeBegin, double timeEnd)
Adds a travel time value.
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
const int myIndex
The index (numeric id) of the edge.
static double getTravelTimeStaticRandomized(const ROEdge *const edge, const ROVehicle *const veh, double time)
ROEdge & operator=(const ROEdge &src)
Invalidated assignment operator.
void addEffort(double value, double timeBegin, double timeEnd)
Adds a weight value.
Structure representing possible vehicle parameter.
static double getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
ValueTimeLine< double > myTravelTimes
Container storing passing time varying over time for the edge.
void setRestrictions(const std::map< SUMOVehicleClass, double > *restrictions)
Sets the vehicle class specific speed limits of the edge.
bool getStoredEffort(double time, double &ret) const
Retrieves the stored effort.
A class that stores a 2D geometrical boundary.
void setSink(const bool isSink=true)
Sets whether the edge is a sink.
std::vector< double > paramRestrictions
cached value of parameters which may restrict access to certain edges
double getLengthGeometryFactor() const
return a lower bound on shape.length() / myLength that is
std::vector< ROEdge * > ROEdgeVector
A point in 2D or 3D with translation and scaling methods.
double getCFParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
double maxSpeed
The vehicle type's maximum speed [m/s].
std::vector< ROEdge * > ROEdgeVector
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
bool isTazConnector() const
int getNumericalID() const
Returns the index (numeric id) of the edge.
SumoXMLEdgeFunc getFunction() const
Returns the function of the edge.
void buildTimeLines(const std::string &measure, const bool boundariesOverride)
Builds the internal representation of the travel time/effort.
static bool myInterpolate
Information whether to interpolate at interval boundaries.
bool isSink() const
Returns whether the edge acts as a sink.
static double computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const double tt, const std::map< int, double > *param=0)
Returns the amount of emitted pollutant given the vehicle type and default values for the state (in m...
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
ROEdgeVector myApproachingEdges
List of edges that approached this edge.
const RONode * getFromJunction() const
std::vector< double > myParamRestrictions
cached value of parameters which may restrict access
bool prohibits(const ROVehicle *const vehicle) const
Returns whether this edge prohibits the given vehicle to pass it.
double myLength
The length of the edge.
double getVClassMaxSpeed(SUMOVehicleClass vclass) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
double getLength() const
Returns the length of the edge.
int getNumPredecessors() const
Returns the number of edges connected to this edge.
virtual ~ROEdge()
Destructor.
static double getEmissionEffort(const ROEdge *const edge, const ROVehicle *const veh, double time)
std::map< SUMOVehicleClass, ROEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
bool hasLoadedTravelTime(double time) const
Returns whether a travel time for this edge was loaded.
SVCPermissions getPermissions() const
A basic edge for routing applications.
bool isWalkingArea() const
return whether this edge is walking area
static bool myHaveTTWarned
Information whether the edge has reported missing weights.
const ROEdge * getNormalAfter() const
if this edge is an internal edge, return its first normal successor, otherwise the edge itself
double getMinimumTravelTime(const ROVehicle *const veh) const
Returns a lower bound for the travel time on this edge without using any stored timeLine.
double getSpeedLimit() const
Returns the speed allowed on 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
SUMOEmissionClass emissionClass
The emission class of this vehicle.
vehicles ignoring classes
Base class for nodes used by the router.
void setFunction(SumoXMLEdgeFunc func)
Sets the function of the edge.
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
SUMOVehicleClass vehicleClass
The vehicle's class.
double getDistanceTo(const ROEdge *other, const bool doBoundaryEstimate=false) const
optimistic distance heuristic for use in routing
double myTimePenalty
flat penalty when computing traveltime
bool myUsingETimeLine
Information whether the time line shall be used instead of the length value.
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
RONode * myFromJunction
the junctions for this edge
std::vector< const ROEdge * > ConstROEdgeVector
Definition of vehicle stop (position and duration)
bool myAmSink
whether the edge is a source or a sink
const RONode * getToJunction() const