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

A SUMO-compliant built logic for a traffic light. More...

#include <NBTrafficLightLogic.h>

Inheritance diagram for NBTrafficLightLogic:
Inheritance graph
Collaboration diagram for NBTrafficLightLogic:
Collaboration graph

Data Structures

class  PhaseDefinition
 The definition of a single phase of the logic. 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 addStep (SUMOTime duration, const std::string &state, int index=-1)
 Adds a phase to the logic. More...
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
void closeBuilding ()
 closes the building process More...
 
void deletePhase (int index)
 
SUMOTime getDuration () const
 Returns the duration of the complete cycle. 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...
 
int getNumLinks ()
 Returns the number of participating links. More...
 
SUMOTime getOffset () const
 Returns the offset of first switch. More...
 
const std::string & getParameter (const std::string &key, const std::string &defaultValue) const
 Returns the value for a given key. More...
 
const std::vector
< PhaseDefinition > & 
getPhases () const
 Returns the phases. More...
 
const std::string & getProgramID () const
 Returns the ProgramID. More...
 
TrafficLightType getType () const
 get the algorithm type (static etc..) More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
 NBTrafficLightLogic (const std::string &id, const std::string &subid, int noLinks, SUMOTime offset=0, TrafficLightType type=TLTYPE_STATIC)
 Constructor. More...
 
 NBTrafficLightLogic (const NBTrafficLightLogic *logic)
 Copy Constructor. More...
 
void resetPhases ()
 
void setID (const std::string &newID)
 resets the id More...
 
void setOffset (SUMOTime offset)
 Sets the offset of this tls. More...
 
void setPhaseDuration (int phaseIndex, SUMOTime duration)
 Modifies the duration for an existing phase (used by NETEDIT) More...
 
void setPhaseState (int phaseIndex, int tlIndex, LinkState linkState)
 Modifies the state for an existing phase (used by NETEDIT) More...
 
void setType (TrafficLightType type)
 set the algorithm type (static etc..) More...
 
 ~NBTrafficLightLogic ()
 Destructor. More...
 

Static Public Member Functions

template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 

Protected Attributes

std::string myID
 The name of the object. More...
 

Private Types

typedef std::vector
< PhaseDefinition
PhaseDefinitionVector
 Definition of a vector of traffic light phases. More...
 

Private Member Functions

NBTrafficLightLogicoperator= (const NBTrafficLightLogic &s)
 Invalidated assignment operator. More...
 

Private Attributes

int myNumLinks
 The number of participating links. More...
 
SUMOTime myOffset
 The tls program's offset. More...
 
PhaseDefinitionVector myPhases
 The junction logic's storage for traffic light phase list. More...
 
const std::string mySubID
 The tls program's subid. More...
 
TrafficLightType myType
 The algorithm type for the traffic light. More...
 

Static Private Attributes

static const std::string ALLOWED_STATES
 
static const char allowedStatesInitializer []
 all allowed characters for phase state (see SUMOXMLDefinitions) More...
 

Detailed Description

A SUMO-compliant built logic for a traffic light.

Definition at line 59 of file NBTrafficLightLogic.h.

Member Typedef Documentation

Definition of a vector of traffic light phases.

Definition at line 220 of file NBTrafficLightLogic.h.

Constructor & Destructor Documentation

NBTrafficLightLogic::NBTrafficLightLogic ( const std::string &  id,
const std::string &  subid,
int  noLinks,
SUMOTime  offset = 0,
TrafficLightType  type = TLTYPE_STATIC 
)

Constructor.

Parameters
[in]idThe id of the traffic light
[in]subidThe id of the program
[in]noLinksNumber of links that are controlled by this tls. 0 means the value is not known beforehand
[in]offsetThe offset of the program (delay)
[in]typeThe algorithm type for the computed traffic light

Definition at line 72 of file NBTrafficLightLogic.cpp.

NBTrafficLightLogic::NBTrafficLightLogic ( const NBTrafficLightLogic logic)

Copy Constructor.

Parameters
[in]logicThe logic to copy

Definition at line 79 of file NBTrafficLightLogic.cpp.

NBTrafficLightLogic::~NBTrafficLightLogic ( )

Destructor.

Definition at line 88 of file NBTrafficLightLogic.cpp.

Member Function Documentation

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

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

void NBTrafficLightLogic::addStep ( SUMOTime  duration,
const std::string &  state,
int  index = -1 
)

Adds a phase to the logic.

Parameters
[in]durationThe duration of the phase to add
[in]stateThe state definition of a tls phase
[in]indexThe index of the new phase (-1 means append to end)
Note
: the length of the state has to match the number of links and the length given in previous calls to addStep (throws ProcessError)

Definition at line 92 of file NBTrafficLightLogic.cpp.

References ALLOWED_STATES, Named::getID(), myNumLinks, myPhases, and toString().

Referenced by NBOwnTLDef::addPedestrianPhases(), NBOwnTLDef::addPedestrianScramble(), NBLoadedSUMOTLDef::addPhase(), NBOwnTLDef::computeLogicAndConts(), NBLoadedTLDef::myCompute(), GNETLSEditorFrame::onCmdPhaseCreate(), GNETLSEditorFrame::onCmdPhaseEdit(), and NBLoadedSUMOTLDef::removeConnection().

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

Adds this object to the given container.

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

Definition at line 129 of file Named.h.

References Named::StoringVisitor::add().

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

void NBTrafficLightLogic::closeBuilding ( )

closes the building process

Joins equal steps.

Definition at line 143 of file NBTrafficLightLogic.cpp.

References myPhases.

Referenced by NBOwnTLDef::computeLogicAndConts(), NBLoadedSUMOTLDef::myCompute(), and NBLoadedTLDef::myCompute().

void NBTrafficLightLogic::deletePhase ( int  index)
SUMOTime NBTrafficLightLogic::getDuration ( ) const

Returns the duration of the complete cycle.

Returns
The duration of this logic's cycle

Definition at line 133 of file NBTrafficLightLogic.cpp.

References myPhases.

Referenced by NBOwnTLDef::computeLogicAndConts(), and NBTrafficLightLogicCont::computeSingleLogic().

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

Returns the id.

Returns
The stored id

Definition at line 66 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), PCPolyContainer::add(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), MSNet::addChargingStation(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), addStep(), MSRouteHandler::addStop(), ROVehicle::addStop(), MSVehicle::addStop(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciBusOrContainerStop(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NLDetectorBuilder::convUncontE2PosLength(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), GUINet::createTLWrapper(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), NIVissimDistrictConnection::dict_BuildDistricts(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), TraCIServerAPI_Vehicle::findCloserLane(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), MSNet::getBusStopID(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSNet::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), MSE2Collector::getEstimateQueueLength(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowerOnConsecutive(), MSLane::getFollowersOnConsecutive(), GNEEdge::getGNEJunctionDest(), GNEEdge::getGNEJunctionSource(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUIVehicle::getParameterWindow(), GUILane::getParentName(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), NBNodeCont::mapToNumericalIDs(), NBEdgeCont::mapToNumericalIDs(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSE2Collector::notifyMove(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_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(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_SL2015::patchSpeed(), MSLCM_LC2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSLane::planMovements(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), MSAbstractLaneChangeModel::primaryLaneChanged(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_Lane::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNodeCont::removeIsolatedRoads(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), MSBaseVehicle::reroute(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), RONet::saveAndRemoveRoutesUntil(), ROPerson::Ride::saveAsXML(), MSBaseVehicle::saveState(), MSLane::saveState(), MSDevice_Battery::setAirDragCoefficient(), NBNodeCont::setAsTLControlled(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), MSDevice_Battery::setConstantPowerIntake(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), MSDevice_Battery::setFrontSurfaceArea(), MSDevice_Battery::setInternalMomentOfInertia(), GNEJunction::setLogicValid(), MSDevice_Battery::setMass(), MSDevice_Battery::setMaximumBatteryCapacity(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSDevice_Battery::setPropulsionEfficiency(), MSDevice_Battery::setRadialDragCoefficient(), MSDevice_Battery::setRecuperationEfficiency(), MSLink::setRequestInformation(), MSDevice_Battery::setRollDragCoefficient(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSVehicle::updateBestLanes(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSEmissionExport::write(), MSBatteryExport::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(), writeInterval(), 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(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSE2Collector::writeXMLOutput(), MSInductLoop::writeXMLOutput(), and RONet::~RONet().

int NBTrafficLightLogic::getNumLinks ( )
inline
SUMOTime NBTrafficLightLogic::getOffset ( ) const
inline

Returns the offset of first switch.

Returns
The switch offset

Definition at line 188 of file NBTrafficLightLogic.h.

References myOffset.

Referenced by NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), and GNETLSEditorFrame::onCmdDefSwitch().

const std::string & Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue 
) const
inherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 81 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSDevice_Battery::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSSwarmTrafficLightLogic::getChangePlanProbability(), MSSOTLTrafficLightLogic::getDecayConstant(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), MSSwarmTrafficLightLogic::getPheroMaxVal(), MSSwarmTrafficLightLogic::getPoliciesParam(), MSSwarmTrafficLightLogic::getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_Route::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), MSSOTLPolicyDesirability::readParameter(), and TraCIServerAPI_Vehicle::vtdMap().

const std::string& NBTrafficLightLogic::getProgramID ( ) const
inline

Returns the ProgramID.

Returns
The ID of the program (subID)

Definition at line 172 of file NBTrafficLightLogic.h.

References mySubID.

TrafficLightType NBTrafficLightLogic::getType ( ) const
inline

get the algorithm type (static etc..)

Definition at line 200 of file NBTrafficLightLogic.h.

References myType.

Referenced by NBLoadedSUMOTLDef::NBLoadedSUMOTLDef().

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

Returns whether the parameter is known.

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

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

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

NBTrafficLightLogic& NBTrafficLightLogic::operator= ( const NBTrafficLightLogic s)
private

Invalidated assignment operator.

void NBTrafficLightLogic::resetPhases ( )

Definition at line 126 of file NBTrafficLightLogic.cpp.

References myNumLinks, and myPhases.

Referenced by NIXMLTrafficLightsHandler::myStartElement().

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 74 of file Named.h.

References Named::myID.

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

void NBTrafficLightLogic::setOffset ( SUMOTime  offset)
inline

Sets the offset of this tls.

Parameters
[in]offsetThe offset of this cycle

Definition at line 164 of file NBTrafficLightLogic.h.

References myOffset.

Referenced by NBTrafficLightLogicCont::computeSingleLogic(), and NBLoadedSUMOTLDef::setOffset().

void NBTrafficLightLogic::setPhaseDuration ( int  phaseIndex,
SUMOTime  duration 
)

Modifies the duration for an existing phase (used by NETEDIT)

Parameters
[in]phaseIndexThe index of the phase to modify
[in]durationThe new duration for this phase

Definition at line 165 of file NBTrafficLightLogic.cpp.

References myPhases.

Referenced by NBOwnTLDef::computeLogicAndConts(), and GNETLSEditorFrame::onCmdPhaseEdit().

void NBTrafficLightLogic::setPhaseState ( int  phaseIndex,
int  tlIndex,
LinkState  linkState 
)

Modifies the state for an existing phase (used by NETEDIT)

Parameters
[in]phaseIndexThe index of the phase to modify
[in]tlIndexThe index at which to modify the state
[in]linkStateThe new link state for the given index

Definition at line 156 of file NBTrafficLightLogic.cpp.

References myPhases.

Referenced by GNETLSEditorFrame::handleChange().

void NBTrafficLightLogic::setType ( TrafficLightType  type)
inline

set the algorithm type (static etc..)

Definition at line 205 of file NBTrafficLightLogic.h.

References myType.

Referenced by NBLoadedSUMOTLDef::setType().

Field Documentation

const std::string NBTrafficLightLogic::ALLOWED_STATES
staticprivate

Definition at line 230 of file NBTrafficLightLogic.h.

Referenced by addStep().

const char NBTrafficLightLogic::allowedStatesInitializer
staticprivate
int NBTrafficLightLogic::myNumLinks
private

The number of participating links.

Definition at line 211 of file NBTrafficLightLogic.h.

Referenced by addStep(), getNumLinks(), and resetPhases().

SUMOTime NBTrafficLightLogic::myOffset
private

The tls program's offset.

Definition at line 217 of file NBTrafficLightLogic.h.

Referenced by getOffset(), and setOffset().

PhaseDefinitionVector NBTrafficLightLogic::myPhases
private

The junction logic's storage for traffic light phase list.

Definition at line 223 of file NBTrafficLightLogic.h.

Referenced by addStep(), closeBuilding(), deletePhase(), getDuration(), getPhases(), resetPhases(), setPhaseDuration(), and setPhaseState().

const std::string NBTrafficLightLogic::mySubID
private

The tls program's subid.

Definition at line 214 of file NBTrafficLightLogic.h.

Referenced by getProgramID().

TrafficLightType NBTrafficLightLogic::myType
private

The algorithm type for the traffic light.

Definition at line 226 of file NBTrafficLightLogic.h.

Referenced by getType(), and setType().


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