SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSEdge Class Reference

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

#include <MSEdge.h>

Inheritance diagram for MSEdge:
Named Parameterised GUIEdge

Data Structures

class  by_id_sorter
 Sorts edges by their ids. More...
 
class  container_by_position_sorter
 Sorts containers by their positions. More...
 
class  person_by_offset_sorter
 Sorts persons 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,
AllowedLanesCont
ClassedAllowedLanesCont
 Map from vehicle types to lanes that may be used to reach one of the next edges. More...
 
enum  EdgeBasicFunction {
  EDGEFUNCTION_UNKNOWN = -1, EDGEFUNCTION_NORMAL = 0, EDGEFUNCTION_CONNECTOR = 1, EDGEFUNCTION_INTERNAL = 2,
  EDGEFUNCTION_DISTRICT = 3, EDGEFUNCTION_CROSSING = 4, EDGEFUNCTION_WALKINGAREA = 5
}
 Defines possible edge types. More...
 

Public Member Functions

virtual void addContainer (MSContainer *container) const
 Add a container to myContainers. More...
 
void addParameter (const std::string &key, const std::string &value)
 Adds a parameter. More...
 
void addParameter (const std::map< std::string, std::string > &mapArg)
 Adds all given parameter. More...
 
void addParameter (const Parameterised &p)
 Adds all given parameter. More...
 
virtual void addPerson (MSPerson *p) const
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
virtual void changeLanes (SUMOTime t)
 Performs lane changing on this edge. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
void closeBuilding ()
 
SUMOReal getCurrentTravelTime (const SUMOReal minSpeed=NUMERICAL_EPS) const
 Computes and returns the current travel time for this edge. More...
 
SUMOReal getDistanceTo (const MSEdge *other) const
 optimistic air distance heuristic for use in routing More...
 
const std::string & getID () const
 Returns the id. More...
 
SUMOReal getLength () const
 return the length of the edge More...
 
const std::map< std::string,
std::string > & 
getMap () const
 Returns the inner key/value map. More...
 
SUMOReal getMinimumTravelTime (const SUMOVehicle *const veh) const
 returns the minimum travel time for the given vehicle 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
 
SUMOReal 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...
 
SUMOReal getVehicleMaxSpeed (const SUMOVehicle *const veh) const
 Returns the maximum speed the vehicle may use on this edge. More...
 
void initialize (const std::vector< MSLane * > *lanes)
 Initialize the edge. More...
 
bool isRoundabout () const
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
void markAsRoundabout ()
 
void markDelayed () const
 
 MSEdge (const std::string &id, int numericalID, const EdgeBasicFunction 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 (MSContainer *container) const
 Remove container from myContainers. More...
 
virtual void removePerson (MSPerson *p) const
 
void setID (const std::string &newID)
 resets the id More...
 
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...
 
std::vector< MSPerson * > getSortedPersons (SUMOTime timestep) const
 Returns this edge's persons sorted by pos. More...
 
std::vector< MSContainer * > getSortedContainers (SUMOTime timestep) 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
EdgeBasicFunction getPurpose () const
 Returns the edge type (EdgeBasicFunction) 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...
 
bool isWalkingArea () const
 return whether this edge is walking area More...
 
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...
 
const MSEdgeVectorgetIncomingEdges () const
 Returns the list of edges from which this edge may be reached. More...
 
unsigned 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...
 
unsigned int getNumPredecessors () const
 Returns the number of edges this edge is connected to. More...
 
const MSEdgeVectorgetPredecessors () const
 Returns the edge at the given position from the list of reachable edges. More...
 
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
 Tries to insert the given vehicle into the network. More...
 
MSLanegetFreeLane (const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) 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 MSEdgedictionary (size_t index)
 Returns the MSEdge at the index. More...
 
static size_t dictSize ()
 Returns the number of edges. More...
 
static SUMOReal getTravelTimeStatic (const MSEdge *const edge, const SUMOVehicle *const veh, SUMOReal 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 size_t numericalDictSize ()
 Returns the number of edges with a numerical id. 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 Types

typedef std::map
< SUMOVehicleClass,
MSEdgeVector
ClassesSuccesorMap
 The successors available for a given vClass. 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...
 

Protected Attributes

bool myAmDelayed
 whether this edge had a vehicle with less than max speed on it More...
 
bool myAmRoundabout
 whether this edge belongs to a roundabout More...
 
ClassesSuccesorMap myClassesSuccessorMap
 
std::set< MSContainer * > myContainers
 Containers on the edge. More...
 
std::string myEdgeType
 the type of the edge (optionally used during network creation) More...
 
SUMOReal myEmptyTraveltime
 the traveltime on the empty edge (cached value for speedup) More...
 
MSJunctionmyFromJunction
 the junctions for this edge More...
 
const EdgeBasicFunction 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...
 
SUMOReal myLength
 the length of the edge (cached value for speedup) More...
 
const int myNumericalID
 This edge's numerical id. More...
 
std::set< MSPerson * > myPersons
 Persons on the edge (only for drawing) 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...
 
MSEdgeVector mySuccessors
 The succeeding edges. More...
 
MSJunctionmyToJunction
 
int myVaporizationRequests
 Vaporizer counter. 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

 MSEdge (const MSEdge &)
 Invalidated copy constructor. More...
 
MSEdgeoperator= (const MSEdge &)
 assignment operator. 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 81 of file MSEdge.h.

Member Typedef Documentation

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

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

Definition at line 109 of file MSEdge.h.

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

Definition at line 112 of file MSEdge.h.

The successors available for a given vClass.

Definition at line 794 of file MSEdge.h.

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

definition of the static dictionary type

Definition at line 779 of file MSEdge.h.

Member Enumeration Documentation

Defines possible edge types.

For different purposes, it is necessary to know whether the edge is a normal street or something special.

Enumerator
EDGEFUNCTION_UNKNOWN 

The purpose of the edge is not known.

EDGEFUNCTION_NORMAL 

The edge is a normal street.

EDGEFUNCTION_CONNECTOR 

The edge is a macroscopic connector (source/sink)

EDGEFUNCTION_INTERNAL 

The edge is an internal edge.

EDGEFUNCTION_DISTRICT 

The edge is a district edge.

EDGEFUNCTION_CROSSING 

The edge is a pedestrian crossing (a special type of internal edge)

EDGEFUNCTION_WALKINGAREA 

The edge is a pedestrian walking area (a special type of internal edge)

Definition at line 90 of file MSEdge.h.

Constructor & Destructor Documentation

MSEdge::MSEdge ( const std::string &  id,
int  numericalID,
const EdgeBasicFunction  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 73 of file MSEdge.cpp.

MSEdge::~MSEdge ( )
virtual

Destructor.

Definition at line 91 of file MSEdge.cpp.

References myAllowed, myClassedAllowed, myLaneChanger, and myLanes.

MSEdge::MSEdge ( const MSEdge )
private

Invalidated copy constructor.

Member Function Documentation

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

Add a container to myContainers.

Reimplemented in GUIEdge.

Definition at line 568 of file MSEdge.h.

References myContainers.

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

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

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

virtual void MSEdge::addPerson ( MSPerson p) const
inlinevirtual
void MSEdge::addSuccessor ( MSEdge edge)
inline

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 291 of file MSEdge.h.

References myPredecessors, and mySuccessors.

Referenced by NLHandler::addDistrict().

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

Adds this object to the given container.

Parameters
in,filled]cont The container to add this item to

Definition at line 121 of file Named.h.

References Named::StoringVisitor::add().

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 217 of file MSEdge.cpp.

Referenced by allowedLanes(), MSVehicleTransfer::checkInsertions(), getDepartLane(), getFreeLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), getSuccessors(), MSLane::by_connections_to_sorter::operator()(), and MSVehicle::updateBestLanes().

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 223 of file MSEdge.cpp.

References allowedLanes().

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 239 of file MSEdge.cpp.

References getAllowedLanesWithDefault(), myAllowed, myClassedAllowed, and myMinimumPermissions.

void MSEdge::changeLanes ( SUMOTime  t)
virtual
void MSEdge::clear ( )
static

Clears the dictionary.

Definition at line 577 of file MSEdge.cpp.

References myDict.

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

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

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 129 of file MSEdge.cpp.

References MSLane::getEdge(), myAllowed, myLanes, myPredecessors, mySuccessors, and rebuildAllowedLanes().

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 285 of file MSEdge.cpp.

References myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer().

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

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

Definition at line 547 of file MSEdge.cpp.

References myDict.

MSEdge * MSEdge::dictionary ( size_t  index)
static

Returns the MSEdge at the index.

Definition at line 558 of file MSEdge.cpp.

References myEdges.

size_t MSEdge::dictSize ( )
static

Returns the number of edges.

Definition at line 565 of file MSEdge.cpp.

References myDict.

Referenced by GUIEdge::fill(), MSPModel_Striping::initWalkingAreaPaths(), GUIApplicationWindow::onCmdEditChosen(), and MSStateHandler::saveState().

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 229 of file MSEdge.cpp.

Referenced by allowedLanes().

SUMOReal MSEdge::getCurrentTravelTime ( const SUMOReal  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 501 of file MSEdge.cpp.

References getLength(), MSGlobals::gUseMesoSim, MAX2(), myAmDelayed, myEmptyTraveltime, myLanes, and SUMOReal.

Referenced by MSVehicleTransfer::add(), MSVehicleTransfer::checkInsertions(), TraCIServerAPI_Edge::processGet(), and MSFullExport::writeEdge().

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 312 of file MSEdge.cpp.

References allowedLanes(), MSRoute::begin(), 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(), getFreeLane(), MSBaseVehicle::getParameter(), RandHelper::getRandomFrom(), MSBaseVehicle::getRoute(), MSVehicleType::getVehicleClass(), MSBaseVehicle::getVehicleType(), myLanes, MSRoute::size(), SUMOReal, and MSVehicle::updateBestLanes().

Referenced by insertVehicle().

SUMOReal 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 624 of file MSEdge.cpp.

References Position::distanceTo2D(), getFromJunction(), getLanes(), MSJunction::getPosition(), and getToJunction().

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

Returns the type of the edge.

Definition at line 270 of file MSEdge.h.

References myEdgeType.

Referenced by GUILane::getParameterWindow().

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

Finds the emptiest lane allowing the vehicle class.

The emptiest lane is the one with the fewest vehicles on. 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
Returns
the least occupied lane
See also
allowedLanes

Definition at line 292 of file MSEdge.cpp.

References allowedLanes(), max, and SUMOReal.

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

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

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBEdge::addSidewalk(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBNode::buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), insertVehicle(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), 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()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_JE2013::wantsChange(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), 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_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

const MSEdgeVector& MSEdge::getIncomingEdges ( ) const
inline

Returns the list of edges from which this edge may be reached.

Returns
Edges from which this edge may be reached

Definition at line 300 of file MSEdge.h.

References myPredecessors.

Referenced by NLEdgeControlBuilder::build(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::getLogicalPredecessorLane(), and MSPModel_Striping::initWalkingAreaPaths().

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

Returns this edge's lanes.

Returns
This edge's lanes

Definition at line 186 of file MSEdge.h.

References myLanes.

Referenced by MSLCM_JE2013::_patchSpeed(), MSLCM_LC2013::_patchSpeed(), MSVehicleTransfer::add(), NLHandler::addConnection(), MSBaseVehicle::calculateArrivalPos(), MSEdgeControl::changeLanes(), MSVehicleTransfer::checkInsertions(), MSRouteHandler::closeVehicle(), CState::computeTranshipTime(), GUILane::drawMarkings(), MSCalibrator::execute(), MS_E2_ZS_CollectorOverLanes::extendTo(), getDistanceTo(), MSPerson::MSPersonStage::getEdgeAngle(), MSContainer::MSContainerStage::getEdgeAngle(), GUILane::getEdgeLaneNumber(), MSPerson::MSPersonStage::getEdgePosition(), MSContainer::MSContainerStage::getEdgePosition(), TraCIServerAPI_Simulation::getLaneChecking(), MSVehicle::getLaneIndex(), GUIEdge::getPopUpMenu(), GUIContainer::getPosition(), MSVehicle::getPosition(), TraCIServerAPI_Edge::getShape(), MSPModel::getSidewalk(), getSpeedLimit(), GUIEdge::getTotalLength(), getVehicleMaxSpeed(), GUICalibrator::GUICalibrator(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), MSVehicle::Influencer::influenceChangeDecision(), GUINet::initGUIStructures(), MSCalibrator::invalidJam(), GUISUMOViewParent::isSelected(), MSCalibrator::MSCalibrator(), MSRouteProbe::MSRouteProbe(), MSLCM_DK2008::patchSpeed(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Vehicle::processSet(), MSCalibrator::remainingVehicleCapacity(), MSVehicle::updateBestLanes(), TraCIServerAPI_Vehicle::vtdMap(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), and MSMeanData::writeEdge().

SUMOTime MSEdge::getLastFailedInsertionTime ( ) const
inline

Returns the last time a vehicle could not be inserted.

Returns
The current value

Definition at line 486 of file MSEdge.h.

References myLastFailedInsertionTime.

Referenced by MSInsertionControl::checkCandidates().

const std::map<std::string, std::string>& Parameterised::getMap ( ) const
inlineinherited
SUMOReal MSEdge::getMinimumTravelTime ( const SUMOVehicle *const  veh) const
inline

returns the minimum travel time for the given vehicle

Definition at line 410 of file MSEdge.h.

References getLength(), SUMOVehicle::getMaxSpeed(), getSpeedLimit(), getVehicleMaxSpeed(), and MIN2().

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

int MSEdge::getNumericalID ( ) const
inline

Returns the numerical id of the edge.

Returns
This edge's numerical id

Definition at line 257 of file MSEdge.h.

References myNumericalID.

Referenced by MSEdgeControl::changeLanes(), dictionary(), MSMeanData_Amitran::getEdgeID(), and MSDevice_Routing::getEffort().

unsigned 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 331 of file MSEdge.h.

References myPredecessors.

Referenced by MSRouteHandler::parseFromViaTo().

unsigned 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 308 of file MSEdge.h.

References mySuccessors.

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

SVCPermissions MSEdge::getPermissions ( ) const
inline

Definition at line 518 of file MSEdge.h.

References myCombinedPermissions.

const MSEdgeVector& MSEdge::getPredecessors ( ) const
inline

Returns the edge at the given position from the list of reachable edges.

Parameters
[in]posThe position of the list within the list of approached
Returns
The following edge, stored at position pos

Definition at line 340 of file MSEdge.h.

References myPredecessors.

int MSEdge::getPriority ( ) const
inline

Returns the priority of the edge.

Definition at line 276 of file MSEdge.h.

References myPriority.

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

std::vector< MSContainer * > MSEdge::getSortedContainers ( SUMOTime  timestep) const

Returns this edge's containers sorted by pos.

Returns
This edge's containers sorted by pos

Definition at line 656 of file MSEdge.cpp.

References myContainers.

Referenced by MSXMLRawOut::writeEdge().

std::vector< MSPerson * > MSEdge::getSortedPersons ( SUMOTime  timestep) const

Returns this edge's persons sorted by pos.

Returns
This edge's persons sorted by pos

Definition at line 648 of file MSEdge.cpp.

References myPersons.

Referenced by MSXMLRawOut::writeEdge().

SUMOReal MSEdge::getSpeedLimit ( ) const

Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be the fastest edge.

Returns
The maximum speed allowed on this edge

Definition at line 634 of file MSEdge.cpp.

References getLanes().

Referenced by GUIApplicationWindow::checkGamingEvents(), getMinimumTravelTime(), insertVehicle(), MSCalibrator::invalidJam(), recalcCache(), MSCalibrator::remainingVehicleCapacity(), and MSMeanData::writeEdge().

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

Returns the street name of the edge.

Definition at line 264 of file MSEdge.h.

References myStreetName.

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

const MSEdgeVector& MSEdge::getSuccessors ( ) const
inline

Returns the following edges.

Definition at line 315 of file MSEdge.h.

References mySuccessors.

Referenced by NLEdgeControlBuilder::build(), MSLane::getInternalFollower(), and MSPModel_Striping::initWalkingAreaPaths().

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 684 of file MSEdge.cpp.

References allowedLanes(), myClassesSuccessorMap, mySuccessors, and SVC_IGNORING.

static SUMOReal MSEdge::getTravelTimeStatic ( const MSEdge *const  edge,
const SUMOVehicle *const  veh,
SUMOReal  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 426 of file MSEdge.h.

References MSNet::getInstance(), and MSNet::getTravelTime().

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

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

Note that the vehicle's max. speed is not considered herein, only the edge's speed limit and the driver's adaptation of this speed. Only the first lane is considered

Returns
The maximum velocity on this edge for the given vehicle

Definition at line 641 of file MSEdge.cpp.

References getLanes().

Referenced by getMinimumTravelTime(), insertVehicle(), and MSDevice_Tripinfo::notifyMove().

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 278 of file MSEdge.cpp.

References myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer().

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 EDGEFUNCTION_DISTRICT, OptionsCont::getOptions(), myCombinedPermissions, myFunction, myLaneChanger, myLanes, recalcCache(), and SVCAll.

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

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

Inserts IDs of all known edges into the given vector.

Definition at line 586 of file MSEdge.cpp.

References myDict.

Referenced by TraCIServerAPI_Edge::processGet().

bool MSEdge::insertVehicle ( SUMOVehicle v,
SUMOTime  time,
const bool  checkOnly = 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
Returns
Whether the vehicle could be inserted
See also
MSLane::insertVehicle

Definition at line 367 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, EDGEFUNCTION_DISTRICT, MSLane::getBruttoOccupancy(), getDepartLane(), SUMOVehicle::getEdge(), Named::getID(), SUMOVehicle::getID(), getLength(), MSVehicleType::getLengthWithGap(), SUMOVehicle::getParameter(), getPurpose(), MSVehicleType::getSpeedDeviation(), MSVehicleType::getSpeedFactor(), getSpeedLimit(), getVehicleMaxSpeed(), SUMOVehicle::getVehicleType(), MSGlobals::gUseMesoSim, SUMOVehicleParameter::id, MSLane::insertVehicle(), isVaporizing(), myLanes, myLength, RandHelper::rand(), SUMOVehicle::setChosenSpeedFactor(), SUMOReal, toString(), UNUSED_PARAMETER, and WRITE_WARNING.

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

bool MSEdge::isCrossing ( ) const
inline

return whether this edge is a pedestrian crossing

Definition at line 245 of file MSEdge.h.

References EDGEFUNCTION_CROSSING, and myFunction.

Referenced by MSPModel_Striping::getNextLane().

bool MSEdge::isInternal ( ) const
inline

return whether this edge is an internal edge

Definition at line 240 of file MSEdge.h.

References EDGEFUNCTION_INTERNAL, and myFunction.

Referenced by NLEdgeControlBuilder::build(), MSDevice_Tripinfo::generateOutput(), MSPModel_Striping::getNextLane(), and MSLink::setRequestInformation().

bool MSEdge::isRoundabout ( ) const
inline

Definition at line 580 of file MSEdge.h.

References myAmRoundabout.

Referenced by MSVehicle::checkRewindLinkLanes(), and MSVehicle::executeMove().

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 368 of file MSEdge.h.

References myVaporizationRequests.

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

bool MSEdge::isWalkingArea ( ) const
inline
bool Parameterised::knowsParameter ( const std::string &  key) const
inherited

Returns whether the parameter is known.

Parameters
[in]keyThe key to ask for
Returns
Whether the key is known

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSDevice_Example::buildVehicleDevices(), and MSDevice::equippedByDefaultAssignmentOptions().

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 190 of file MSEdge.cpp.

References parallelLane().

void MSEdge::markAsRoundabout ( )
inline

Definition at line 584 of file MSEdge.h.

References myAmRoundabout.

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

void MSEdge::markDelayed ( ) const
inline

Definition at line 588 of file MSEdge.h.

References myAmDelayed.

Referenced by MSLane::incorporateVehicle(), and MSLane::integrateNewVehicle().

size_t MSEdge::numericalDictSize ( )
static

Returns the number of edges with a numerical id.

Definition at line 571 of file MSEdge.cpp.

References myEdges.

Referenced by MSNet::getRouterEffort(), MSNet::getRouterTT(), and MSDevice_Routing::reroute().

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

assignment operator.

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 202 of file MSEdge.cpp.

References myLanes.

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

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 594 of file MSEdge.cpp.

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

Referenced by MSStateHandler::myStartElement(), MSRouteHandler::myStartElement(), MSRouteHandler::openRoute(), MSRouteHandler::parseFromViaTo(), and TraCIServerAPI_Vehicle::processSet().

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 609 of file MSEdge.cpp.

References dictionary().

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

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

Definition at line 510 of file MSEdge.h.

References MSVehicleType::getVehicleClass(), SUMOVehicle::getVehicleType(), and myCombinedPermissions.

void MSEdge::recalcCache ( )

Recalculates the cached values.

Definition at line 122 of file MSEdge.cpp.

References getSpeedLimit(), MAX2(), myEmptyTraveltime, myLanes, myLength, and NUMERICAL_EPS.

Referenced by initialize(), MSLane::setLength(), and MSLane::setMaxSpeed().

virtual void MSEdge::removeContainer ( MSContainer container) const
inlinevirtual
virtual void MSEdge::removePerson ( MSPerson p) const
inlinevirtual
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 196 of file MSEdge.cpp.

References parallelLane().

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

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

Definition at line 354 of file MSEdge.h.

References myFromJunction, and myToJunction.

Referenced by NLHandler::myEndElement().

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 494 of file MSEdge.h.

References myLastFailedInsertionTime.

Field Documentation

AllowedLanesCont MSEdge::myAllowed
protected

Associative container from destination-edge to allowed-lanes.

Definition at line 742 of file MSEdge.h.

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

bool MSEdge::myAmDelayed
mutableprotected

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

Definition at line 770 of file MSEdge.h.

Referenced by getCurrentTravelTime(), and markDelayed().

bool MSEdge::myAmRoundabout
protected

whether this edge belongs to a roundabout

Definition at line 773 of file MSEdge.h.

Referenced by isRoundabout(), and markAsRoundabout().

ClassedAllowedLanesCont MSEdge::myClassedAllowed
mutableprotected

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

Definition at line 746 of file MSEdge.h.

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

ClassesSuccesorMap MSEdge::myClassesSuccessorMap
mutableprotected

Definition at line 795 of file MSEdge.h.

Referenced by getSuccessors(), and rebuildAllowedLanes().

SVCPermissions MSEdge::myCombinedPermissions
protected

The union of lane permissions for this edge.

Definition at line 751 of file MSEdge.h.

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

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

Containers on the edge.

Definition at line 736 of file MSEdge.h.

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

MSEdge::DictType MSEdge::myDict
staticprotected

Static dictionary to associate string-ids with objects.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 784 of file MSEdge.h.

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

MSEdgeVector MSEdge::myEdges
staticprotected

Static list of edges.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 789 of file MSEdge.h.

Referenced by dictionary(), and numericalDictSize().

std::string MSEdge::myEdgeType
protected

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

Definition at line 758 of file MSEdge.h.

Referenced by getEdgeType().

SUMOReal MSEdge::myEmptyTraveltime
protected

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

Definition at line 767 of file MSEdge.h.

Referenced by getCurrentTravelTime(), and recalcCache().

MSJunction* MSEdge::myFromJunction
protected

the junctions for this edge

Definition at line 729 of file MSEdge.h.

Referenced by getFromJunction(), and setJunctions().

const EdgeBasicFunction MSEdge::myFunction
protected

the purpose of the edge

Definition at line 714 of file MSEdge.h.

Referenced by changeLanes(), GUIEdge::drawGL(), getPurpose(), initialize(), isCrossing(), isInternal(), and isWalkingArea().

MSLaneChanger* MSEdge::myLaneChanger
protected

This member will do the lane-change.

Definition at line 711 of file MSEdge.h.

Referenced by changeLanes(), initialize(), and ~MSEdge().

const std::vector<MSLane*>* MSEdge::myLanes
protected

Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane, the higher the container-index.

Definition at line 708 of file MSEdge.h.

Referenced by changeLanes(), closeBuilding(), GUIEdge::drawGL(), GUIEdge::getBoundary(), getCurrentTravelTime(), getDepartLane(), getLanes(), GUIEdge::getParameterWindow(), initialize(), insertVehicle(), parallelLane(), rebuildAllowedLanes(), recalcCache(), and ~MSEdge().

SUMOTime MSEdge::myLastFailedInsertionTime
mutableprotected

The time of last insertion failure.

Definition at line 720 of file MSEdge.h.

Referenced by getLastFailedInsertionTime(), and setLastFailedInsertionTime().

SUMOReal MSEdge::myLength
protected

the length of the edge (cached value for speedup)

Definition at line 764 of file MSEdge.h.

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

SVCPermissions MSEdge::myMinimumPermissions
protected

The intersection of lane permissions for this edge.

Definition at line 749 of file MSEdge.h.

Referenced by allowedLanes(), and rebuildAllowedLanes().

const int MSEdge::myNumericalID
protected

This edge's numerical id.

Definition at line 705 of file MSEdge.h.

Referenced by getNumericalID().

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

Persons on the edge (only for drawing)

Definition at line 733 of file MSEdge.h.

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

MSEdgeVector MSEdge::myPredecessors
protected

The preceeding edges.

Definition at line 726 of file MSEdge.h.

Referenced by addSuccessor(), closeBuilding(), getIncomingEdges(), getNumPredecessors(), and getPredecessors().

const int MSEdge::myPriority
protected

the priority of the edge (used during network creation)

Definition at line 761 of file MSEdge.h.

Referenced by getPriority().

std::string MSEdge::myStreetName
protected

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

Definition at line 755 of file MSEdge.h.

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

MSEdgeVector MSEdge::mySuccessors
protected

The succeeding edges.

Definition at line 723 of file MSEdge.h.

Referenced by addSuccessor(), closeBuilding(), getNumSuccessors(), and getSuccessors().

MSJunction* MSEdge::myToJunction
protected

Definition at line 730 of file MSEdge.h.

Referenced by getToJunction(), and setJunctions().

int MSEdge::myVaporizationRequests
protected

Vaporizer counter.

Definition at line 717 of file MSEdge.h.

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


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