SUMO - Simulation of Urban MObility
|
A road/street connecting two junctions. More...
#include <MSEdge.h>
Data Structures | |
class | by_id_sorter |
Sorts edges by their ids. 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 } |
Defines possible edge types. More... | |
Public Member Functions | |
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=0.00001) 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... | |
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 (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... | |
bool | laneChangeAllowed () const |
whether lane changing may be performed on this edge More... | |
void | markAsRoundabout () |
MSEdge (const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName="") | |
Constructor. More... | |
bool | prohibits (const SUMOVehicle *const vehicle) const |
Returns whether the vehicle (class) is not allowed on the edge. More... | |
void | rebuildAllowedLanes () |
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 | |
MSLane * | leftLane (const MSLane *const lane) const |
Returns the lane left to the one given, 0 if the given lane is leftmost. More... | |
MSLane * | rightLane (const MSLane *const lane) const |
Returns the lane right to the one given, 0 if the given lane is rightmost. More... | |
MSLane * | 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. More... | |
const std::vector< MSLane * > & | getLanes () const |
Returns this edge's lanes. More... | |
const std::vector< MSLane * > * | allowedLanes (const MSEdge &destination, SUMOVehicleClass vclass=SVC_UNKNOWN) const |
Get the allowed lanes to reach the destination-edge. More... | |
const std::vector< MSLane * > * | allowedLanes (SUMOVehicleClass vclass=SVC_UNKNOWN) 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... | |
int | getNumericalID () const |
Returns the numerical id of the edge. More... | |
const std::string & | getStreetName () const |
Returns the street name of the edge. More... | |
Access to succeeding/predecessing edges | |
void | addFollower (MSEdge *edge) |
Returns the list of edges which may be reached from this edge. More... | |
const std::vector< MSEdge * > & | getIncomingEdges () const |
Returns the list of edges from which this edge may be reached. More... | |
unsigned int | getNoFollowing () const |
Returns the number of edges that may be reached from this edge. More... | |
const MSEdge * | getFollower (unsigned int n) const |
Returns the n-th of the following edges. More... | |
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 |
Tries to insert the given vehicle into the network. More... | |
MSLane * | getFreeLane (const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const |
Finds the emptiest lane allowing the vehicle class. More... | |
MSLane * | getDepartLane (const 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 MSEdge * | dictionary (const std::string &id) |
Returns the MSEdge associated to the key id if exists, otherwise returns 0. More... | |
static MSEdge * | dictionary (size_t index) |
Returns the MSEdge at the index. More... | |
static size_t | dictSize () |
Returns the number of edges. 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, std::vector< const MSEdge * > &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, std::vector< const MSEdge * > &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_UNKNOWN) 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 | myAmRoundabout |
whether this edge belongs to a roundabout More... | |
const EdgeBasicFunction | myFunction |
the purpose of the edge More... | |
std::string | myID |
The name of the object. More... | |
MSLaneChanger * | myLaneChanger |
This member will do the lane-change. More... | |
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... | |
int | myNumericalID |
This edge's numerical id. More... | |
std::set< MSPerson * > | myPersons |
Persons on the edge (only for drawing) More... | |
std::vector< MSEdge * > | myPredeccesors |
The preceeding edges. More... | |
std::string | myStreetName |
the real-world name of this edge (need not be unique) More... | |
std::vector< MSEdge * > | mySuccessors |
The succeeding edges. More... | |
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... | |
MSEdge & | operator= (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 std::vector< MSEdge * > | myEdges |
Static list of edges. More... | |
A road/street connecting two junctions.
A single connection between two junctions. Holds lanes which are reponsible for vehicle movements.
typedef std::map< const MSEdge*, std::vector<MSLane*>* > MSEdge::AllowedLanesCont |
typedef std::map< SUMOVehicleClass, AllowedLanesCont > MSEdge::ClassedAllowedLanesCont |
|
protected |
Defines possible edge types.
For different purposes, it is necessary to know whether the edge is a normal street or something special.
MSEdge::MSEdge | ( | const std::string & | id, |
int | numericalID, | ||
const EdgeBasicFunction | function, | ||
const std::string & | streetName = "" |
||
) |
Constructor.
After calling this constructor, the edge is not yet initialised completely. A call to "initialize" with proper values is needed for this.
[in] | id | The id of the edge |
[in] | numericalID | The numerical id (index) of the edge |
[in] | function | A basic type of the edge |
[in] | streetName | The street name for that edge |
Definition at line 70 of file MSEdge.cpp.
|
virtual |
Destructor.
Definition at line 78 of file MSEdge.cpp.
References myAllowed, myClassedAllowed, myLaneChanger, and myLanes.
|
private |
Invalidated copy constructor.
|
inline |
Returns the list of edges which may be reached from this edge.
Definition at line 232 of file MSEdge.h.
References mySuccessors.
Referenced by NLHandler::addDistrict().
|
inherited |
Adds a parameter.
[in] | key | The parameter's name |
[in] | value | The parameter's value |
Definition at line 53 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by NLHandler::addParam(), SUMORouteHandler::addParam(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NBTrafficLightDefinition::compute(), NIImporter_OpenDrive::loadNetwork(), and NIImporter_MATSim::EdgesHandler::myStartElement().
|
inherited |
Adds all given parameter.
[in] | mapArg | The keys/values to insert |
Definition at line 59 of file Parameterised.cpp.
References Parameterised::myMap.
|
inherited |
Adds all given parameter.
[in] | p | The keys/values to insert |
Definition at line 67 of file Parameterised.cpp.
References Parameterised::myMap.
|
inlinevirtual |
Definition at line 437 of file MSEdge.h.
References myPersons.
Referenced by GUIEdge::addPerson(), MSPerson::MSPersonStage_Driving::proceed(), and MSPerson::MSPersonStage_Waiting::proceed().
|
inlineinherited |
Adds this object to the given container.
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_UNKNOWN |
||
) | 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.
[in] | destination | The edge to reach |
[in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 213 of file MSEdge.cpp.
Referenced by allowedLanes(), MSVehicleTransfer::checkInsertions(), MSVehicle::getBestLanes(), getDepartLane(), getFreeLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), and MSLane::by_connections_to_sorter::operator()().
const std::vector< MSLane * > * MSEdge::allowedLanes | ( | SUMOVehicleClass | vclass = SVC_UNKNOWN | ) | 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.
[in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 219 of file MSEdge.cpp.
References allowedLanes().
|
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.
[in] | destination | The edge to reach |
[in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 235 of file MSEdge.cpp.
References getAllowedLanesWithDefault(), myAllowed, myClassedAllowed, and myMinimumPermissions.
|
virtual |
Performs lane changing on this edge.
Definition at line 405 of file MSEdge.cpp.
References MSLaneChanger::laneChange(), laneChangeAllowed(), and myLaneChanger.
Referenced by MSEdgeControl::changeLanes().
|
static |
Clears the dictionary.
Definition at line 511 of file MSEdge.cpp.
References myDict.
Referenced by MSNet::clearAll(), and MSVehicle::getBestLanes().
|
inherited |
Clears the parameter map.
Definition at line 91 of file Parameterised.cpp.
References Parameterised::myMap.
void MSEdge::closeBuilding | ( | ) |
Definition at line 128 of file MSEdge.cpp.
References MSLane::getEdge(), myAllowed, myLanes, myPredeccesors, mySuccessors, and rebuildAllowedLanes().
Disables vaporization.
The internal vaporization counter is decreased what disables the vaporization if it was only once enabled. Called from the event handler.
[in] | t | The current time (unused) |
ProcessError | not thrown by this method, just derived |
Definition at line 281 of file MSEdge.cpp.
References myVaporizationRequests.
Referenced by NLTriggerBuilder::buildVaporizer().
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false.
Definition at line 465 of file MSEdge.cpp.
References getNumericalID(), myDict, and myEdges.
Referenced by NLHandler::addConnection(), NLHandler::addDistrict(), NLHandler::addDistrictEdge(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), NLHandler::addRoundabout(), NLEdgeControlBuilder::beginEdgeParsing(), NLTriggerBuilder::buildVaporizer(), MSDevice_Routing::buildVehicleDevices(), NLHandler::closeEdge(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), NLDetectorBuilder::getEdgeChecking(), TraCIServerAPI_Simulation::getLaneChecking(), TraCIServerAPI_Edge::getShape(), MSRouteHandler::myStartElement(), MSStateHandler::myStartElement(), MSTriggeredRerouter::myStartElement(), GUIApplicationWindow::onCmdEditChosen(), NLTriggerBuilder::parseAndBuildRerouter(), parseEdgesList(), MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Route::processSet(), TraCIServerAPI_Vehicle::processSet(), MSBaseVehicle::reroute(), MSStateHandler::saveState(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
static |
Returns the MSEdge associated to the key id if exists, otherwise returns 0.
Definition at line 481 of file MSEdge.cpp.
References myDict.
|
static |
|
static |
Returns the number of edges.
Definition at line 499 of file MSEdge.cpp.
References myDict.
Referenced by GUIEdge::fill(), GUIApplicationWindow::onCmdEditChosen(), and MSStateHandler::saveState().
|
protected |
lookup in map and return 0 if not found
Definition at line 225 of file MSEdge.cpp.
Referenced by allowedLanes().
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.
[in] | minSpeed | The minimumSpeed to assume if traffic on this edge is stopped |
Definition at line 437 of file MSEdge.cpp.
References getLength(), MSGlobals::gUseMesoSim, MAX2(), myLanes, and SUMOReal.
Referenced by MSVehicleTransfer::addVeh(), MSVehicleTransfer::checkInsertions(), TraCIServerAPI_Edge::processGet(), and MSFullExport::writeEdge().
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.
[in] | veh | The vehicle to get the depart lane for |
Definition at line 307 of file MSEdge.cpp.
References allowedLanes(), MSRoute::begin(), DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_DEFAULT, 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(), and SUMOReal.
Referenced by insertVehicle().
optimistic air distance heuristic for use in routing
[in] | other | The edge to which the distance shall be returned |
Definition at line 558 of file MSEdge.cpp.
References getLanes().
Returns the n-th of the following edges.
[in] | n | The index within following edges of the edge to return |
Definition at line 257 of file MSEdge.h.
References mySuccessors.
Referenced by MSLane::getInternalFollower(), and MSRouteHandler::myStartElement().
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.
[in] | allowed | The lanes to choose from |
[in] | vclass | The vehicle class to look for |
Definition at line 288 of file MSEdge.cpp.
References allowedLanes(), and MSLane::getVehicleNumber().
Referenced by MSVehicleTransfer::checkInsertions(), and getDepartLane().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicleTransfer::addVeh(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), RODFNet::getDetectorEdge(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSCalibrator::MSCalibrator(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::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(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), 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(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_JE2013::wantsChange(), MSFCDExport::write(), MSEmissionExport::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(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Returns the list of edges from which this edge may be reached.
Definition at line 240 of file MSEdge.h.
References myPredeccesors.
Referenced by MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), and MSLane::getLogicalPredecessorLane().
|
inline |
Returns this edge's lanes.
Definition at line 168 of file MSEdge.h.
References myLanes.
Referenced by MSLCM_JE2013::_patchSpeed(), MSLCM_LC2013::_patchSpeed(), NLHandler::addConnection(), MSVehicleTransfer::addVeh(), MSBaseVehicle::calculateArrivalPos(), MSEdgeControl::changeLanes(), MSVehicleTransfer::checkInsertions(), MSPerson::MSPersonStage_Walking::computeWalkingTime(), MSCalibrator::execute(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSVehicle::getBestLanes(), getDistanceTo(), MSPerson::MSPersonStage::getEdgeAngle(), GUILane::getEdgeLaneNumber(), MSPerson::MSPersonStage::getEdgePosition(), TraCIServerAPI_Simulation::getLaneChecking(), MSVehicle::getLaneIndex(), getLength(), GUIEdge::getPopUpMenu(), MSVehicle::getPosition(), TraCIServerAPI_Edge::getShape(), getSpeedLimit(), 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(), TraCIServerAPI_Vehicle::vtdMap_matchingNearest(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), and MSMeanData::writeEdge().
|
inline |
Returns the last time a vehicle could not be inserted.
Definition at line 373 of file MSEdge.h.
References myLastFailedInsertionTime.
SUMOReal MSEdge::getLength | ( | ) | const |
return the length of the edge
Definition at line 568 of file MSEdge.cpp.
References getLanes().
Referenced by NLTriggerBuilder::buildCalibrator(), MSVehicle::getBestLanes(), getCurrentTravelTime(), MSPerson::MSPersonStage_Driving::getEdgePos(), getMinimumTravelTime(), GUIEdge::getParameterWindow(), insertVehicle(), MSCalibrator::MSCalibrator(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSCalibrator::remainingVehicleCapacity(), and MSMeanData::writeEdge().
|
inlineinherited |
Returns the inner key/value map.
Definition at line 106 of file Parameterised.h.
References Parameterised::myMap.
Referenced by NBTrafficLightDefinition::compute(), GUIVehicle::getParameterWindow(), and PCPolyContainer::save().
|
inline |
returns the minimum travel time for the given vehicle
Definition at line 312 of file MSEdge.h.
References getLength(), SUMOVehicle::getMaxSpeed(), getSpeedLimit(), getVehicleMaxSpeed(), and MIN2().
Referenced by MSDevice_Routing::getEffort(), and MSNet::getTravelTime().
|
inline |
Returns the number of edges that may be reached from this edge.
Definition at line 248 of file MSEdge.h.
References mySuccessors.
Referenced by MSRouteHandler::myStartElement().
|
inline |
Returns the numerical id of the edge.
Definition at line 212 of file MSEdge.h.
References myNumericalID.
Referenced by MSEdgeControl::changeLanes(), and dictionary().
|
inherited |
Returns the value for a given key.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Definition at line 81 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
inline |
Returns the edge type (EdgeBasicFunction)
Definition at line 204 of file MSEdge.h.
References myFunction.
Referenced by MSLCM_JE2013::_wantsChange(), MSLCM_LC2013::_wantsChange(), MSLane::appropriate(), MSVehicle::checkRewindLinkLanes(), GUILane::drawGL(), MSVehicle::enterLaneAtMove(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), GUIEdge::getIDs(), MSLane::getInternalFollower(), MSLink::lastWasContMajor(), MSLCM_DK2008::patchSpeed(), MSVehicle::planMoveInternal(), MSLane::succLinkSec(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingNearest(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_DK2008::wantsChangeToLeft(), and MSLCM_DK2008::wantsChangeToRight().
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.
Definition at line 574 of file MSEdge.cpp.
References getLanes().
Referenced by getMinimumTravelTime(), MSCalibrator::invalidJam(), MSCalibrator::remainingVehicleCapacity(), and MSMeanData::writeEdge().
|
inline |
Returns the street name of the edge.
Definition at line 219 of file MSEdge.h.
References myStreetName.
Referenced by GUIEdge::drawGL(), and GUILane::getParameterWindow().
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
Definition at line 581 of file MSEdge.cpp.
References getLanes().
Referenced by getMinimumTravelTime().
Enables vaporization.
The internal vaporization counter is increased enabling the vaporization. Called from the event handler.
[in] | t | The current time (unused) |
ProcessError | not thrown by this method, just derived |
Definition at line 274 of file MSEdge.cpp.
References myVaporizationRequests.
Referenced by NLTriggerBuilder::buildVaporizer().
void MSEdge::initialize | ( | std::vector< MSLane * > * | lanes | ) |
Initialize the edge.
[in] | allowed | Information which edges may be reached from which lanes |
[in] | lanes | List of this edge's lanes |
Definition at line 94 of file MSEdge.cpp.
References EDGEFUNCTION_DISTRICT, OptionsCont::getOptions(), myCombinedPermissions, myFunction, myLaneChanger, myLanes, and SVCFreeForAll.
Referenced by NLHandler::addDistrict(), and NLEdgeControlBuilder::closeEdge().
|
static |
Inserts IDs of all known edges into the given vector.
Definition at line 520 of file MSEdge.cpp.
References myDict.
Referenced by TraCIServerAPI_Edge::processGet().
bool MSEdge::insertVehicle | ( | SUMOVehicle & | v, |
SUMOTime | time | ||
) | 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.
[in] | v | The vehicle to insert |
[in] | time | The current simulation time |
Definition at line 354 of file MSEdge.cpp.
References DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, getDepartLane(), SUMOVehicle::getID(), getLength(), SUMOVehicle::getParameter(), MSGlobals::gUseMesoSim, MSLane::insertVehicle(), isVaporizing(), RandHelper::rand(), SUMOReal, toString(), UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by MSCalibrator::execute().
|
inline |
Definition at line 448 of file MSEdge.h.
References myAmRoundabout.
Referenced by MSVehicle::checkRewindLinkLanes().
|
inline |
Returns whether vehicles on this edge shall be vaporized.
Definition at line 270 of file MSEdge.h.
References myVaporizationRequests.
Referenced by MSVehicle::executeMove(), MSLane::executeMovements(), and insertVehicle().
|
inherited |
Returns whether the parameter is known.
[in] | key | The key to ask for |
Definition at line 75 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
bool MSEdge::laneChangeAllowed | ( | ) | const |
whether lane changing may be performed on this edge
Definition at line 107 of file MSEdge.cpp.
References EDGEFUNCTION_INTERNAL, MSLinkContHelper::getConnectingLink(), MSLane::getLogicalPredecessorLane(), MSLink::havePriority(), myFunction, and myLanes.
Referenced by changeLanes().
Returns the lane left to the one given, 0 if the given lane is leftmost.
[in] | lane | The lane right to the one to be returned |
Definition at line 186 of file MSEdge.cpp.
References parallelLane().
|
inline |
Definition at line 452 of file MSEdge.h.
References myAmRoundabout.
Referenced by NLHandler::addRoundabout().
|
static |
Returns the number of edges with a numerical id.
Definition at line 505 of file MSEdge.cpp.
References myEdges.
Referenced by MSDevice_Routing::getRouter(), MSNet::getRouterEffort(), and MSNet::getRouterTT().
Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist.
[in] | lane | The base lane |
[in] | offset | The offset of the result lane |
Definition at line 198 of file MSEdge.cpp.
References myLanes.
Referenced by MSLane::getParallelLane(), leftLane(), and rightLane().
|
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.
[in] | desc | The string containing space-separated edge ids |
[out] | into | The vector to fill |
[in] | rid | The id of the route these description belongs to; used for error message generation |
ProcessError | If one of the strings contained is not a known edge id |
Definition at line 528 of file MSEdge.cpp.
References BinaryFormatter::BF_ROUTE, StringTokenizer::getVector(), and FileHelpers::readEdgeVector().
Referenced by MSRouteHandler::myStartElement(), MSStateHandler::myStartElement(), MSRouteHandler::openRoute(), and TraCIServerAPI_Vehicle::processSet().
|
static |
Parses the given string vector assuming it edge ids.
[in] | desc | The string vector containing edge ids |
[out] | into | The vector to fill |
[in] | rid | The id of the route these description belongs to; used for error message generation |
ProcessError | If one of the strings contained is not a known edge id |
Definition at line 543 of file MSEdge.cpp.
References dictionary().
|
inline |
Returns whether the vehicle (class) is not allowed on the edge.
Definition at line 397 of file MSEdge.h.
References MSVehicleType::getVehicleClass(), SUMOVehicle::getVehicleType(), and myCombinedPermissions.
void MSEdge::rebuildAllowedLanes | ( | ) |
Definition at line 165 of file MSEdge.cpp.
References myClassedAllowed, myCombinedPermissions, myLanes, myMinimumPermissions, and SVCFreeForAll.
Referenced by closeBuilding(), TraCIServerAPI_Edge::processSet(), and TraCIServerAPI_Lane::processSet().
|
inlinevirtual |
Definition at line 441 of file MSEdge.h.
References myPersons.
Referenced by MSPersonControl::abortWaiting(), MSPersonControl::boardAnyWaiting(), MSPerson::MSPersonStage_Walking::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), and GUIEdge::removePerson().
Returns the lane right to the one given, 0 if the given lane is rightmost.
[in] | lane | The lane left to the one to be returned |
Definition at line 192 of file MSEdge.cpp.
References parallelLane().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 68 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
inline |
Sets the last time a vehicle could not be inserted.
[in] | time | the new value |
Definition at line 381 of file MSEdge.h.
References myLastFailedInsertionTime.
|
protected |
Associative container from destination-edge to allowed-lanes.
Definition at line 574 of file MSEdge.h.
Referenced by allowedLanes(), closeBuilding(), and ~MSEdge().
|
protected |
whether this edge belongs to a roundabout
Definition at line 590 of file MSEdge.h.
Referenced by isRoundabout(), and markAsRoundabout().
|
mutableprotected |
From vehicle class to lanes allowed to be used by it.
Definition at line 578 of file MSEdge.h.
Referenced by allowedLanes(), rebuildAllowedLanes(), and ~MSEdge().
|
protected |
The union of lane permissions for this edge.
Definition at line 583 of file MSEdge.h.
Referenced by initialize(), prohibits(), and rebuildAllowedLanes().
|
staticprotected |
Static dictionary to associate string-ids with objects.
Definition at line 601 of file MSEdge.h.
Referenced by clear(), dictionary(), dictSize(), GUIEdge::fill(), GUIEdge::getIDs(), and insertIDs().
|
staticprotected |
Static list of edges.
Definition at line 606 of file MSEdge.h.
Referenced by dictionary(), and numericalDictSize().
|
protected |
the purpose of the edge
Definition at line 553 of file MSEdge.h.
Referenced by GUIEdge::drawGL(), getPurpose(), initialize(), and laneChangeAllowed().
|
protectedinherited |
The name of the object.
Definition at line 128 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), NBNode::computeNodeShape(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
protected |
This member will do the lane-change.
Definition at line 550 of file MSEdge.h.
Referenced by changeLanes(), initialize(), and ~MSEdge().
|
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 547 of file MSEdge.h.
Referenced by closeBuilding(), GUIEdge::drawGL(), GUIEdge::getBoundary(), getCurrentTravelTime(), getDepartLane(), getLanes(), GUIEdge::getParameterWindow(), initialize(), laneChangeAllowed(), parallelLane(), rebuildAllowedLanes(), and ~MSEdge().
|
mutableprotected |
The time of last insertion failure.
Definition at line 559 of file MSEdge.h.
Referenced by getLastFailedInsertionTime(), and setLastFailedInsertionTime().
|
protected |
The intersection of lane permissions for this edge.
Definition at line 581 of file MSEdge.h.
Referenced by allowedLanes(), and rebuildAllowedLanes().
|
protected |
|
mutableprotected |
Persons on the edge (only for drawing)
Definition at line 568 of file MSEdge.h.
Referenced by addPerson(), GUIEdge::drawGL(), and removePerson().
|
protected |
The preceeding edges.
Definition at line 565 of file MSEdge.h.
Referenced by closeBuilding(), and getIncomingEdges().
|
protected |
the real-world name of this edge (need not be unique)
Definition at line 587 of file MSEdge.h.
Referenced by GUIEdge::drawGL(), and getStreetName().
|
protected |
The succeeding edges.
Definition at line 562 of file MSEdge.h.
Referenced by addFollower(), closeBuilding(), getFollower(), and getNoFollowing().
|
protected |
Vaporizer counter.
Definition at line 556 of file MSEdge.h.
Referenced by decVaporization(), incVaporization(), and isVaporizing().