|
SUMO - Simulation of Urban MObility
|
A lane area vehicles can halt at. More...
#include <MSBusStop.h>
Public Member Functions | |
| void | enter (void *what, SUMOReal beg, SUMOReal end) throw () |
| Called if a vehicle enters this stop. | |
| SUMOReal | getBeginLanePosition () const throw () |
| Returns the begin position of this bus stop. | |
| SUMOReal | getEndLanePosition () const throw () |
| Returns the end position of this bus stop. | |
| const std::string & | getID () const |
| Returns the id. | |
| const MSLane & | getLane () const throw () |
| Returns the lane this bus stop is located at. | |
| SUMOReal | getLastFreePos () const throw () |
| Returns the last free position on this stop. | |
| void | leaveFrom (void *what) throw () |
| Called if a vehicle leaves this stop. | |
| MSBusStop (const std::string &id, const std::vector< std::string > &lines, MSLane &lane, SUMOReal begPos, SUMOReal endPos) throw () | |
| Constructor. | |
| void | setID (const std::string &newID) |
| resets the id | |
| virtual | ~MSBusStop () throw () |
| Destructor. | |
Protected Member Functions | |
| void | computeLastFreePos () throw () |
| Computes the last free position on this stop. | |
Protected Attributes | |
| SUMOReal | myBegPos |
| The begin position this bus stop is located at. | |
| SUMOReal | myEndPos |
| The end position this bus stop is located at. | |
| std::map< void *, std::pair < SUMOReal, SUMOReal > > | myEndPositions |
| A map from objects (vehicles) to the areas they acquire after entering the stop. | |
| std::string | myID |
| The name of the object. | |
| MSLane & | myLane |
| The lane this bus stop is located at. | |
| SUMOReal | myLastFreePos |
| The last free position at this stop (variable) | |
| std::vector< std::string > | myLines |
| The list of lines that are assigned to this stop. | |
Private Member Functions | |
| MSBusStop (const MSBusStop &) | |
| Invalidated copy constructor. | |
| MSBusStop & | operator= (const MSBusStop &) |
| Invalidated assignment operator. | |
A lane area vehicles can halt at.
The bus stops tracks the last free space a vehicle may halt at by being informed about a vehicle's entering and depart. It keeps the information about entered vehicles' begin and end position within an internal container ("myEndPositions") and is so able to compute the last free space.
Please note that using the last free space disallows vehicles to enter a free space in between other vehicles.
Definition at line 59 of file MSBusStop.h.
| MSBusStop::MSBusStop | ( | const std::string & | id, |
| const std::vector< std::string > & | lines, | ||
| MSLane & | lane, | ||
| SUMOReal | begPos, | ||
| SUMOReal | endPos | ||
| ) | throw () |
Constructor.
| [in] | id | The id of the bus stop |
| [in] | net | The net the bus stop belongs to |
| [in] | lines | Names of the bus lines that halt on this bus stop |
| [in] | lane | The lane the bus stop is placed on |
| [in] | begPos | Begin position of the bus stop on the lane |
| [in] | endPos | End position of the bus stop on the lane |
Definition at line 42 of file MSBusStop.cpp.
| MSBusStop::~MSBusStop | ( | ) | throw () [virtual] |
Destructor.
Definition at line 52 of file MSBusStop.cpp.
| MSBusStop::MSBusStop | ( | const MSBusStop & | ) | [private] |
Invalidated copy constructor.
| void MSBusStop::computeLastFreePos | ( | ) | throw () [protected] |
Computes the last free position on this stop.
The last free position is the one, the last vehicle ends at. It is stored in myLastFreePos. If no vehicle halts, the last free position gets the value of myEndPos.
Definition at line 95 of file MSBusStop.cpp.
References myEndPos, myEndPositions, and myLastFreePos.
| void MSBusStop::enter | ( | void * | what, |
| SUMOReal | beg, | ||
| SUMOReal | end | ||
| ) | throw () |
Called if a vehicle enters this stop.
Stores the position of the entering vehicle in myEndPositions.
Recomputes the free space using "computeLastFreePos" then.
| [in] | what | The vehicle that enters the bus stop |
| [in] | beg | The begin halting position of the vehicle |
| [in] | what | The end halting position of the vehicle |
Definition at line 74 of file MSBusStop.cpp.
Referenced by MSVehicle::processNextStop().
| SUMOReal MSBusStop::getBeginLanePosition | ( | ) | const throw () |
Returns the begin position of this bus stop.
Definition at line 62 of file MSBusStop.cpp.
References myBegPos.
Referenced by MSRouteHandler::addStop(), and MSVehicle::processNextStop().
| SUMOReal MSBusStop::getEndLanePosition | ( | ) | const throw () |
Returns the end position of this bus stop.
Definition at line 68 of file MSBusStop.cpp.
References myEndPos.
Referenced by MSRouteHandler::addStop(), and MSNet::getBusStopID().
| const std::string& Named::getID | ( | ) | const [inline, inherited] |
Returns the id.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 59 of file Named.h.
References Named::myID.
Referenced by RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NLHandler::addConnection(), NBLoadedSUMOTLDef::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), NIImporter_SUMO::addPhase(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), RORouteDef_Complete::buildCurrentRoute(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSVTypeProbe::execute(), Command_SaveTLSSwitches::execute(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSUnboundActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NIImporter_SUMO::initTrafficLightLogic(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), Named::ComparatorIdLess::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(), NBLoadedTLDef::SignalGroup::patchTYellow(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), NWWriter_SUMO::prohibitionConnection(), NBNodeCont::remapEdge(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeDummyEdges(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBConnection::replaceFrom(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NBOwnTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), and MSRouteProbe::writeXMLOutput().
| const MSLane & MSBusStop::getLane | ( | ) | const throw () |
Returns the lane this bus stop is located at.
Definition at line 56 of file MSBusStop.cpp.
References myLane.
Referenced by MSRouteHandler::addStop(), and MSNet::getBusStopID().
| SUMOReal MSBusStop::getLastFreePos | ( | ) | const throw () |
Returns the last free position on this stop.
Definition at line 81 of file MSBusStop.cpp.
References myLastFreePos.
Referenced by MSVehicle::moveRegardingCritical(), MSVehicle::processNextStop(), and MSVehicle::vsafeCriticalCont().
| void MSBusStop::leaveFrom | ( | void * | what | ) | throw () |
Called if a vehicle leaves this stop.
Removes the position of the vehicle from myEndPositions.
Recomputes the free space using "computeLastFreePos" then.
| [in] | what | The vehicle that leaves the bus stop |
Definition at line 87 of file MSBusStop.cpp.
Referenced by MSVehicle::processNextStop().
| void Named::setID | ( | const std::string & | newID | ) | [inline, inherited] |
SUMOReal MSBusStop::myBegPos [protected] |
The begin position this bus stop is located at.
Definition at line 154 of file MSBusStop.h.
Referenced by getBeginLanePosition().
SUMOReal MSBusStop::myEndPos [protected] |
The end position this bus stop is located at.
Definition at line 157 of file MSBusStop.h.
Referenced by computeLastFreePos(), and getEndLanePosition().
std::map<void*, std::pair<SUMOReal, SUMOReal> > MSBusStop::myEndPositions [protected] |
A map from objects (vehicles) to the areas they acquire after entering the stop.
Definition at line 148 of file MSBusStop.h.
Referenced by computeLastFreePos().
std::string Named::myID [protected, inherited] |
The name of the object.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 81 of file Named.h.
Referenced by RORouteDef_OrigDest::buildCurrentRoute(), RORouteDef_Complete::buildCurrentRoute(), RORouteDef_Alternatives::buildCurrentRoute(), NBEdge::computeEdgeShape(), Named::getID(), NBEdge::getLaneID(), MSRoute::release(), Named::setID(), NBEdge::splitGeometry(), NBNode::writeLogic(), and MSMeanData::writeXMLOutput().
MSLane& MSBusStop::myLane [protected] |
The lane this bus stop is located at.
Definition at line 151 of file MSBusStop.h.
Referenced by getLane().
SUMOReal MSBusStop::myLastFreePos [protected] |
The last free position at this stop (variable)
Definition at line 160 of file MSBusStop.h.
Referenced by computeLastFreePos(), and getLastFreePos().
std::vector<std::string> MSBusStop::myLines [protected] |
The list of lines that are assigned to this stop.
Definition at line 145 of file MSBusStop.h.