SUMO - Simulation of Urban MObility
MSEdge Class Reference

A road/street connecting two junctions. More...

#include <MSEdge.h>

Inheritance diagram for MSEdge:
Inheritance graph
Collaboration diagram for MSEdge:
Collaboration graph

Data Structures

class  by_id_sorter
 Sorts edges by their ids. More...
 
class  transportable_by_position_sorter
 Sorts transportables by their positions. More...
 

Public Types

typedef std::map< const MSEdge *, std::vector< MSLane * > *> AllowedLanesCont
 Suceeding edges (keys) and allowed lanes to reach these edges (values). More...
 
typedef std::map< SUMOVehicleClass, AllowedLanesContClassedAllowedLanesCont
 Map from vehicle types to lanes that may be used to reach one of the next edges. More...
 

Public Member Functions

virtual void addContainer (MSTransportable *container) const
 Add a container to myContainers. More...
 
virtual void addPerson (MSTransportable *p) const
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
bool allowsLaneChanging ()
 
void buildLaneChanger ()
 Has to be called after all sucessors and predecessors have been set (after closeBuilding()) More...
 
bool canChangeToOpposite ()
 whether this edge allows changing to the opposite direction edge More...
 
virtual void changeLanes (SUMOTime t)
 Performs lane changing on this edge. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
void closeBuilding ()
 
const std::vector< std::string > & getCrossingEdges () const
 Gets the crossed edge ids. More...
 
double getCurrentTravelTime (const double minSpeed=NUMERICAL_EPS) const
 Computes and returns the current travel time for this edge. More...
 
double getDistanceTo (const MSEdge *other) const
 optimistic air distance heuristic for use in routing More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
const std::string & getID () const
 Returns the id. More...
 
const MSEdgegetInternalFollowingEdge (const MSEdge *followerAfterInternal) const
 
double getInternalFollowingLengthTo (const MSEdge *followerAfterInternal) const
 returns the length of all internal edges on the junction until reaching the non-internal edge followerAfterInternal. More...
 
double getLength () const
 return the length of the edge More...
 
double getLengthGeometryFactor () const
 return shape.length() / myLength More...
 
const std::map< std::string, std::string > & getMap () const
 Returns the inner key/value map. More...
 
double getMeanSpeed () const
 get the mean speed More...
 
double getMinimumTravelTime (const SUMOVehicle *const veh) const
 returns the minimum travel time for the given vehicle More...
 
const MSEdgegetNormalBefore () const
 if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
SVCPermissions getPermissions () const
 
double getRoutingSpeed () const
 Returns the averaged speed used by the routing device. More...
 
double getSpeedLimit () const
 Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be the fastest edge. More...
 
const std::vector< double > getSubLaneSides () const
 Returns the right side offsets of this edge's sublanes. More...
 
double getVehicleMaxSpeed (const SUMOVehicle *const veh) const
 Returns the maximum speed the vehicle may use on this edge. More...
 
double getWidth () const
 Returns the edges's width (sum over all lanes) More...
 
bool hasLaneChanger () const
 
bool hasMinorLink () const
 whether any lane has a minor link More...
 
void initialize (const std::vector< MSLane *> *lanes)
 Initialize the edge. More...
 
bool isFringe () const
 return whether this edge is at the fringe of the network More...
 
bool isRoundabout () const
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
virtual void lock () const
 grant exclusive access to the mesoscopic state More...
 
void markAsRoundabout ()
 
void markDelayed () const
 
 MSEdge (const std::string &id, int numericalID, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority)
 Constructor. More...
 
bool prohibits (const SUMOVehicle *const vehicle) const
 Returns whether the vehicle (class) is not allowed on the edge. More...
 
void rebuildAllowedLanes ()
 
void recalcCache ()
 Recalculates the cached values. More...
 
virtual void removeContainer (MSTransportable *container) const
 Remove container from myContainers. More...
 
virtual void removePerson (MSTransportable *p) const
 
void setCrossingEdges (const std::vector< std::string > &crossingEdges)
 Sets the crossed edge ids for a crossing edge. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setMaxSpeed (double val) const
 Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator) More...
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
virtual void unlock () const
 release exclusive access to the mesoscopic state More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void writeParams (OutputDevice &out) const
 
virtual ~MSEdge ()
 Destructor. More...
 
Access to the edge's lanes
MSLaneleftLane (const MSLane *const lane) const
 Returns the lane left to the one given, 0 if the given lane is leftmost. More...
 
MSLanerightLane (const MSLane *const lane) const
 Returns the lane right to the one given, 0 if the given lane is rightmost. More...
 
MSLaneparallelLane (const MSLane *const lane, int offset) const
 Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist. More...
 
const std::vector< MSLane * > & getLanes () const
 Returns this edge's lanes. More...
 
const std::set< MSTransportable * > & getPersons () const
 Returns this edge's persons set. More...
 
std::vector< MSTransportable * > getSortedPersons (SUMOTime timestep, bool includeRiding=false) const
 Returns this edge's persons sorted by pos. More...
 
std::vector< MSTransportable * > getSortedContainers (SUMOTime timestep, bool includeRiding=false) const
 Returns this edge's containers sorted by pos. More...
 
const std::vector< MSLane * > * allowedLanes (const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes to reach the destination-edge. More...
 
const std::vector< MSLane * > * allowedLanes (SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes for the given vehicle class. More...
 
Access to other edge attributes
SumoXMLEdgeFunc getFunction () const
 Returns the edge type (SumoXMLEdgeFunc) More...
 
bool isInternal () const
 return whether this edge is an internal edge More...
 
bool isCrossing () const
 return whether this edge is a pedestrian crossing More...
 
void checkAndRegisterBiDirEdge ()
 check and register the opposite superposable edge if any More...
 
const MSEdgegetMyOppositeSuperposableEdge () const
 return opposite superposable/congruent edge, if it exist and 0 else More...
 
bool isWalkingArea () const
 return whether this edge is walking area More...
 
bool isTazConnector () const
 
int getNumericalID () const
 Returns the numerical id of the edge. More...
 
const std::string & getStreetName () const
 Returns the street name of the edge. More...
 
const std::string & getEdgeType () const
 Returns the type of the edge. More...
 
int getPriority () const
 Returns the priority of the edge. More...
 
Access to succeeding/predecessing edges
void addSuccessor (MSEdge *edge)
 Adds an edge to the list of edges which may be reached from this edge and to the incoming of the other edge. More...
 
int getNumSuccessors () const
 Returns the number of edges that may be reached from this edge. More...
 
const MSEdgeVectorgetSuccessors () const
 Returns the following edges. More...
 
const MSEdgeVectorgetSuccessors (SUMOVehicleClass vClass) const
 Returns the following edges, restricted by vClass. More...
 
int getNumPredecessors () const
 Returns the number of edges this edge is connected to. More...
 
const MSEdgeVectorgetPredecessors () const
 
const MSJunctiongetFromJunction () const
 
const MSJunctiongetToJunction () const
 
void setJunctions (MSJunction *from, MSJunction *to)
 
Access to vaporizing interface
bool isVaporizing () const
 Returns whether vehicles on this edge shall be vaporized. More...
 
SUMOTime incVaporization (SUMOTime t)
 Enables vaporization. More...
 
SUMOTime decVaporization (SUMOTime t)
 Disables vaporization. More...
 
Methods releated to vehicle insertion
bool insertVehicle (SUMOVehicle &v, SUMOTime time, const bool checkOnly=false, const bool forceCheck=false) const
 Tries to insert the given vehicle into the network. More...
 
MSLanegetFreeLane (const std::vector< MSLane *> *allowed, const SUMOVehicleClass vclass, double departPos) const
 Finds the emptiest lane allowing the vehicle class. More...
 
MSLanegetDepartLane (MSVehicle &veh) const
 Finds a depart lane for the given vehicle parameters. More...
 
SUMOTime getLastFailedInsertionTime () const
 Returns the last time a vehicle could not be inserted. More...
 
void setLastFailedInsertionTime (SUMOTime time) const
 Sets the last time a vehicle could not be inserted. More...
 

Static Public Member Functions

static void clear ()
 Clears the dictionary. More...
 
static bool dictionary (const std::string &id, MSEdge *edge)
 Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false. More...
 
static MSEdgedictionary (const std::string &id)
 Returns the MSEdge associated to the key id if exists, otherwise returns 0. More...
 
static int dictSize ()
 Returns the number of edges. More...
 
static const MSEdgeVectorgetAllEdges ()
 Returns all edges with a numerical id. More...
 
template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 
static double getTravelTimeStatic (const MSEdge *const edge, const SUMOVehicle *const veh, double time)
 Returns the travel time for the given edge. More...
 
static void insertIDs (std::vector< std::string > &into)
 Inserts IDs of all known edges into the given vector. More...
 
Static parser helper
static void parseEdgesList (const std::string &desc, ConstMSEdgeVector &into, const std::string &rid)
 Parses the given string assuming it contains a list of edge ids divided by spaces. More...
 
static void parseEdgesList (const std::vector< std::string > &desc, ConstMSEdgeVector &into, const std::string &rid)
 Parses the given string vector assuming it edge ids. More...
 

Protected Member Functions

const std::vector< MSLane * > * allowedLanes (const MSEdge *destination, SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes to reach the destination-edge. More...
 
const std::vector< MSLane * > * getAllowedLanesWithDefault (const AllowedLanesCont &c, const MSEdge *dest) const
 lookup in map and return 0 if not found More...
 
double getDepartPosBound (const MSVehicle &veh, bool upper=true) const
 return upper bound for the depart position on this edge More...
 

Protected Attributes

bool myAmDelayed
 whether this edge had a vehicle with less than max speed on it More...
 
bool myAmFringe
 whether this edge is at the network fringe More...
 
bool myAmRoundabout
 whether this edge belongs to a roundabout More...
 
std::map< SUMOVehicleClass, MSEdgeVectormyClassesSuccessorMap
 The successors available for a given vClass. More...
 
std::set< MSTransportable * > myContainers
 Containers on the edge. More...
 
std::vector< std::string > myCrossingEdges
 The crossed edges id for a crossing edge. On not crossing edges it is empty. More...
 
std::string myEdgeType
 the type of the edge (optionally used during network creation) More...
 
double myEmptyTraveltime
 the traveltime on the empty edge (cached value for speedup) More...
 
std::set< int > myFailedInsertionMemory
 A cache for the rejected insertion attempts. Used to assure that no further insertion attempts are made on a lane where an attempt has already failed in the current time step if MSInsertionControl::myEagerInsertionCheck is off. More...
 
MSJunctionmyFromJunction
 the junctions for this edge More...
 
const SumoXMLEdgeFunc myFunction
 the purpose of the edge More...
 
std::string myID
 The name of the object. More...
 
MSLaneChangermyLaneChanger
 This member will do the lane-change. More...
 
const std::vector< MSLane * > * myLanes
 Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane, the higher the container-index. More...
 
SUMOTime myLastFailedInsertionTime
 The time of last insertion failure. More...
 
double myLength
 the length of the edge (cached value for speedup) More...
 
const int myNumericalID
 This edge's numerical id. More...
 
std::set< MSTransportable * > myPersons
 Persons on the edge for drawing and pushbutton. More...
 
MSEdgeVector myPredecessors
 The preceeding edges. More...
 
const int myPriority
 the priority of the edge (used during network creation) More...
 
std::string myStreetName
 the real-world name of this edge (need not be unique) More...
 
std::vector< double > mySublaneSides
 the right side for each sublane on this edge More...
 
MSEdgeVector mySuccessors
 The succeeding edges. More...
 
Boundary myTazBoundary
 The bounding rectangle of incoming or outgoing edges for taz connectors. More...
 
MSJunctionmyToJunction
 
int myVaporizationRequests
 Vaporizer counter. More...
 
double myWidth
 Edge width [m]. More...
 
Storages for allowed lanes (depending on vehicle classes)
AllowedLanesCont myAllowed
 Associative container from destination-edge to allowed-lanes. More...
 
ClassedAllowedLanesCont myClassedAllowed
 From vehicle class to lanes allowed to be used by it. More...
 
SVCPermissions myMinimumPermissions
 The intersection of lane permissions for this edge. More...
 
SVCPermissions myCombinedPermissions
 The union of lane permissions for this edge. More...
 

Private Member Functions

bool isSuperposable (const MSEdge *other)
 
 MSEdge (const MSEdge &)
 Invalidated copy constructor. More...
 
MSEdgeoperator= (const MSEdge &)
 assignment operator. More...
 

Private Attributes

const MSEdgemyOppositingSuperposableEdge
 the oppositing superposble edge More...
 

Static edge container

typedef std::map< std::string, MSEdge *> DictType
 definition of the static dictionary type More...
 
static DictType myDict
 Static dictionary to associate string-ids with objects. More...
 
static MSEdgeVector myEdges
 Static list of edges. More...
 

Detailed Description

A road/street connecting two junctions.

A single connection between two junctions. Holds lanes which are reponsible for vehicle movements.

Definition at line 80 of file MSEdge.h.

Member Typedef Documentation

◆ AllowedLanesCont

typedef std::map< const MSEdge*, std::vector<MSLane*>* > MSEdge::AllowedLanesCont

Suceeding edges (keys) and allowed lanes to reach these edges (values).

Definition at line 83 of file MSEdge.h.

◆ ClassedAllowedLanesCont

Map from vehicle types to lanes that may be used to reach one of the next edges.

Definition at line 86 of file MSEdge.h.

◆ DictType

typedef std::map< std::string, MSEdge* > MSEdge::DictType
protected

definition of the static dictionary type

Definition at line 846 of file MSEdge.h.

Constructor & Destructor Documentation

◆ MSEdge() [1/2]

MSEdge::MSEdge ( const std::string &  id,
int  numericalID,
const SumoXMLEdgeFunc  function,
const std::string &  streetName,
const std::string &  edgeType,
int  priority 
)

Constructor.

After calling this constructor, the edge is not yet initialised completely. A call to "initialize" with proper values is needed for this.

Parameters
[in]idThe id of the edge
[in]numericalIDThe numerical id (index) of the edge
[in]functionA basic type of the edge
[in]streetNameThe street name for that edge

Definition at line 70 of file MSEdge.cpp.

◆ ~MSEdge()

MSEdge::~MSEdge ( )
virtual

Destructor.

Definition at line 91 of file MSEdge.cpp.

References myAllowed, myClassedAllowed, myLaneChanger, and myLanes.

◆ MSEdge() [2/2]

MSEdge::MSEdge ( const MSEdge )
private

Invalidated copy constructor.

Member Function Documentation

◆ addContainer()

virtual void MSEdge::addContainer ( MSTransportable container) const
inlinevirtual

Add a container to myContainers.

Reimplemented in GUIEdge.

Definition at line 607 of file MSEdge.h.

References myContainers.

Referenced by GUIEdge::addContainer(), MSContainer::MSContainerStage_Driving::proceed(), and MSTransportable::Stage_Waiting::proceed().

◆ addPerson()

virtual void MSEdge::addPerson ( MSTransportable p) const
inlinevirtual

Reimplemented in GUIEdge.

Definition at line 595 of file MSEdge.h.

References myPersons.

Referenced by GUIEdge::addPerson(), MSPerson::MSPersonStage_Driving::proceed(), and MSTransportable::Stage_Waiting::proceed().

◆ addSuccessor()

void MSEdge::addSuccessor ( MSEdge edge)

Adds an edge to the list of edges which may be reached from this edge and to the incoming of the other edge.

This is mainly used by the taz (district) parsing

Parameters
[in]edgeThe edge to add

Definition at line 913 of file MSEdge.cpp.

References Boundary::add(), getFromJunction(), MSJunction::getPosition(), getToJunction(), isTazConnector(), myPredecessors, mySuccessors, and myTazBoundary.

Referenced by NLHandler::addDistrict(), and getCrossingEdges().

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters

Definition at line 119 of file Named.h.

References Named::StoringVisitor::add().

◆ allowedLanes() [1/3]

const std::vector< MSLane * > * MSEdge::allowedLanes ( const MSEdge destination,
SUMOVehicleClass  vclass = SVC_IGNORING 
) const

Get the allowed lanes to reach the destination-edge.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]destinationThe edge to reach
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used to reach the given edge, 0 if no such lanes exist

Definition at line 295 of file MSEdge.cpp.

Referenced by allowedLanes(), MSVehicleTransfer::checkInsertions(), getDepartLane(), getFreeLane(), getPersons(), getSuccessors(), MESegment::MESegment(), MSLane::by_connections_to_sorter::operator()(), MSBaseVehicle::reroute(), and MSVehicle::updateBestLanes().

◆ allowedLanes() [2/3]

const std::vector< MSLane * > * MSEdge::allowedLanes ( SUMOVehicleClass  vclass = SVC_IGNORING) const

Get the allowed lanes for the given vehicle class.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used by the given vclass

Definition at line 301 of file MSEdge.cpp.

References allowedLanes().

◆ allowedLanes() [3/3]

const std::vector< MSLane * > * MSEdge::allowedLanes ( const MSEdge destination,
SUMOVehicleClass  vclass = SVC_IGNORING 
) const
protected

Get the allowed lanes to reach the destination-edge.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]destinationThe edge to reach
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used to reach the given edge, 0 if no such lanes exist

Definition at line 317 of file MSEdge.cpp.

References MSLane::allowsVehicleClass(), getAllowedLanesWithDefault(), MSLane::getEdge(), myAllowed, myClassedAllowed, and myMinimumPermissions.

◆ allowsLaneChanging()

◆ buildLaneChanger()

void MSEdge::buildLaneChanger ( )

Has to be called after all sucessors and predecessors have been set (after closeBuilding())

Definition at line 205 of file MSEdge.cpp.

References allowsLaneChanging(), canChangeToOpposite(), MSGlobals::gLaneChangeDuration, MSGlobals::gLateralResolution, myLaneChanger, and myLanes.

◆ canChangeToOpposite()

bool MSEdge::canChangeToOpposite ( )

whether this edge allows changing to the opposite direction edge

Definition at line 964 of file MSEdge.cpp.

References isInternal(), LINKDIR_STRAIGHT, and myLanes.

Referenced by buildLaneChanger(), and hasLaneChanger().

◆ changeLanes()

void MSEdge::changeLanes ( SUMOTime  t)
virtual

Performs lane changing on this edge.

Definition at line 646 of file MSEdge.cpp.

References MSLaneChanger::laneChange(), and myLaneChanger.

Referenced by MSEdgeControl::changeLanes(), and setLastFailedInsertionTime().

◆ checkAndRegisterBiDirEdge()

void MSEdge::checkAndRegisterBiDirEdge ( )

check and register the opposite superposable edge if any

Definition at line 985 of file MSEdge.cpp.

References EDGEFUNC_NORMAL, getFunction(), Named::getID(), MSJunction::getOutgoing(), isSuperposable(), myFromJunction, myOppositingSuperposableEdge, myToJunction, and WRITE_WARNING.

Referenced by isCrossing().

◆ clear()

void MSEdge::clear ( )
static

Clears the dictionary.

Definition at line 783 of file MSEdge.cpp.

References myDict, and myEdges.

Referenced by MSNet::clearAll(), unlock(), and MSVehicle::updateBestLanes().

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 97 of file Parameterised.cpp.

References Parameterised::myMap.

◆ closeBuilding()

void MSEdge::closeBuilding ( )
Todo:
Has to be called after all edges were built and all connections were set...; Still, is not very nice

Definition at line 159 of file MSEdge.cpp.

References MELoop::buildSegmentsFor(), MSLane::getEdge(), OptionsCont::getOptions(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, LINKDIR_TURN, myAllowed, myAmFringe, myLanes, myPredecessors, mySuccessors, rebuildAllowedLanes(), and recalcCache().

◆ decVaporization()

SUMOTime MSEdge::decVaporization ( SUMOTime  t)

Disables vaporization.

The internal vaporization counter is decreased what disables the vaporization if it was only once enabled. Called from the event handler.

Parameters
[in]tThe current time (unused)
Returns
Time to next call (always 0)
Exceptions
ProcessErrornot thrown by this method, just derived

Definition at line 385 of file MSEdge.cpp.

References myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer(), and isVaporizing().

◆ dictionary() [1/2]

bool MSEdge::dictionary ( const std::string &  id,
MSEdge edge 
)
static

Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false.

Definition at line 744 of file MSEdge.cpp.

References getNumericalID(), myDict, and myEdges.

Referenced by libsumo::Route::add(), libsumo::Person::add(), NLHandler::addConnection(), NLHandler::addDistrict(), NLHandler::addDistrictEdge(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), MSRouteHandler::addPersonTrip(), NLHandler::addRoundabout(), MEVehicle::addStop(), libsumo::Person::appendDrivingStage(), NLEdgeControlBuilder::beginEdgeParsing(), NLTriggerBuilder::buildVaporizer(), libsumo::Vehicle::changeTarget(), NLHandler::closeEdge(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), libsumo::Helper::convertCartesianToRoadMap(), libsumo::Simulation::findIntermodalRoute(), libsumo::Simulation::findRoute(), libsumo::Edge::getEdge(), libsumo::Helper::getEdge(), NLDetectorBuilder::getEdgeChecking(), libsumo::Helper::getLaneChecking(), MSDevice_Routing::getParameter(), MSPedestrianPushButton::loadPushButtons(), MSDevice_Vehroutes::loadState(), libsumo::Person::moveTo(), libsumo::Helper::moveToXYMap(), NLHandler::myEndElement(), MSRouteHandler::myStartElement(), MSTriggeredRerouter::myStartElement(), NLTriggerBuilder::parseAndBuildCalibrator(), NLTriggerBuilder::parseAndBuildRerouter(), parseEdgesList(), MSRouteHandler::parseFromViaTo(), MSBaseVehicle::reroute(), libsumo::Vehicle::setAdaptedTraveltime(), libsumo::Vehicle::setEffort(), MSDevice_Routing::setParameter(), libsumo::Vehicle::setStop(), and unlock().

◆ dictionary() [2/2]

MSEdge * MSEdge::dictionary ( const std::string &  id)
static

Returns the MSEdge associated to the key id if exists, otherwise returns 0.

Definition at line 760 of file MSEdge.cpp.

References myDict.

◆ dictSize()

int MSEdge::dictSize ( )
static

Returns the number of edges.

Definition at line 771 of file MSEdge.cpp.

References myDict.

Referenced by MSStateHandler::saveState(), and unlock().

◆ getAllEdges()

◆ getAllowedLanesWithDefault()

const std::vector< MSLane * > * MSEdge::getAllowedLanesWithDefault ( const AllowedLanesCont c,
const MSEdge dest 
) const
protected

lookup in map and return 0 if not found

Definition at line 307 of file MSEdge.cpp.

Referenced by allowedLanes().

◆ getCrossingEdges()

const std::vector<std::string>& MSEdge::getCrossingEdges ( ) const
inline

Gets the crossed edge ids.

Returns
The list of crossed edge ids in a crossing edge or an empty vector

Definition at line 294 of file MSEdge.h.

References addSuccessor(), and myCrossingEdges.

Referenced by MSPedestrianPushButton::loadCrossingEdgeMap().

◆ getCurrentTravelTime()

double MSEdge::getCurrentTravelTime ( const double  minSpeed = NUMERICAL_EPS) const

Computes and returns the current travel time for this edge.

The mean speed of all lanes is used to compute the travel time. To avoid infinite travel times, the given minimum speed is used.

Parameters
[in]minSpeedThe minimumSpeed to assume if traffic on this edge is stopped
Returns
The current effort (travel time) to pass the edge

Definition at line 727 of file MSEdge.cpp.

References getLength(), getMeanSpeed(), MAX2(), myAmDelayed, and myEmptyTraveltime.

Referenced by MSVehicleTransfer::add(), MSVehicleTransfer::checkInsertions(), libsumo::Edge::getCurrentTravelTime(), isVaporizing(), and MSFullExport::writeEdge().

◆ getDepartLane()

MSLane * MSEdge::getDepartLane ( MSVehicle veh) const

Finds a depart lane for the given vehicle parameters.

Depending on the depart lane procedure a depart lane is chosen. Repeated calls with the same vehicle may return different results if the procedure is "random" or "free". In case no appropriate lane was found, 0 is returned.

Parameters
[in]vehThe vehicle to get the depart lane for
Returns
a possible/chosen depart lane, 0 if no lane can be used

Definition at line 467 of file MSEdge.cpp.

References allowedLanes(), MSRoute::begin(), BEST_LANE_LOOKAHEAD, DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_DEFAULT, DEPART_LANE_FIRST_ALLOWED, DEPART_LANE_FREE, DEPART_LANE_GIVEN, DEPART_LANE_RANDOM, SUMOVehicleParameter::departLane, SUMOVehicleParameter::departLaneProcedure, MSVehicle::getBestLanes(), getDepartPosBound(), getFreeLane(), MSBaseVehicle::getParameter(), RandHelper::getRandomFrom(), MSBaseVehicle::getRoute(), MSVehicleType::getVehicleClass(), MSBaseVehicle::getVehicleType(), MIN2(), myLanes, MSRoute::size(), and MSVehicle::updateBestLanes().

Referenced by getTravelTimeStatic(), and insertVehicle().

◆ getDepartPosBound()

◆ getDistanceTo()

double MSEdge::getDistanceTo ( const MSEdge other) const

optimistic air distance heuristic for use in routing

Parameters
[in]otherThe edge to which the distance shall be returned
Returns
The distance to the other edge

Definition at line 831 of file MSEdge.cpp.

References Boundary::distanceTo2D(), Position::distanceTo2D(), getFromJunction(), MSJunction::getPosition(), getToJunction(), isTazConnector(), and myTazBoundary.

Referenced by getSubLaneSides().

◆ getDouble()

double Parameterised::getDouble ( const std::string &  key,
const double  defaultValue 
) const
inherited

Returns the value for a given key converted to a double.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 87 of file Parameterised.cpp.

References TplConvert::_2double(), and Parameterised::myMap.

Referenced by MSDevice_Battery::buildVehicleDevices().

◆ getEdgeType()

const std::string& MSEdge::getEdgeType ( ) const
inline

Returns the type of the edge.

Definition at line 272 of file MSEdge.h.

References myEdgeType.

Referenced by GUILane::getParameterWindow(), and MSLane::initRestrictions().

◆ getFreeLane()

MSLane * MSEdge::getFreeLane ( const std::vector< MSLane *> *  allowed,
const SUMOVehicleClass  vclass,
double  departPos 
) const

Finds the emptiest lane allowing the vehicle class.

The emptiest lane is the one which vehicle insertion is most likely to succeed.

If there are no vehicles before departPos, then the lane with the largest gap between departPos and the last vehicle is Otheriwise the lane with lowes occupancy is selected If there is more than one, the first according to its index in the lane container is chosen.

If allowed==0, the lanes allowed for the given vehicle class will be used.

Parameters
[in]allowedThe lanes to choose from
[in]vclassThe vehicle class to look for
[in]departPosAn upper bound on vehicle depart position
Returns
the least occupied lane
See also
allowedLanes

Definition at line 392 of file MSEdge.cpp.

References allowedLanes(), MSVehicle::getPositionOnLane(), and myLength.

Referenced by MSVehicleTransfer::checkInsertions(), getDepartLane(), and getTravelTimeStatic().

◆ getFromJunction()

◆ getFunction()

SumoXMLEdgeFunc MSEdge::getFunction ( ) const
inline

Returns the edge type (SumoXMLEdgeFunc)

Returns
This edge's SumoXMLEdgeFunc
See also
SumoXMLEdgeFunc

Definition at line 224 of file MSEdge.h.

References myFunction.

Referenced by checkAndRegisterBiDirEdge(), GUIEdge::getColorValue(), MSLink::isExitLink(), and MSPModel_Striping::PState::moveToNextLane().

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 74 of file Named.h.

Referenced by NIImporter_SUMO::_loadNetwork(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), LaneStoringVisitor::add(), MSPModel_Striping::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), NBEdge::append(), NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NLDetectorBuilder::buildE2Detector(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), checkAndRegisterBiDirEdge(), MSLane::checkForPedestrians(), NBEdge::checkGeometry(), NBEdgeCont::checkGrade(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), NBEdgeCont::checkOverlap(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBEdge::computeAngle(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistricts(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), libsumo::Helper::findCloserLane(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), libsumo::TrafficLight::getControlledLinks(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), MSMeanData::getEdgeID(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), libsumo::Vehicle::getLaneID(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), libsumo::Lane::getLinks(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBPTStopCont::getReverseStop(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), libsumo::Vehicle::getRouteID(), MSNet::getStoppingPlaceID(), MSDevice_SSM::getUpstreamVehicles(), MSDevice_SSM::getVehiclesOnJunction(), MSTransportable::Stage_Driving::getWaitingDescription(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NBEdge::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), insertVehicle(), MSLane::integrateNewVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSCalibrator::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSPModel_Striping::nextBlocking(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), MSLink::opened(), RORouteHandler::openRoute(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NLTriggerBuilder::parseAndBuildCalibrator(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSDelayBasedTrafficLightLogic::proposeProlongation(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckLanes(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), MSLink::removeApproaching(), NBNodeCont::removeIsolatedRoads(), MSVehicle::removePassedDriveItems(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSVehicle::replaceParkingArea(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveGNEConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), NBPTLineCont::reviseStops(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), RONet::saveAndRemoveRoutesUntil(), MSDevice_Vehroutes::saveState(), MSDevice::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), GNEJunction::setLogicValid(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), IntermodalRouter< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSDevice_SSM::update(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), MSVehicle::updateDriveItems(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_OpenDrive::writeNormalEdge(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMOPolygon::writeXML(), PointOfInterest::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

◆ getInternalFollowingEdge()

const MSEdge * MSEdge::getInternalFollowingEdge ( const MSEdge followerAfterInternal) const

◆ getInternalFollowingLengthTo()

double MSEdge::getInternalFollowingLengthTo ( const MSEdge followerAfterInternal) const

returns the length of all internal edges on the junction until reaching the non-internal edge followerAfterInternal.

Definition at line 676 of file MSEdge.cpp.

References getInternalFollowingEdge(), getLength(), and isInternal().

Referenced by MSDevice_SSM::getUpstreamVehicles(), and setLastFailedInsertionTime().

◆ getLanes()

const std::vector<MSLane*>& MSEdge::getLanes ( ) const
inline

Returns this edge's lanes.

Returns
This edge's lanes

Definition at line 167 of file MSEdge.h.

References myLanes.

Referenced by MSVehicleTransfer::add(), NLHandler::addConnection(), GUIEdge::addRerouter(), MSRouteHandler::addStop(), MSVehicleControl::addVehicle(), MELoop::buildSegmentsFor(), MSBaseVehicle::calculateArrivalParams(), MSEdgeControl::changeLanes(), MSVehicleTransfer::checkInsertions(), GUIEdge::closeTraffic(), MSLCM_SL2015::computeSublaneShift(), CState::computeTranshipTime(), GUILane::drawMarkings(), libsumo::Helper::findCloserLane(), MEVehicle::getAngle(), libsumo::Edge::getCO2Emissions(), libsumo::Edge::getCOEmissions(), GUIEdge::getColorValue(), MSTransportable::Stage::getEdgeAngle(), GUILane::getEdgeLaneNumber(), MSTransportable::Stage::getEdgePosition(), libsumo::Edge::getElectricityConsumption(), libsumo::Edge::getFuelConsumption(), libsumo::Edge::getHCEmissions(), libsumo::Helper::getLaneChecking(), MSVehicle::getLaneIndex(), getLengthGeometryFactor(), MESegment::getLink(), MESegment::getMaxPenaltySeconds(), MSPModel_Striping::getNextLane(), libsumo::Edge::getNoiseEmissions(), libsumo::Edge::getNOxEmissions(), libsumo::Edge::getOccupancy(), MSInsertionControl::getPendingEmits(), libsumo::Edge::getPMxEmissions(), GUIEdge::getPopUpMenu(), MEVehicle::getPosition(), MSPModel_NonInteracting::PState::getPosition(), GUIContainer::getPosition(), MSVehicle::getPosition(), GUIEdge::getScaleValue(), GUIEdge::getSegmentAtPosition(), libsumo::Edge::getShape(), MEVehicle::getSlope(), getSpeedLimit(), GUIEdge::getTotalLength(), MSDevice_SSM::getUpstreamVehicles(), libsumo::Edge::getVehicleAverageLength(), libsumo::Edge::getVehicleHaltingNumber(), libsumo::Edge::getVehicleIDs(), getVehicleMaxSpeed(), libsumo::Edge::getVehicleNumber(), libsumo::Edge::getWaitingSeconds(), GUICalibrator::GUICalibrator(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), MSVehicle::Influencer::influenceChangeDecision(), MSRailSignal::init(), GUINet::initGUIStructures(), MSCalibrator::invalidJam(), MSPedestrianPushButton::isActiveForEdge(), GUISUMOViewParent::isSelected(), isSuperposable(), MESegment::MESegment(), libsumo::Vehicle::moveTo(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSRouteProbe::MSRouteProbe(), GUIMEInductLoop::MyWrapper::MyWrapper(), NLTriggerBuilder::parseAndBuildCalibrator(), MSLCM_DK2008::patchSpeed(), MSLCM_SL2015::prepareStep(), TraCIServerAPI_Vehicle::processSet(), MSCalibrator::remainingVehicleCapacity(), libsumo::Edge::setAllowedSVCPermissions(), GUIEdge::setFunctionalColor(), libsumo::Edge::setMaxSpeed(), libsumo::Vehicle::setStop(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MESegment::useMultiQueue(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), MSMeanData::writeEdge(), MSFCDExport::writeTransportable(), and MEInductLoop::writeXMLOutput().

◆ getLastFailedInsertionTime()

SUMOTime MSEdge::getLastFailedInsertionTime ( ) const
inline

Returns the last time a vehicle could not be inserted.

Returns
The current value

Definition at line 503 of file MSEdge.h.

References myLastFailedInsertionTime.

◆ getLength()

◆ getLengthGeometryFactor()

double MSEdge::getLengthGeometryFactor ( ) const

return shape.length() / myLength

Definition at line 853 of file MSEdge.cpp.

References getLanes(), and myLanes.

Referenced by getLength().

◆ getMap()

◆ getMeanSpeed()

◆ getMinimumTravelTime()

double MSEdge::getMinimumTravelTime ( const SUMOVehicle *const  veh) const
inline

returns the minimum travel time for the given vehicle

Definition at line 413 of file MSEdge.h.

References EDGEFUNC_CONNECTOR, getLength(), getSpeedLimit(), getVehicleMaxSpeed(), and myFunction.

Referenced by MSDevice_Routing::getEffort(), and MSNet::getTravelTime().

◆ getMyOppositeSuperposableEdge()

const MSEdge* MSEdge::getMyOppositeSuperposableEdge ( ) const
inline

return opposite superposable/congruent edge, if it exist and 0 else

Definition at line 243 of file MSEdge.h.

References myOppositingSuperposableEdge.

Referenced by GUILane::drawGL(), and MSRailSignal::init().

◆ getNormalBefore()

const MSEdge * MSEdge::getNormalBefore ( ) const

if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself

Definition at line 690 of file MSEdge.cpp.

References isInternal(), and myPredecessors.

Referenced by MSVehicle::addStop(), and setLastFailedInsertionTime().

◆ getNumericalID()

◆ getNumPredecessors()

int MSEdge::getNumPredecessors ( ) const
inline

Returns the number of edges this edge is connected to.

Returns
The number of edges following this edge

Definition at line 335 of file MSEdge.h.

References myPredecessors.

Referenced by NLEdgeControlBuilder::build(), and MSRouteHandler::parseFromViaTo().

◆ getNumSuccessors()

int MSEdge::getNumSuccessors ( ) const
inline

Returns the number of edges that may be reached from this edge.

Returns
The number of following edges

Definition at line 312 of file MSEdge.h.

References mySuccessors.

Referenced by NLEdgeControlBuilder::build(), MESegment::MESegment(), MSRouteHandler::parseFromViaTo(), and MESegment::useMultiQueue().

◆ getParameter()

const std::string Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue = "" 
) const
inherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 77 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdge::addRestrictedLane(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Polygon::getParameter(), libsumo::Route::getParameter(), libsumo::POI::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Person::getParameter(), libsumo::Lane::getParameter(), libsumo::Vehicle::getParameter(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_OpenStreetMap::insertEdge(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), MSSOTLPolicyDesirability::readParameter(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), MSDevice_SSM::useGeoCoords(), and NWWriter_DlrNavteq::writeLinksUnsplitted().

◆ getPermissions()

SVCPermissions MSEdge::getPermissions ( ) const
inline

◆ getPersons()

const std::set<MSTransportable*>& MSEdge::getPersons ( ) const
inline

◆ getPredecessors()

◆ getPriority()

int MSEdge::getPriority ( ) const
inline

Returns the priority of the edge.

Definition at line 278 of file MSEdge.h.

References myPriority.

Referenced by GUILane::getColorValue(), GUILane::getParameterWindow(), GUILane::getScaleValue(), and MSLane::outgoing_lane_priority_sorter::operator()().

◆ getRoutingSpeed()

double MSEdge::getRoutingSpeed ( ) const

Returns the averaged speed used by the routing device.

Definition at line 737 of file MSEdge.cpp.

References MSDevice_Routing::getAssumedSpeed().

Referenced by GUIEdge::getColorValue(), GUILane::getColorValue(), GUIEdge::getParameterWindow(), GUILane::getParameterWindow(), and getTravelTimeStatic().

◆ getSortedContainers()

std::vector< MSTransportable * > MSEdge::getSortedContainers ( SUMOTime  timestep,
bool  includeRiding = false 
) const

Returns this edge's containers sorted by pos.

Returns
This edge's containers sorted by pos

Definition at line 894 of file MSEdge.cpp.

References myContainers.

Referenced by getPersons(), and MSXMLRawOut::writeEdge().

◆ getSortedPersons()

std::vector< MSTransportable * > MSEdge::getSortedPersons ( SUMOTime  timestep,
bool  includeRiding = false 
) const

Returns this edge's persons sorted by pos.

Returns
This edge's persons sorted by pos

Definition at line 876 of file MSEdge.cpp.

References myLanes, and myPersons.

Referenced by LaneStoringVisitor::add(), MSLane::detectPedestrianJunctionCollision(), libsumo::Edge::getPersonIDs(), getPersons(), and MSXMLRawOut::writeEdge().

◆ getSpeedLimit()

◆ getStreetName()

const std::string& MSEdge::getStreetName ( ) const
inline

Returns the street name of the edge.

Definition at line 266 of file MSEdge.h.

References myStreetName.

Referenced by GUIEdge::drawGL(), and GUILane::getParameterWindow().

◆ getSubLaneSides()

const std::vector<double> MSEdge::getSubLaneSides ( ) const
inline

◆ getSuccessors() [1/2]

◆ getSuccessors() [2/2]

const MSEdgeVector & MSEdge::getSuccessors ( SUMOVehicleClass  vClass) const

Returns the following edges, restricted by vClass.

Parameters
[in]vClassThe vClass for which to restrict the successors
Returns
The eligible following edges

Definition at line 927 of file MSEdge.cpp.

References allowedLanes(), EDGEFUNC_CONNECTOR, MSNet::getInstance(), myClassesSuccessorMap, myFunction, mySuccessors, and SVC_IGNORING.

◆ getToJunction()

◆ getTravelTimeStatic()

static double MSEdge::getTravelTimeStatic ( const MSEdge *const  edge,
const SUMOVehicle *const  veh,
double  time 
)
inlinestatic

Returns the travel time for the given edge.

Parameters
[in]edgeThe edge for which the travel time shall be retrieved
[in]vehThe vehicle for which the travel time on this edge shall be retrieved
[in]timeThe time for which the travel time shall be returned [s]
Returns
The traveltime needed by the given vehicle to pass the edge at the given time

Definition at line 431 of file MSEdge.h.

References getDepartLane(), getFreeLane(), MSNet::getInstance(), getRoutingSpeed(), MSNet::getTravelTime(), and insertVehicle().

◆ getVehicleMaxSpeed()

double MSEdge::getVehicleMaxSpeed ( const SUMOVehicle *const  veh) const

Returns the maximum speed the vehicle may use on this edge.

Only the first lane is considered

Returns
The maximum velocity on this edge for the given vehicle

Definition at line 858 of file MSEdge.cpp.

References getLanes(), and myLanes.

Referenced by GUIMEVehicle::getColorValue(), getLength(), getMinimumTravelTime(), insertVehicle(), MSDevice_Tripinfo::notifyMoveInternal(), and MESegment::receive().

◆ getWidth()

double MSEdge::getWidth ( ) const
inline

Returns the edges's width (sum over all lanes)

Returns
This edges's width

Definition at line 547 of file MSEdge.h.

References myWidth.

Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSLCM_SL2015::keepLatGap(), MSVehicle::planMoveInternal(), and MSLCM_SL2015::prepareStep().

◆ hasLaneChanger()

bool MSEdge::hasLaneChanger ( ) const
inline

Definition at line 631 of file MSEdge.h.

References canChangeToOpposite(), getMeanSpeed(), hasMinorLink(), and myLaneChanger.

Referenced by MSLCM_LC2013::_patchSpeed().

◆ hasMinorLink()

bool MSEdge::hasMinorLink ( ) const

whether any lane has a minor link

Definition at line 972 of file MSEdge.cpp.

References myLanes.

Referenced by hasLaneChanger().

◆ incVaporization()

SUMOTime MSEdge::incVaporization ( SUMOTime  t)

Enables vaporization.

The internal vaporization counter is increased enabling the vaporization. Called from the event handler.

Parameters
[in]tThe current time (unused)
Returns
Time to next call (always 0)
Exceptions
ProcessErrornot thrown by this method, just derived

Definition at line 378 of file MSEdge.cpp.

References myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer(), and isVaporizing().

◆ initialize()

void MSEdge::initialize ( const std::vector< MSLane *> *  lanes)

Initialize the edge.

Parameters
[in]allowedInformation which edges may be reached from which lanes
[in]lanesList of this edge's lanes

Definition at line 107 of file MSEdge.cpp.

References EDGEFUNC_CONNECTOR, MSGlobals::gLateralResolution, myCombinedPermissions, myFunction, myLanes, mySublaneSides, myWidth, MSLeaderInfo::numSublanes(), and SVCAll.

Referenced by NLHandler::addDistrict(), and NLEdgeControlBuilder::closeEdge().

◆ insertIDs()

void MSEdge::insertIDs ( std::vector< std::string > &  into)
static

Inserts IDs of all known edges into the given vector.

Definition at line 793 of file MSEdge.cpp.

References myDict.

Referenced by libsumo::Edge::getIDList(), and unlock().

◆ insertVehicle()

bool MSEdge::insertVehicle ( SUMOVehicle v,
SUMOTime  time,
const bool  checkOnly = false,
const bool  forceCheck = false 
) const

Tries to insert the given vehicle into the network.

The procedure for choosing the proper lane is determined, first. In dependance to this, the proper lane is chosen.

Insertion itself is done by calling the chose lane's "insertVehicle" method but only if the checkOnly argument is false. The check needs to be certain only in the negative case (if false is returned, there is no way this vehicle would be inserted).

Parameters
[in]vThe vehicle to insert
[in]timeThe current simulation time
[in]checkOnlyWhether we perform only the check without actually inserting
[in]forceCheckWhether the full insertion check should be run for each pending vehicle or whether insertion on lanes for which an insertion has already a failed should be ignored in the current time step.
Returns
Whether the vehicle could be inserted
See also
MSLane::insertVehicle

Definition at line 530 of file MSEdge.cpp.

References MSVehicleType::computeChosenSpeedDeviation(), DEPART_LANE_DEFAULT, DEPART_LANE_FIRST_ALLOWED, DEPART_LANE_GIVEN, DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, DEPART_SPEED_GIVEN, SUMOVehicleParameter::departLaneProcedure, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, SUMOVehicleParameter::departSpeed, SUMOVehicleParameter::departSpeedProcedure, MSLane::getBruttoOccupancy(), SUMOVehicle::getChosenSpeedFactor(), getDepartLane(), Named::getID(), SUMOVehicle::getID(), MSLane::getIndex(), MSNet::getInstance(), getLength(), MSVehicleType::getLengthWithGap(), MESegment::getNextSegment(), Distribution_Parameterized::getParameter(), SUMOVehicle::getParameter(), MELoop::getSegmentForEdge(), MSVehicleType::getSpeedFactor(), getSpeedLimit(), getVehicleMaxSpeed(), SUMOVehicle::getVehicleType(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, MESegment::hasSpaceFor(), SUMOVehicleParameter::id, MESegment::initialise(), MSLane::insertVehicle(), isTazConnector(), isVaporizing(), myFailedInsertionMemory, myLanes, myLastFailedInsertionTime, myLength, RandHelper::rand(), SUMOVehicle::setChosenSpeedFactor(), time2string(), toString(), and WRITE_WARNING.

Referenced by MSInsertionControl::checkCandidates(), MSCalibrator::execute(), and getTravelTimeStatic().

◆ isCrossing()

◆ isFringe()

bool MSEdge::isFringe ( ) const
inline

return whether this edge is at the fringe of the network

Definition at line 645 of file MSEdge.h.

References myAmFringe.

Referenced by MSVehicle::planMoveInternal().

◆ isInternal()

◆ isRoundabout()

◆ isSuperposable()

bool MSEdge::isSuperposable ( const MSEdge other)
private

Definition at line 1003 of file MSEdge.cpp.

References getLanes(), and myLanes.

Referenced by checkAndRegisterBiDirEdge().

◆ isTazConnector()

◆ isVaporizing()

bool MSEdge::isVaporizing ( ) const
inline

Returns whether vehicles on this edge shall be vaporized.

Returns
Whether no vehicle shall be on this edge

Definition at line 371 of file MSEdge.h.

References decVaporization(), getCurrentTravelTime(), incVaporization(), myVaporizationRequests, and NUMERICAL_EPS.

Referenced by MSVehicle::executeMove(), MSLane::executeMovements(), insertVehicle(), and MSVehicle::processLaneAdvances().

◆ isWalkingArea()

◆ knowsParameter()

◆ leftLane()

MSLane * MSEdge::leftLane ( const MSLane *const  lane) const

Returns the lane left to the one given, 0 if the given lane is leftmost.

Parameters
[in]laneThe lane right to the one to be returned
Returns
The lane left to the given, 0 if no such lane exists
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 268 of file MSEdge.cpp.

References parallelLane().

◆ lock()

virtual void MSEdge::lock ( ) const
inlinevirtual

grant exclusive access to the mesoscopic state

Reimplemented in GUIEdge.

Definition at line 650 of file MSEdge.h.

Referenced by MESegment::receive(), and MESegment::removeCar().

◆ markAsRoundabout()

void MSEdge::markAsRoundabout ( )
inline

Definition at line 623 of file MSEdge.h.

References myAmRoundabout.

Referenced by NLHandler::addRoundabout(), and NLEdgeControlBuilder::build().

◆ markDelayed()

void MSEdge::markDelayed ( ) const
inline

◆ operator=()

MSEdge& MSEdge::operator= ( const MSEdge )
private

assignment operator.

◆ parallelLane()

MSLane * MSEdge::parallelLane ( const MSLane *const  lane,
int  offset 
) const

Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist.

Parameters
[in]laneThe base lane
[in]offsetThe offset of the result lane
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 280 of file MSEdge.cpp.

References myLanes.

Referenced by MSLane::getParallelLane(), leftLane(), and rightLane().

◆ parseEdgesList() [1/2]

void MSEdge::parseEdgesList ( const std::string &  desc,
ConstMSEdgeVector into,
const std::string &  rid 
)
static

Parses the given string assuming it contains a list of edge ids divided by spaces.

Splits the string at spaces, uses polymorph method to generate edge vector.

Parameters
[in]descThe string containing space-separated edge ids
[out]intoThe vector to fill
[in]ridThe id of the route these description belongs to; used for error message generation
Exceptions
ProcessErrorIf one of the strings contained is not a known edge id

Definition at line 801 of file MSEdge.cpp.

References BinaryFormatter::BF_ROUTE, StringTokenizer::getVector(), and FileHelpers::readEdgeVector().

Referenced by MSRouteHandler::addWalk(), libsumo::Person::appendWalkingStage(), MSRouteHandler::myStartElement(), MSRouteHandler::openRoute(), MSRouteHandler::parseFromViaTo(), TraCIServerAPI_Vehicle::processSet(), libsumo::Vehicle::setRoute(), and unlock().

◆ parseEdgesList() [2/2]

void MSEdge::parseEdgesList ( const std::vector< std::string > &  desc,
ConstMSEdgeVector into,
const std::string &  rid 
)
static

Parses the given string vector assuming it edge ids.

Parameters
[in]descThe string vector containing edge ids
[out]intoThe vector to fill
[in]ridThe id of the route these description belongs to; used for error message generation
Exceptions
ProcessErrorIf one of the strings contained is not a known edge id

Definition at line 816 of file MSEdge.cpp.

References dictionary().

◆ prohibits()

bool MSEdge::prohibits ( const SUMOVehicle *const  vehicle) const
inline

Returns whether the vehicle (class) is not allowed on the edge.

Definition at line 532 of file MSEdge.h.

References SUMOVehicle::getVClass(), and myCombinedPermissions.

◆ rebuildAllowedLanes()

◆ recalcCache()

◆ removeContainer()

virtual void MSEdge::removeContainer ( MSTransportable container) const
inlinevirtual

Remove container from myContainers.

Reimplemented in GUIEdge.

Definition at line 612 of file MSEdge.h.

References myContainers.

Referenced by MSTransportableControl::abortWaitingForVehicle(), MSTransportableControl::loadAnyWaiting(), MSContainer::proceed(), and GUIEdge::removeContainer().

◆ removePerson()

virtual void MSEdge::removePerson ( MSTransportable p) const
inlinevirtual

◆ rightLane()

MSLane * MSEdge::rightLane ( const MSLane *const  lane) const

Returns the lane right to the one given, 0 if the given lane is rightmost.

Parameters
[in]laneThe lane left to the one to be returned
Returns
The lane right to the given, 0 if no such lane exists
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 274 of file MSEdge.cpp.

References parallelLane().

◆ setCrossingEdges()

void MSEdge::setCrossingEdges ( const std::vector< std::string > &  crossingEdges)
inline

Sets the crossed edge ids for a crossing edge.

Definition at line 286 of file MSEdge.h.

References myCrossingEdges.

Referenced by NLEdgeControlBuilder::addCrossingEdges().

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ setJunctions()

void MSEdge::setJunctions ( MSJunction from,
MSJunction to 
)
inline

Definition at line 357 of file MSEdge.h.

References myFromJunction, and myToJunction.

Referenced by NLHandler::myEndElement().

◆ setLastFailedInsertionTime()

void MSEdge::setLastFailedInsertionTime ( SUMOTime  time) const
inline

Sets the last time a vehicle could not be inserted.

Parameters
[in]timethe new value

Definition at line 511 of file MSEdge.h.

References changeLanes(), getInternalFollowingEdge(), getInternalFollowingLengthTo(), getNormalBefore(), and myLastFailedInsertionTime.

◆ setMaxSpeed()

void MSEdge::setMaxSpeed ( double  val) const

Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)

Parameters
[in]valthe new speed in m/s

Definition at line 865 of file MSEdge.cpp.

References myLanes.

Referenced by METriggeredCalibrator::execute(), MSCalibrator::execute(), and getLength().

◆ setParameter()

◆ unlock()

virtual void MSEdge::unlock ( ) const
inlinevirtual

release exclusive access to the mesoscopic state

Reimplemented in GUIEdge.

Definition at line 653 of file MSEdge.h.

References clear(), dictionary(), dictSize(), getAllEdges(), insertIDs(), and parseEdgesList().

Referenced by MESegment::receive(), and MESegment::removeCar().

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 57 of file Parameterised.cpp.

References Parameterised::myMap.

◆ updateParameter()

void Parameterised::updateParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

Adds or updates all given parameters from the map.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 63 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NLJunctionControlBuilder::closeJunction(), NBTrafficLightDefinition::compute(), and NIImporter_OpenStreetMap::insertEdge().

◆ writeParams()

Field Documentation

◆ myAllowed

AllowedLanesCont MSEdge::myAllowed
protected

Associative container from destination-edge to allowed-lanes.

Definition at line 800 of file MSEdge.h.

Referenced by allowedLanes(), closeBuilding(), and ~MSEdge().

◆ myAmDelayed

bool MSEdge::myAmDelayed
mutableprotected

whether this edge had a vehicle with less than max speed on it

Definition at line 831 of file MSEdge.h.

Referenced by getCurrentTravelTime(), and markDelayed().

◆ myAmFringe

bool MSEdge::myAmFringe
protected

whether this edge is at the network fringe

Definition at line 837 of file MSEdge.h.

Referenced by closeBuilding(), and isFringe().

◆ myAmRoundabout

bool MSEdge::myAmRoundabout
protected

whether this edge belongs to a roundabout

Definition at line 834 of file MSEdge.h.

Referenced by isRoundabout(), and markAsRoundabout().

◆ myClassedAllowed

ClassedAllowedLanesCont MSEdge::myClassedAllowed
mutableprotected

From vehicle class to lanes allowed to be used by it.

Definition at line 804 of file MSEdge.h.

Referenced by allowedLanes(), rebuildAllowedLanes(), and ~MSEdge().

◆ myClassesSuccessorMap

std::map<SUMOVehicleClass, MSEdgeVector> MSEdge::myClassesSuccessorMap
mutableprotected

The successors available for a given vClass.

Definition at line 861 of file MSEdge.h.

Referenced by getSuccessors(), and rebuildAllowedLanes().

◆ myCombinedPermissions

SVCPermissions MSEdge::myCombinedPermissions
protected

The union of lane permissions for this edge.

Definition at line 809 of file MSEdge.h.

Referenced by getPermissions(), initialize(), prohibits(), and rebuildAllowedLanes().

◆ myContainers

std::set<MSTransportable*> MSEdge::myContainers
mutableprotected

Containers on the edge.

Definition at line 794 of file MSEdge.h.

Referenced by addContainer(), GUIEdge::drawGL(), getSortedContainers(), and removeContainer().

◆ myCrossingEdges

std::vector<std::string> MSEdge::myCrossingEdges
protected

The crossed edges id for a crossing edge. On not crossing edges it is empty.

Definition at line 778 of file MSEdge.h.

Referenced by getCrossingEdges(), and setCrossingEdges().

◆ myDict

MSEdge::DictType MSEdge::myDict
staticprotected

Static dictionary to associate string-ids with objects.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 851 of file MSEdge.h.

Referenced by clear(), dictionary(), dictSize(), GUIEdge::getIDs(), GUIEdge::getTotalLength(), and insertIDs().

◆ myEdges

MSEdgeVector MSEdge::myEdges
staticprotected

Static list of edges.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 856 of file MSEdge.h.

Referenced by clear(), dictionary(), and getAllEdges().

◆ myEdgeType

std::string MSEdge::myEdgeType
protected

the type of the edge (optionally used during network creation)

Definition at line 816 of file MSEdge.h.

Referenced by getEdgeType().

◆ myEmptyTraveltime

double MSEdge::myEmptyTraveltime
protected

the traveltime on the empty edge (cached value for speedup)

Definition at line 828 of file MSEdge.h.

Referenced by getCurrentTravelTime(), getMeanSpeed(), and recalcCache().

◆ myFailedInsertionMemory

std::set<int> MSEdge::myFailedInsertionMemory
mutableprotected

A cache for the rejected insertion attempts. Used to assure that no further insertion attempts are made on a lane where an attempt has already failed in the current time step if MSInsertionControl::myEagerInsertionCheck is off.

Definition at line 775 of file MSEdge.h.

Referenced by insertVehicle().

◆ myFromJunction

MSJunction* MSEdge::myFromJunction
protected

the junctions for this edge

Definition at line 787 of file MSEdge.h.

Referenced by checkAndRegisterBiDirEdge(), getFromJunction(), and setJunctions().

◆ myFunction

const SumoXMLEdgeFunc MSEdge::myFunction
protected

◆ myID

std::string Named::myID
protectedinherited

◆ myLaneChanger

MSLaneChanger* MSEdge::myLaneChanger
protected

This member will do the lane-change.

Definition at line 761 of file MSEdge.h.

Referenced by buildLaneChanger(), changeLanes(), hasLaneChanger(), and ~MSEdge().

◆ myLanes

◆ myLastFailedInsertionTime

SUMOTime MSEdge::myLastFailedInsertionTime
mutableprotected

The time of last insertion failure.

Definition at line 770 of file MSEdge.h.

Referenced by getLastFailedInsertionTime(), insertVehicle(), and setLastFailedInsertionTime().

◆ myLength

double MSEdge::myLength
protected

the length of the edge (cached value for speedup)

Definition at line 825 of file MSEdge.h.

Referenced by getDepartPosBound(), getFreeLane(), getLength(), insertVehicle(), and recalcCache().

◆ myMinimumPermissions

SVCPermissions MSEdge::myMinimumPermissions
protected

The intersection of lane permissions for this edge.

Definition at line 807 of file MSEdge.h.

Referenced by allowedLanes(), and rebuildAllowedLanes().

◆ myNumericalID

const int MSEdge::myNumericalID
protected

This edge's numerical id.

Definition at line 755 of file MSEdge.h.

Referenced by getNumericalID().

◆ myOppositingSuperposableEdge

const MSEdge* MSEdge::myOppositingSuperposableEdge
private

the oppositing superposble edge

Definition at line 869 of file MSEdge.h.

Referenced by checkAndRegisterBiDirEdge(), and getMyOppositeSuperposableEdge().

◆ myPersons

std::set<MSTransportable*> MSEdge::myPersons
mutableprotected

Persons on the edge for drawing and pushbutton.

Definition at line 791 of file MSEdge.h.

Referenced by addPerson(), GUIEdge::drawGL(), getPersons(), getSortedPersons(), and removePerson().

◆ myPredecessors

MSEdgeVector MSEdge::myPredecessors
protected

The preceeding edges.

Definition at line 784 of file MSEdge.h.

Referenced by addSuccessor(), closeBuilding(), GUIEdge::getBoundary(), getNormalBefore(), getNumPredecessors(), and getPredecessors().

◆ myPriority

const int MSEdge::myPriority
protected

the priority of the edge (used during network creation)

Definition at line 819 of file MSEdge.h.

Referenced by getPriority().

◆ myStreetName

std::string MSEdge::myStreetName
protected

the real-world name of this edge (need not be unique)

Definition at line 813 of file MSEdge.h.

Referenced by GUIEdge::drawGL(), and getStreetName().

◆ mySublaneSides

std::vector<double> MSEdge::mySublaneSides
protected

the right side for each sublane on this edge

Definition at line 840 of file MSEdge.h.

Referenced by getSubLaneSides(), and initialize().

◆ mySuccessors

MSEdgeVector MSEdge::mySuccessors
protected

The succeeding edges.

Definition at line 781 of file MSEdge.h.

Referenced by addSuccessor(), closeBuilding(), GUIEdge::getBoundary(), getNumSuccessors(), and getSuccessors().

◆ myTazBoundary

Boundary MSEdge::myTazBoundary
protected

The bounding rectangle of incoming or outgoing edges for taz connectors.

Definition at line 864 of file MSEdge.h.

Referenced by addSuccessor(), and getDistanceTo().

◆ myToJunction

MSJunction* MSEdge::myToJunction
protected

Definition at line 788 of file MSEdge.h.

Referenced by checkAndRegisterBiDirEdge(), getToJunction(), and setJunctions().

◆ myVaporizationRequests

int MSEdge::myVaporizationRequests
protected

Vaporizer counter.

Definition at line 767 of file MSEdge.h.

Referenced by decVaporization(), incVaporization(), and isVaporizing().

◆ myWidth

double MSEdge::myWidth
protected

Edge width [m].

Definition at line 822 of file MSEdge.h.

Referenced by getWidth(), and initialize().


The documentation for this class was generated from the following files: