|
SUMO - Simulation of Urban MObility
|
A single signal group, may control several connections. More...
#include <NBLoadedTLDef.h>
Data Structures | |
| class | phase_by_time_sorter |
| Sorts phases by their begin time. More... | |
| class | PhaseDef |
| Definition of a single, loaded phase. More... | |
Public Member Functions | |
| void | addConnection (const NBConnection &c) throw () |
| Inserts a controlled connection. | |
| void | addPhaseBegin (SUMOTime time, TLColor color) throw () |
| Sets the begin of a phase. | |
| bool | containsConnection (NBEdge *from, NBEdge *to) const throw () |
| Returns whether the given connection is controlled by this signal. | |
| bool | containsIncoming (NBEdge *from) const throw () |
| Returns whether this signal controls the given edge. | |
| bool | containsOutgoing (NBEdge *to) const throw () |
| Returns whether this signal controls a connection where the given edge is the destination. | |
| const NBConnection & | getConnection (unsigned int pos) const throw () |
| Returns the connection at the given index. | |
| const std::string & | getID () const |
| Returns the id. | |
| unsigned int | getLinkNo () const throw () |
| Returns the number of links (connection) controlled by this signal. | |
| DoubleVector | getTimes (SUMOTime cycleDuration) const throw () |
| Returns the times at which the signal switches. | |
| bool | hasYellow (SUMOTime time) const throw () |
| Returns whether controlled links have yellow at the given time. | |
| bool | mayDrive (SUMOTime time) const throw () |
| Returns whether vehicles on controlled links may drive at the given time. | |
| void | patchTYellow (SUMOTime tyellow) throw () |
| Sets the yellow time. | |
| void | remap (NBEdge *removed, int removedLane, NBEdge *by, int byLane) throw () |
| Replaces a removed edge/lane. | |
| void | remapIncoming (NBEdge *which, const EdgeVector &by) throw (ProcessError) |
| Replaces the given incoming edge by the others given. | |
| void | remapOutgoing (NBEdge *which, const EdgeVector &by) throw (ProcessError) |
| Replaces the given outgoing edge by the others given. | |
| void | setID (const std::string &newID) |
| resets the id | |
| void | setYellowTimes (SUMOTime tRedYellowe, SUMOTime tYellow) throw () |
| Sets the times for redyellow and yellow. | |
| SignalGroup (const std::string &id) throw () | |
| Constructor. | |
| void | sortPhases () throw () |
| Sorts the phases. | |
| ~SignalGroup () throw () | |
| Destructor. | |
Protected Attributes | |
| std::string | myID |
| The name of the object. | |
Private Attributes | |
| NBConnectionVector | myConnections |
| Connections controlled by this signal. | |
| std::vector< PhaseDef > | myPhases |
| The phases of this signal. | |
| SUMOTime | myTRedYellow |
| The times of redyellow and yellow. | |
| SUMOTime | myTYellow |
A single signal group, may control several connections.
Definition at line 52 of file NBLoadedTLDef.h.
| NBLoadedTLDef::SignalGroup::SignalGroup | ( | const std::string & | id | ) | throw () |
Constructor.
| [in] | id | The id of the signal group |
Definition at line 52 of file NBLoadedTLDef.cpp.
| NBLoadedTLDef::SignalGroup::~SignalGroup | ( | ) | throw () |
Destructor.
Definition at line 55 of file NBLoadedTLDef.cpp.
| void NBLoadedTLDef::SignalGroup::addConnection | ( | const NBConnection & | c | ) | throw () |
Inserts a controlled connection.
| [in] | c | The connection to be controlled by this signal group |
Definition at line 58 of file NBLoadedTLDef.cpp.
Sets the begin of a phase.
| [in] | time | The time at which the phase starts |
| [in] | color | The color of this signal starting at the given time |
Definition at line 65 of file NBLoadedTLDef.cpp.
Returns whether the given connection is controlled by this signal.
| [in] | from | The connection's start edge |
| [in] | from | The connection's end edge |
Definition at line 146 of file NBLoadedTLDef.cpp.
Returns whether this signal controls the given edge.
| [in] | from | The incoming edge |
Definition at line 165 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::remapRemoved(), and NBLoadedTLDef::replaceRemoved().
Returns whether this signal controls a connection where the given edge is the destination.
| [in] | from | The outgoing edge |
Definition at line 199 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::remapRemoved(), and NBLoadedTLDef::replaceRemoved().
| const NBConnection & NBLoadedTLDef::SignalGroup::getConnection | ( | unsigned int | pos | ) | const throw () |
Returns the connection at the given index.
| [in] | pos | The position within this signal |
Definition at line 158 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::buildPhaseState(), NBLoadedTLDef::collectNodes(), NBLoadedTLDef::mustBrake(), and NBLoadedTLDef::setTLControllingInformation().
| 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(), 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().
| unsigned int NBLoadedTLDef::SignalGroup::getLinkNo | ( | ) | const throw () |
Returns the number of links (connection) controlled by this signal.
Definition at line 119 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::buildPhaseState(), NBLoadedTLDef::collectNodes(), NBLoadedTLDef::mustBrake(), and NBLoadedTLDef::setTLControllingInformation().
| DoubleVector NBLoadedTLDef::SignalGroup::getTimes | ( | SUMOTime | cycleDuration | ) | const throw () |
Returns the times at which the signal switches.
| [in] | cycleDuration | The duration of the complete cycle |
Definition at line 95 of file NBLoadedTLDef.cpp.
References SUMOReal, and NBTrafficLightDefinition::TLCOLOR_RED.
Referenced by NBLoadedTLDef::myCompute().
Returns whether controlled links have yellow at the given time.
| [in] | time | The regarded time |
Definition at line 138 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::buildPhaseState().
Returns whether vehicles on controlled links may drive at the given time.
| [in] | time | The regarded time |
Definition at line 125 of file NBLoadedTLDef.cpp.
References NBTrafficLightDefinition::TLCOLOR_GREEN.
Referenced by NBLoadedTLDef::buildPhaseState().
| void NBLoadedTLDef::SignalGroup::patchTYellow | ( | SUMOTime | tyellow | ) | throw () |
Sets the yellow time.
| [in] | tyellow | The yellow time to set |
Definition at line 86 of file NBLoadedTLDef.cpp.
References Named::getID(), and WRITE_WARNING.
Referenced by NBLoadedTLDef::myCompute().
| void NBLoadedTLDef::SignalGroup::remap | ( | NBEdge * | removed, |
| int | removedLane, | ||
| NBEdge * | by, | ||
| int | byLane | ||
| ) | throw () |
Replaces a removed edge/lane.
| [in] | removed | The edge to replace |
| [in] | removedLane | The lane of this edge to replace |
| [in] | by | The edge to insert instead |
| [in] | byLane | This edge's lane to insert instead |
Definition at line 233 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::replaceRemoved().
| void NBLoadedTLDef::SignalGroup::remapIncoming | ( | NBEdge * | which, |
| const EdgeVector & | by | ||
| ) | throw (ProcessError) |
Replaces the given incoming edge by the others given.
| [in] | which | The edge to replace |
| [in] | by | The replacements |
Definition at line 176 of file NBLoadedTLDef.cpp.
References NBConnection::replaceFrom().
Referenced by NBLoadedTLDef::remapRemoved().
| void NBLoadedTLDef::SignalGroup::remapOutgoing | ( | NBEdge * | which, |
| const EdgeVector & | by | ||
| ) | throw (ProcessError) |
Replaces the given outgoing edge by the others given.
| [in] | which | The edge to replace |
| [in] | by | The replacements |
Definition at line 210 of file NBLoadedTLDef.cpp.
References NBConnection::replaceTo().
Referenced by NBLoadedTLDef::remapRemoved().
| void Named::setID | ( | const std::string & | newID | ) | [inline, inherited] |
Sets the times for redyellow and yellow.
| [in] | tRedYellowe | The duration of the redyellow phase |
| [in] | tYellow | The duration of the yellow phase |
Definition at line 71 of file NBLoadedTLDef.cpp.
| void NBLoadedTLDef::SignalGroup::sortPhases | ( | ) | throw () |
Sorts the phases.
Definition at line 79 of file NBLoadedTLDef.cpp.
Referenced by NBLoadedTLDef::myCompute().
Connections controlled by this signal.
Definition at line 192 of file NBLoadedTLDef.h.
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().
std::vector<PhaseDef> NBLoadedTLDef::SignalGroup::myPhases [private] |
The phases of this signal.
Definition at line 194 of file NBLoadedTLDef.h.
The times of redyellow and yellow.
Definition at line 196 of file NBLoadedTLDef.h.
Definition at line 196 of file NBLoadedTLDef.h.