SUMO - Simulation of Urban MObility
|
An actuated (adaptive) traffic light logic. More...
#include <MSActuatedTrafficLightLogic.h>
Public Types | |
typedef std::map< MSLane *, MSInductLoop * > | InductLoopMap |
Definition of a map from lanes to induct loops lying on them. More... | |
Structure definitions | |
typedef std::vector < MSPhaseDefinition * > | Phases |
Definition of a list of phases, being the junction logic. More... | |
typedef std::vector< MSLink * > | LinkVector |
Definition of the list of links that participate in this tl-light. More... | |
typedef std::vector< LinkVector > | LinkVectorVector |
Definition of a list that holds lists of links that do have the same attribute. More... | |
typedef std::vector< MSLane * > | LaneVector |
Definition of the list of links that participate in this tl-light. More... | |
typedef std::vector< LaneVector > | LaneVectorVector |
Definition of a list that holds lists of links that do have the same attribute. 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... | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
void | clearParameter () |
Clears the parameter map. More... | |
const std::string & | getID () const |
Returns the id. More... | |
const std::map< std::string, std::string > & | getMap () const |
Returns the inner key/value map. More... | |
const std::string & | getParameter (const std::string &key, const std::string &defaultValue) const |
Returns the value for a given key. More... | |
void | init (NLDetectorBuilder &nb) |
Initialises the tls with information about incoming lanes. More... | |
bool | knowsParameter (const std::string &key) const |
Returns whether the parameter is known. More... | |
MSActuatedTrafficLightLogic (MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const MSSimpleTrafficLightLogic::Phases &phases, unsigned int step, SUMOTime delay, const std::map< std::string, std::string > ¶meter) | |
Constructor. More... | |
void | setID (const std::string &newID) |
resets the id More... | |
~MSActuatedTrafficLightLogic () | |
Destructor. More... | |
Switching and setting current rows | |
SUMOTime | trySwitch (bool isActive) |
Switches to the next phase. More... | |
Static Information Retrieval | |
unsigned int | getPhaseNumber () const |
Returns the number of phases. More... | |
const Phases & | getPhases () const |
Returns the phases of this tls program. More... | |
Phases & | getPhases () |
Returns the phases of this tls program. More... | |
const MSPhaseDefinition & | getPhase (unsigned int givenstep) const |
Returns the definition of the phase from the given position within the plan. More... | |
Dynamic Information Retrieval | |
unsigned int | getCurrentPhaseIndex () const |
Returns the current index within the program. More... | |
const MSPhaseDefinition & | getCurrentPhaseDef () const |
Returns the definition of the current phase. More... | |
Conversion between time and phase | |
SUMOTime | getPhaseIndexAtTime (SUMOTime simStep) const |
Returns the index of the logic at the given simulation step. More... | |
SUMOTime | getOffsetFromIndex (unsigned int index) const |
Returns the position (start of a phase during a cycle) from of a given step. More... | |
unsigned int | getIndexFromOffset (SUMOTime offset) const |
Returns the step (the phasenumber) of a given position of the cycle. More... | |
Changing phases and phase durations | |
void | changeStepAndDuration (MSTLLogicControl &tlcontrol, SUMOTime simStep, unsigned int step, SUMOTime stepDuration) |
Changes the current phase and her duration. More... | |
void | setPhases (const Phases &phases, unsigned int index) |
Replaces the phases and set the phase index. More... | |
Handling of controlled links | |
void | addLink (MSLink *link, MSLane *lane, unsigned int pos) |
Adds a link on building. More... | |
virtual void | adaptLinkInformationFrom (const MSTrafficLightLogic &logic) |
Applies information about controlled links and lanes from the given logic. More... | |
std::map< MSLink *, LinkState > | collectLinkStates () const |
Returns the (uncontrolled) states of the controlled links. More... | |
void | resetLinkStates (const std::map< MSLink *, LinkState > &vals) const |
Resets the states of controlled links. More... | |
Switching and setting current rows | |
bool | setTrafficLightSignals (SUMOTime t) const |
Applies the current signal states to controlled links. More... | |
Static Information Retrieval | |
const std::string & | getProgramID () const |
Returns this tl-logic's id. More... | |
const LaneVectorVector & | getLanes () const |
Returns the list of lists of all lanes controlled by this tls. More... | |
const LaneVector & | getLanesAt (unsigned int i) const |
Returns the list of lanes that are controlled by the signals at the given position. More... | |
const LinkVectorVector & | getLinks () const |
Returns the list of lists of all affected links. More... | |
const LinkVector & | getLinksAt (unsigned int i) const |
Returns the list of links that are controlled by the signals at the given position. More... | |
int | getLinkIndex (const MSLink *const link) const |
Returns the index of the given link. More... | |
Dynamic Information Retrieval | |
SUMOTime | getDefaultCycleTime () const |
Returns the cycle time (in ms) More... | |
SUMOTime | getNextSwitchTime () const |
Returns the assumed next switch time. More... | |
Changing phases and phase durations | |
void | addOverridingDuration (SUMOTime duration) |
Changes the duration of the next phase. More... | |
void | setCurrentDurationIncrement (SUMOTime delay) |
Delays current phase by the given delay. More... | |
Protected Member Functions | |
"actuated" algorithm methods | |
SUMOTime | duration () const |
Returns the duration of the given step. More... | |
void | gapControl () |
Decides, whether a phase should be continued by checking the gaps of vehicles having green. More... | |
Protected Attributes | |
bool | myContinue |
information whether the current phase should be lenghtend More... | |
SUMOTime | myCurrentDurationIncrement |
A value for enlarge the current duration. More... | |
SUMOTime | myDefaultCycleTime |
The cycle time (without changes) More... | |
SUMOReal | myDetectorGap |
The detector distance. More... | |
std::string | myID |
The name of the object. More... | |
InductLoopMap | myInductLoops |
A map from lanes to induct loops lying on them. More... | |
LaneVectorVector | myLanes |
The list of links which do participate in this traffic light. More... | |
LinkVectorVector | myLinks |
The list of links which do participate in this traffic light. More... | |
SUMOReal | myMaxGap |
The maximum gap to check. More... | |
std::vector< SUMOTime > | myOverridingTimes |
A list of duration overrides. More... | |
SUMOReal | myPassingTime |
The passing time used. More... | |
Phases | myPhases |
The list of phases this logic uses. More... | |
std::string | myProgramID |
The id of the logic. More... | |
unsigned int | myStep |
The current step. More... | |
SwitchCommand * | mySwitchCommand |
The current switch command. More... | |
An actuated (adaptive) traffic light logic.
Definition at line 57 of file MSActuatedTrafficLightLogic.h.
typedef std::map<MSLane*, MSInductLoop*> MSActuatedTrafficLightLogic::InductLoopMap |
Definition of a map from lanes to induct loops lying on them.
Definition at line 60 of file MSActuatedTrafficLightLogic.h.
|
inherited |
Definition of the list of links that participate in this tl-light.
Definition at line 78 of file MSTrafficLightLogic.h.
|
inherited |
Definition of a list that holds lists of links that do have the same attribute.
Definition at line 81 of file MSTrafficLightLogic.h.
|
inherited |
Definition of the list of links that participate in this tl-light.
Definition at line 72 of file MSTrafficLightLogic.h.
|
inherited |
Definition of a list that holds lists of links that do have the same attribute.
Definition at line 75 of file MSTrafficLightLogic.h.
|
inherited |
Definition of a list of phases, being the junction logic.
Definition at line 69 of file MSTrafficLightLogic.h.
MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic | ( | MSTLLogicControl & | tlcontrol, |
const std::string & | id, | ||
const std::string & | programID, | ||
const MSSimpleTrafficLightLogic::Phases & | phases, | ||
unsigned int | step, | ||
SUMOTime | delay, | ||
const std::map< std::string, std::string > & | parameter | ||
) |
Constructor.
[in] | tlcontrol | The tls control responsible for this tls |
[in] | id | This tls' id |
[in] | programID | This tls' sub-id (program id) |
[in] | phases | Definitions of the phases |
[in] | step | The initial phase index |
[in] | delay | The time to wait before the first switch |
[in] | parameter | The parameter to use for tls set-up |
Definition at line 64 of file MSActuatedTrafficLightLogic.cpp.
References TplConvert::_2SUMOReal(), DEFAULT_DETECTOR_GAP, DEFAULT_MAX_GAP, DEFAULT_PASSING_TIME, Parameterised::getParameter(), myDetectorGap, myMaxGap, and myPassingTime.
MSActuatedTrafficLightLogic::~MSActuatedTrafficLightLogic | ( | ) |
Destructor.
Definition at line 109 of file MSActuatedTrafficLightLogic.cpp.
References myInductLoops.
|
virtualinherited |
Applies information about controlled links and lanes from the given logic.
If we load a logic after the network has been loaded, we do not get the information about controlled links afterwards. We have to copy them from a previously loaded logic.
[in] | logic | The logic to use the information about controlled links/lanes from |
Reimplemented in MSOffTrafficLightLogic.
Definition at line 146 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLanes, and MSTrafficLightLogic::myLinks.
Referenced by MSOffTrafficLightLogic::adaptLinkInformationFrom(), and MSTLLogicControl::TLSLogicVariants::addLogic().
Adds a link on building.
[in] | link | The controlled link |
[in] | lane | The lane this link starts at |
[in] | pos | The link's index (signal group) within this program |
Definition at line 128 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::getCurrentPhaseDef(), MSNet::getInstance(), MSTrafficLightLogic::myLanes, MSTrafficLightLogic::myLinks, and MSLink::setTLState().
|
inherited |
Changes the duration of the next phase.
[in] | duration | The new duration |
Definition at line 219 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myOverridingTimes.
|
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(), 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.
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 114 of file Named.h.
References Named::StoringVisitor::add().
|
virtualinherited |
Changes the current phase and her duration.
[in] | tlcontrol | The responsible traffic lights control |
[in] | simStep | The current simulation step |
[in] | step | Index of the phase to use |
[in] | stepDuration | The left duration of the phase |
Implements MSTrafficLightLogic.
Definition at line 194 of file MSSimpleTrafficLightLogic.cpp.
References MSEventControl::ADAPT_AFTER_EXECUTION, MSEventControl::addEvent(), MSTrafficLightLogic::SwitchCommand::deschedule(), MSTLLogicControl::TLSLogicVariants::executeOnSwitchActions(), MSTLLogicControl::get(), MSNet::getBeginOfTimestepEvents(), Named::getID(), MSNet::getInstance(), MSSimpleTrafficLightLogic::myStep, MSTrafficLightLogic::mySwitchCommand, and MSTrafficLightLogic::setTrafficLightSignals().
Referenced by GUIViewTraffic::onGamingClick().
|
inherited |
Clears the parameter map.
Definition at line 91 of file Parameterised.cpp.
References Parameterised::myMap.
Returns the (uncontrolled) states of the controlled links.
Definition at line 153 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLinks.
|
protected |
Returns the duration of the given step.
Definition at line 139 of file MSActuatedTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSTrafficLightLogic::getLanesAt(), MSPhaseDefinition::getState(), LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, MSPhaseDefinition::maxDuration, MSPhaseDefinition::minDuration, myContinue, myInductLoops, myPassingTime, MSSimpleTrafficLightLogic::myPhases, MSSimpleTrafficLightLogic::myStep, and SUMOReal.
Referenced by trySwitch().
|
protected |
Decides, whether a phase should be continued by checking the gaps of vehicles having green.
Definition at line 172 of file MSActuatedTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSTrafficLightLogic::getLanesAt(), MSPhaseDefinition::getState(), MSPhaseDefinition::isGreenPhase(), LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, myContinue, myInductLoops, myMaxGap, MSSimpleTrafficLightLogic::myPhases, MSSimpleTrafficLightLogic::myStep, and SUMOReal.
Referenced by trySwitch().
|
virtualinherited |
Returns the definition of the current phase.
Implements MSTrafficLightLogic.
Definition at line 136 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myPhases, and MSSimpleTrafficLightLogic::myStep.
Referenced by MSAgentbasedTrafficLightLogic::collectData(), duration(), gapControl(), trySwitch(), and MSAgentbasedTrafficLightLogic::trySwitch().
|
virtualinherited |
Returns the current index within the program.
Implements MSTrafficLightLogic.
Definition at line 130 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myStep.
|
inlineinherited |
Returns the cycle time (in ms)
Definition at line 259 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myDefaultCycleTime.
Referenced by MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), 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(), 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(), NBEdge::connections_sorter(), 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(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), init(), MSAgentbasedTrafficLightLogic::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(), 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_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::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(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), 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(), GUITrafficLightLogicWrapper::switchTLSLogic(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), 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(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
virtualinherited |
Returns the step (the phasenumber) of a given position of the cycle.
[in] | offset | The offset (time) for which the according phase shall be returned |
Implements MSTrafficLightLogic.
Definition at line 172 of file MSSimpleTrafficLightLogic.cpp.
References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), MSTrafficLightLogic::myDefaultCycleTime, and MSSimpleTrafficLightLogic::myPhases.
|
inlineinherited |
Returns the list of lists of all lanes controlled by this tls.
Definition at line 182 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLanes.
Referenced by GUITrafficLightLogicWrapper::getCenteringBoundary(), TraCIServerAPI_TLS::processGet(), and MSFullExport::writeTLS().
|
inlineinherited |
Returns the list of lanes that are controlled by the signals at the given position.
[in] | i | The index of the signal |
Definition at line 191 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLanes.
Referenced by MSAgentbasedTrafficLightLogic::collectData(), GUITrafficLightLogicWrapper::drawGL(), duration(), Command_SaveTLSSwitches::execute(), gapControl(), and GUIViewTraffic::onGamingClick().
Returns the index of the given link.
[in] | link | The link to retrieve the index for |
Definition at line 195 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLinks.
Referenced by GUITrafficLightLogicWrapper::getLinkIndex().
|
inlineinherited |
Returns the list of lists of all affected links.
Definition at line 199 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLinks.
Referenced by MSTLLogicControl::TLSLogicVariants::addLogic(), GUINet::createTLWrapper(), GUITLLogicPhasesTrackerWindow::drawValues(), Command_SaveTLSSwitches::execute(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), TraCIServerAPI_TLS::processGet(), and MSOffTrafficLightLogic::rebuildPhase().
|
inlineinherited |
Returns the list of links that are controlled by the signals at the given position.
[in] | i | The index of the signal |
Definition at line 208 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLinks.
|
inlineinherited |
Returns the inner key/value map.
Definition at line 106 of file Parameterised.h.
References Parameterised::myMap.
Referenced by PCPolyContainer::save().
|
inherited |
Returns the assumed next switch time.
The time may change in case of adaptive/actuated traffic lights.
Definition at line 212 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::SwitchCommand::getNextSwitchTime(), and MSTrafficLightLogic::mySwitchCommand.
Referenced by MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP(), and TraCIServerAPI_TLS::processGet().
Returns the position (start of a phase during a cycle) from of a given step.
[in] | index | The index of the phase to return the begin of |
Implements MSTrafficLightLogic.
Definition at line 158 of file MSSimpleTrafficLightLogic.cpp.
References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), and MSSimpleTrafficLightLogic::myPhases.
|
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(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic(), MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
virtualinherited |
Returns the definition of the phase from the given position within the plan.
[in] | givenstep | The index of the phase within the plan |
Implements MSTrafficLightLogic.
Definition at line 122 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myPhases.
Referenced by MSSimpleTrafficLightLogic::getIndexFromOffset(), MSSimpleTrafficLightLogic::getOffsetFromIndex(), MSSimpleTrafficLightLogic::getPhaseIndexAtTime(), and GUIViewTraffic::onGamingClick().
Returns the index of the logic at the given simulation step.
Implements MSTrafficLightLogic.
Definition at line 143 of file MSSimpleTrafficLightLogic.cpp.
References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), MSTrafficLightLogic::myDefaultCycleTime, MSPhaseDefinition::myLastSwitch, and MSSimpleTrafficLightLogic::myStep.
|
virtualinherited |
Returns the number of phases.
Implements MSTrafficLightLogic.
Definition at line 104 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myPhases.
|
virtualinherited |
Returns the phases of this tls program.
Implements MSTrafficLightLogic.
Definition at line 110 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myPhases.
|
inherited |
Returns the phases of this tls program.
Definition at line 116 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::myPhases.
|
inlineinherited |
Returns this tl-logic's id.
Definition at line 174 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myProgramID.
Referenced by Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), GUIViewTraffic::onGamingClick(), and TraCIServerAPI_TLS::processGet().
|
virtual |
Initialises the tls with information about incoming lanes.
[in] | nb | The detector builder |
ProcessError | If something fails on initialisation |
Reimplemented from MSTrafficLightLogic.
Definition at line 79 of file MSActuatedTrafficLightLogic.cpp.
References NLDetectorBuilder::createInductLoop(), Named::getID(), MSLane::getLength(), MSLane::getSpeedLimit(), myDetectorGap, Named::myID, myInductLoops, MSTrafficLightLogic::myLanes, MSTrafficLightLogic::myProgramID, and SUMOReal.
|
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(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
inherited |
Resets the states of controlled links.
[in] | vals | The state of controlled links to use |
Definition at line 182 of file MSTrafficLightLogic.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and MSTrafficLightLogic::myLinks.
|
inherited |
Delays current phase by the given delay.
[in] | delay | The time by which the current phase shall be delayed |
Definition at line 225 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myCurrentDurationIncrement.
|
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().
Replaces the phases and set the phase index.
Definition at line 210 of file MSSimpleTrafficLightLogic.cpp.
References MSSimpleTrafficLightLogic::deletePhases(), MSSimpleTrafficLightLogic::myPhases, and MSSimpleTrafficLightLogic::myStep.
Applies the current signal states to controlled links.
[in] | t | The current time |
Definition at line 166 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::getCurrentPhaseDef(), MSPhaseDefinition::getState(), and MSTrafficLightLogic::myLinks.
Referenced by MSTLLogicControl::TLSLogicVariants::addLogic(), MSSimpleTrafficLightLogic::changeStepAndDuration(), and TraCIServerAPI_TLS::processSet().
Switches to the next phase.
[in] | isActive | Whether this program is the currently used one |
Implements MSTrafficLightLogic.
Definition at line 118 of file MSActuatedTrafficLightLogic.cpp.
References duration(), gapControl(), MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSPhaseDefinition::minDuration, myContinue, MSSimpleTrafficLightLogic::myPhases, and MSSimpleTrafficLightLogic::myStep.
|
protected |
information whether the current phase should be lenghtend
Definition at line 124 of file MSActuatedTrafficLightLogic.h.
Referenced by duration(), gapControl(), and trySwitch().
|
protectedinherited |
A value for enlarge the current duration.
Definition at line 402 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::setCurrentDurationIncrement(), and MSSimpleTrafficLightLogic::trySwitch().
|
protectedinherited |
The cycle time (without changes)
Definition at line 408 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getDefaultCycleTime(), MSSimpleTrafficLightLogic::getIndexFromOffset(), MSSimpleTrafficLightLogic::getPhaseIndexAtTime(), MSOffTrafficLightLogic::MSOffTrafficLightLogic(), and MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic().
|
protected |
The detector distance.
Definition at line 133 of file MSActuatedTrafficLightLogic.h.
Referenced by init(), and MSActuatedTrafficLightLogic().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), 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 |
A map from lanes to induct loops lying on them.
Definition at line 121 of file MSActuatedTrafficLightLogic.h.
Referenced by duration(), gapControl(), init(), and ~MSActuatedTrafficLightLogic().
|
protectedinherited |
The list of links which do participate in this traffic light.
Definition at line 396 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::adaptLinkInformationFrom(), MSTrafficLightLogic::addLink(), MSTrafficLightLogic::getLanes(), MSTrafficLightLogic::getLanesAt(), init(), and MSAgentbasedTrafficLightLogic::init().
|
protectedinherited |
The list of links which do participate in this traffic light.
Definition at line 393 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::adaptLinkInformationFrom(), MSTrafficLightLogic::addLink(), MSTrafficLightLogic::collectLinkStates(), MSTrafficLightLogic::getLinkIndex(), MSTrafficLightLogic::getLinks(), MSTrafficLightLogic::getLinksAt(), MSTrafficLightLogic::resetLinkStates(), and MSTrafficLightLogic::setTrafficLightSignals().
|
protected |
The maximum gap to check.
Definition at line 127 of file MSActuatedTrafficLightLogic.h.
Referenced by gapControl(), and MSActuatedTrafficLightLogic().
|
protectedinherited |
A list of duration overrides.
Definition at line 399 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::addOverridingDuration(), and MSSimpleTrafficLightLogic::trySwitch().
|
protected |
The passing time used.
Definition at line 130 of file MSActuatedTrafficLightLogic.h.
Referenced by duration(), and MSActuatedTrafficLightLogic().
|
protectedinherited |
The list of phases this logic uses.
Definition at line 195 of file MSSimpleTrafficLightLogic.h.
Referenced by MSAgentbasedTrafficLightLogic::calculateDuration(), MSAgentbasedTrafficLightLogic::cutCycleTime(), MSSimpleTrafficLightLogic::deletePhases(), duration(), MSAgentbasedTrafficLightLogic::findStepOfMaxValue(), MSAgentbasedTrafficLightLogic::findStepOfMinValue(), gapControl(), MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSSimpleTrafficLightLogic::getIndexFromOffset(), MSSimpleTrafficLightLogic::getOffsetFromIndex(), MSSimpleTrafficLightLogic::getPhase(), MSSimpleTrafficLightLogic::getPhaseNumber(), MSSimpleTrafficLightLogic::getPhases(), MSAgentbasedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::lengthenCycleTime(), MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic(), MSAgentbasedTrafficLightLogic::nextStep(), MSSimpleTrafficLightLogic::setPhases(), MSSimpleTrafficLightLogic::trySwitch(), trySwitch(), and MSAgentbasedTrafficLightLogic::trySwitch().
|
protectedinherited |
The id of the logic.
Definition at line 390 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getProgramID(), init(), and MSAgentbasedTrafficLightLogic::init().
|
protectedinherited |
The current step.
Definition at line 198 of file MSSimpleTrafficLightLogic.h.
Referenced by MSAgentbasedTrafficLightLogic::calculateDuration(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSAgentbasedTrafficLightLogic::collectData(), duration(), gapControl(), MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSSimpleTrafficLightLogic::getCurrentPhaseIndex(), MSSimpleTrafficLightLogic::getPhaseIndexAtTime(), MSAgentbasedTrafficLightLogic::nextStep(), MSSimpleTrafficLightLogic::setPhases(), MSSimpleTrafficLightLogic::trySwitch(), trySwitch(), and MSAgentbasedTrafficLightLogic::trySwitch().
|
protectedinherited |
The current switch command.
Definition at line 405 of file MSTrafficLightLogic.h.
Referenced by MSSimpleTrafficLightLogic::changeStepAndDuration(), MSTrafficLightLogic::getNextSwitchTime(), and MSTrafficLightLogic::MSTrafficLightLogic().