Eclipse SUMO - Simulation of Urban MObility
MSActuatedTrafficLightLogic Class Reference

An actuated (adaptive) traffic light logic. More...

#include <MSActuatedTrafficLightLogic.h>

Inheritance diagram for MSActuatedTrafficLightLogic:
Collaboration diagram for MSActuatedTrafficLightLogic:

Public Types

typedef std::vector< std::vector< MSInductLoop * > > InductLoopMap
 Definition of a map from phases to induct loops controlling 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 are subjected to this tls. More...
 
typedef std::vector< LinkVectorLinkVectorVector
 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 arrival lanes subjected to this tls. More...
 
typedef std::vector< LaneVectorLaneVectorVector
 Definition of a list that holds lists of lanes that do have the same attribute. More...
 

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
const std::string & getID () const
 Returns the id. More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
const std::map< std::string, std::string > & getParametersMap () const
 Returns the inner key/value map. More...
 
void init (NLDetectorBuilder &nb)
 Initialises the tls with information about incoming lanes. More...
 
bool isSelected () const
 whether this logic is selected in the GUI 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, int step, SUMOTime delay, const std::map< std::string, std::string > &parameter, const std::string &basePath)
 Constructor. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
void setShowDetectors (bool show)
 
bool showDetectors () const
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void writeParams (OutputDevice &device) const
 write Params in the given outputdevice More...
 
 ~MSActuatedTrafficLightLogic ()
 Destructor. More...
 
Switching and setting current rows
SUMOTime trySwitch ()
 Switches to the next phase. More...
 
Static Information Retrieval
int getPhaseNumber () const
 Returns the number of phases. More...
 
const PhasesgetPhases () const
 Returns the phases of this tls program. More...
 
PhasesgetPhases ()
 Returns the phases of this tls program. More...
 
const MSPhaseDefinitiongetPhase (int givenstep) const
 Returns the definition of the phase from the given position within the plan. More...
 
const std::string getLogicType () const
 Returns the type of the logic as a string. More...
 
Dynamic Information Retrieval
int getCurrentPhaseIndex () const
 Returns the current index within the program. More...
 
const MSPhaseDefinitiongetCurrentPhaseDef () 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 (int index) const
 Returns the position (start of a phase during a cycle) from of a given step. More...
 
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, int step, SUMOTime stepDuration)
 Changes the current phase and her duration. More...
 
void setPhases (const Phases &phases, int index)
 Replaces the phases and set the phase index. More...
 
Handling of controlled links
virtual void addLink (MSLink *link, MSLane *lane, int pos)
 Adds a link on building. More...
 
void ignoreLinkIndex (int pos)
 ignore pedestrian crossing index in mesosim More...
 
virtual void adaptLinkInformationFrom (const MSTrafficLightLogic &logic)
 Applies information about controlled links and lanes from the given logic. More...
 
std::map< MSLink *, LinkStatecollectLinkStates () 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 LaneVectorVectorgetLaneVectors () const
 Returns the list of lists of all lanes controlled by this tls. More...
 
const LaneVectorgetLanesAt (int i) const
 Returns the list of lanes that are controlled by the signals at the given position. More...
 
const LinkVectorVectorgetLinks () const
 Returns the list of lists of all affected links. More...
 
const LinkVectorgetLinksAt (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...
 
SUMOTime getSpentDuration () const
 Returns the duration spent in the current phase. 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...
 

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 Member Functions

"actuated" algorithm methods
SUMOTime duration (const double detectionGap) const
 Returns the minimum duration of the current phase. More...
 
SUMOTime getMinimumMinDuration (MSLane *lane) const
 get the minimum min duration for all stretchable phases that affect the given lane More...
 
double gapControl ()
 Return the minimum detection gap of all detectors if the current phase should be extended and double::max otherwise. More...
 
bool hasMajor (const std::string &state, const LaneVector &lanes) const
 return whether there is a major link from the given lane in the given phase More...
 

Protected Attributes

SUMOTime myCurrentDurationIncrement
 A value for enlarge the current duration. More...
 
SUMOTime myDefaultCycleTime
 The cycle time (without changes) More...
 
double myDetectorGap
 The detector distance in seconds. More...
 
std::string myFile
 The output file for generated detectors. More...
 
SUMOTime myFreq
 The frequency for aggregating detector output. More...
 
std::string myID
 The name of the object. More...
 
std::set< int > myIgnoredIndices
 list of indices that are ignored in mesoscopic simulatino More...
 
std::vector< MSInductLoop * > myInductLoops
 
InductLoopMap myInductLoopsForPhase
 A map from phase to induction loops to be used for gap control. More...
 
LaneVectorVector myLanes
 The list of LaneVectors; each vector contains the incoming lanes that belong to the same link index. More...
 
LinkVectorVector myLinks
 The list of LinkVectors; each vector contains the links that belong to the same link index. More...
 
const TrafficLightType myLogicType
 The type of the logic. More...
 
double myMaxGap
 The maximum gap to check in seconds. More...
 
std::vector< SUMOTimemyOverridingTimes
 A list of duration overrides. More...
 
double myPassingTime
 The passing time used in seconds. More...
 
Phases myPhases
 The list of phases this logic uses. More...
 
const std::string myProgramID
 The id of the logic. More...
 
bool myShowDetectors
 Whether the detectors shall be shown in the GUI. More...
 
int myStep
 The current step. More...
 
SwitchCommandmySwitchCommand
 The current switch command. More...
 
std::string myVehicleTypes
 Whether detector output separates by vType. More...
 

Static Protected Attributes

static const LaneVector myEmptyLaneVector
 An empty lane vector. More...
 

Private Member Functions

void deletePhases ()
 frees memory responsibilities More...
 
void initMesoTLSPenalties ()
 initialize optional meso penalties More...
 

Private Attributes

std::map< std::string, std::string > myMap
 The key->value map. More...
 

Detailed Description

An actuated (adaptive) traffic light logic.

Definition at line 51 of file MSActuatedTrafficLightLogic.h.

Member Typedef Documentation

◆ InductLoopMap

typedef std::vector<std::vector<MSInductLoop*> > MSActuatedTrafficLightLogic::InductLoopMap

Definition of a map from phases to induct loops controlling them.

Definition at line 54 of file MSActuatedTrafficLightLogic.h.

◆ LaneVector

typedef std::vector<MSLane*> MSTrafficLightLogic::LaneVector
inherited

Definition of the list of arrival lanes subjected to this tls.

Definition at line 71 of file MSTrafficLightLogic.h.

◆ LaneVectorVector

typedef std::vector<LaneVector> MSTrafficLightLogic::LaneVectorVector
inherited

Definition of a list that holds lists of lanes that do have the same attribute.

Definition at line 74 of file MSTrafficLightLogic.h.

◆ LinkVector

typedef std::vector<MSLink*> MSTrafficLightLogic::LinkVector
inherited

Definition of the list of links that are subjected to this tls.

Definition at line 65 of file MSTrafficLightLogic.h.

◆ LinkVectorVector

typedef std::vector<LinkVector> MSTrafficLightLogic::LinkVectorVector
inherited

Definition of a list that holds lists of links that do have the same attribute.

Definition at line 68 of file MSTrafficLightLogic.h.

◆ Phases

typedef std::vector<MSPhaseDefinition*> MSTrafficLightLogic::Phases
inherited

Definition of a list of phases, being the junction logic.

Definition at line 62 of file MSTrafficLightLogic.h.

Constructor & Destructor Documentation

◆ MSActuatedTrafficLightLogic()

MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic ( MSTLLogicControl tlcontrol,
const std::string &  id,
const std::string &  programID,
const MSSimpleTrafficLightLogic::Phases phases,
int  step,
SUMOTime  delay,
const std::map< std::string, std::string > &  parameter,
const std::string &  basePath 
)

Constructor.

Parameters
[in]tlcontrolThe tls control responsible for this tls
[in]idThis tls' id
[in]programIDThis tls' sub-id (program id)
[in]phasesDefinitions of the phases
[in]stepThe initial phase index
[in]delayThe time to wait before the first switch
[in]parameterThe parameter to use for tls set-up

Definition at line 60 of file MSActuatedTrafficLightLogic.cpp.

References FileHelpers::checkForRelativity(), DEFAULT_DETECTOR_GAP, DEFAULT_MAX_GAP, DEFAULT_PASSING_TIME, OptionsCont::getOptions(), Parameterised::getParameter(), myDetectorGap, myFile, myFreq, myMaxGap, myPassingTime, myShowDetectors, myVehicleTypes, TIME2STEPS, StringUtils::toBool(), StringUtils::toDouble(), and toString().

◆ ~MSActuatedTrafficLightLogic()

MSActuatedTrafficLightLogic::~MSActuatedTrafficLightLogic ( )

Destructor.

Definition at line 77 of file MSActuatedTrafficLightLogic.cpp.

Member Function Documentation

◆ adaptLinkInformationFrom()

void MSTrafficLightLogic::adaptLinkInformationFrom ( const MSTrafficLightLogic logic)
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.

Parameters
[in]logicThe logic to use the information about controlled links/lanes from

Reimplemented in MSRailSignal, MSRailCrossing, and MSOffTrafficLightLogic.

Definition at line 214 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myIgnoredIndices, MSTrafficLightLogic::myLanes, and MSTrafficLightLogic::myLinks.

Referenced by MSOffTrafficLightLogic::adaptLinkInformationFrom(), MSRailCrossing::adaptLinkInformationFrom(), MSRailSignal::adaptLinkInformationFrom(), and MSTLLogicControl::TLSLogicVariants::addLogic().

◆ addLink()

void MSTrafficLightLogic::addLink ( MSLink link,
MSLane lane,
int  pos 
)
virtualinherited

Adds a link on building.

Parameters
[in]linkThe controlled link
[in]laneThe lane this link starts at
[in]posThe link's index (signal group) within this program

Reimplemented in MSRailSignal, and MSRailCrossing.

Definition at line 196 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::getCurrentPhaseDef(), MSNet::getInstance(), MSTrafficLightLogic::myLanes, MSTrafficLightLogic::myLinks, and MSLink::setTLState().

Referenced by MSRailCrossing::addLink(), and MSRailSignal::addLink().

◆ addOverridingDuration()

void MSTrafficLightLogic::addOverridingDuration ( SUMOTime  duration)
inherited

Changes the duration of the next phase.

Parameters
[in]durationThe new duration

Definition at line 300 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myOverridingTimes.

◆ addTo()

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 127 of file Named.h.

References Named::StoringVisitor::add().

◆ changeStepAndDuration()

void MSSimpleTrafficLightLogic::changeStepAndDuration ( MSTLLogicControl tlcontrol,
SUMOTime  simStep,
int  step,
SUMOTime  stepDuration 
)
virtualinherited

Changes the current phase and her duration.

Parameters
[in]tlcontrolThe responsible traffic lights control
[in]simStepThe current simulation step
[in]stepIndex of the phase to use
[in]stepDurationThe left duration of the phase
See also
MSTrafficLightLogic::changeStepAndDuration

Implements MSTrafficLightLogic.

Definition at line 188 of file MSSimpleTrafficLightLogic.cpp.

References 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().

◆ clearParameter()

◆ collectLinkStates()

std::map< MSLink *, LinkState > MSTrafficLightLogic::collectLinkStates ( ) const
inherited

Returns the (uncontrolled) states of the controlled links.

Returns
The controlled link's states

Definition at line 222 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myLinks.

◆ deletePhases()

void MSSimpleTrafficLightLogic::deletePhases ( )
privateinherited

◆ duration()

SUMOTime MSActuatedTrafficLightLogic::duration ( const double  detectionGap) const
protected

Returns the minimum duration of the current phase.

Parameters
[in]detectionGapThe minimum detection gap for the current phase
Returns
The minimum duration of the current phase

Definition at line 393 of file MSActuatedTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MAX3(), MIN2(), MSPhaseDefinition::minDuration, myDetectorGap, MSSimpleTrafficLightLogic::myPhases, MSSimpleTrafficLightLogic::myStep, and TIME2STEPS.

Referenced by trySwitch().

◆ gapControl()

double MSActuatedTrafficLightLogic::gapControl ( )
protected

◆ getCurrentPhaseDef()

const MSPhaseDefinition & MSSimpleTrafficLightLogic::getCurrentPhaseDef ( ) const
virtualinherited

◆ getCurrentPhaseIndex()

int MSSimpleTrafficLightLogic::getCurrentPhaseIndex ( ) const
virtualinherited

Returns the current index within the program.

Returns
The index of the current phase within the tls
See also
MSTrafficLightLogic::getCurrentPhaseIndex

Implements MSTrafficLightLogic.

Definition at line 124 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myStep.

◆ getDefaultCycleTime()

SUMOTime MSTrafficLightLogic::getDefaultCycleTime ( ) const
inlineinherited

Returns the cycle time (in ms)

Returns
The (maybe changing) cycle time of this tls

Definition at line 268 of file MSTrafficLightLogic.h.

References MSTrafficLightLogic::myDefaultCycleTime.

Referenced by NLJunctionControlBuilder::closeTrafficLightLogic(), and MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP().

◆ getDouble()

◆ getID()

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

Returns the id.

Returns
The stored id

Definition at line 77 of file Named.h.

References Named::myID.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSPModel_Remote::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSLane::addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), MSRailSignal::LinkInfo::buildDriveWay(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSRailSignal::DriveWay::checkCrossingFlanks(), MSLane::checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), IntermodalRouter< E, L, N, V >::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), libsumo::Helper::findCloserLane(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBNodeCont::generateNodeClusters(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), GUILane::getColorValue(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), GUIMEVehicle::getEdgeID(), GUIPerson::getEdgeID(), MSMeanData::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), MSLane::getLinkTo(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), libsumo::Simulation::getParameter(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParameterWindow(), GUILane::getParentName(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), PolygonDynamics::getPolygonID(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), libsumo::Vehicle::getRouteID(), MSVehicle::getSafeFollowSpeed(), libsumo::Person::getStage(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSNet::getStoppingPlaceID(), MSLane::getSurroundingVehicles(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicles(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MESegment::isOpen(), RODFNet::isSource(), NIImporter_VISUM::isSplitEdge(), MSSOTLTrafficLightLogic::isThresholdPassed(), MESegment::jamThresholdForSpeed(), NBNodeShapeComputer::joinSameDirectionEdges(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), MSSOTLE2Sensors::meanVehiclesSpeed(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIImporter_SUMO::myEndElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_Bluelight::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Turns(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), NIXMLNodesHandler::processNodeType(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDelayBasedTrafficLightLogic::proposeProlongation(), NBNodeCont::pruneClusterFringe(), MSPModel_Striping::PState::PState(), MSOffTrafficLightLogic::rebuildPhase(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), MSLink::removeApproaching(), MSVehicle::removePassedDriveItems(), GNEJunction::removeTLSConnections(), NBNodeCont::rename(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), GNEJunction::replaceIncomingConnections(), MSVehicle::replaceParkingArea(), MSVehicle::replaceRoute(), MSBaseVehicle::replaceRouteEdges(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), MSTransportableDevice_Routing::saveState(), MSDevice_Routing::saveState(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NLEdgeControlBuilder::setDefaultStopOffsets(), MSChargingStation::setEfficency(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), MSLane::sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), MSSOTLTrafficLightLogic::trySwitch(), PolygonDynamics::update(), MSDevice_SSM::update(), MSDevice_SSM::updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::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(), SUMOPolygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 70 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V, BASE >::compute(), AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), MSCFModel_W99::followSpeed(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestCombination(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), NBEdge::Connection::getDescription(), MSLane::getFollowersOnConsecutive(), GUIVehicle::getLaneID(), MSVehicle::getLatOffset(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), GUIVehicle::getShadowLaneID(), GUIVehicle::getTargetLaneID(), NBEdge::init(), MSLane::isInsertionSuccess(), MESegment::isOpen(), joinNamedToString(), joinNamedToStringSorting(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), operator<<(), NBEdge::recheckLanes(), MSTriggeredRerouter::rerouteParkingArea(), MSLCM_LC2013::saveBlockerLength(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getIndexFromOffset()

int MSSimpleTrafficLightLogic::getIndexFromOffset ( SUMOTime  offset) const
virtualinherited

Returns the step (the phasenumber) of a given position of the cycle.

Parameters
[in]offsetThe offset (time) for which the according phase shall be returned
Returns
The according phase
See also
MSTrafficLightLogic::getIndexFromOffset

Implements MSTrafficLightLogic.

Definition at line 166 of file MSSimpleTrafficLightLogic.cpp.

References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), MSTrafficLightLogic::myDefaultCycleTime, and MSSimpleTrafficLightLogic::myPhases.

◆ getLanesAt()

const LaneVector& MSTrafficLightLogic::getLanesAt ( int  i) const
inlineinherited

Returns the list of lanes that are controlled by the signals at the given position.

Parameters
[in]iThe index of the signal
Returns
The lanes controlled by the signal at the given index

Definition at line 189 of file MSTrafficLightLogic.h.

References MSTrafficLightLogic::myEmptyLaneVector, and MSTrafficLightLogic::myLanes.

Referenced by GUITrafficLightLogicWrapper::drawGL(), Command_SaveTLSSwitches::execute(), getMinimumMinDuration(), hasMajor(), init(), GUIViewTraffic::onGamingClick(), and MSDelayBasedTrafficLightLogic::proposeProlongation().

◆ getLaneVectors()

const LaneVectorVector& MSTrafficLightLogic::getLaneVectors ( ) const
inlineinherited

◆ getLinkIndex()

int MSTrafficLightLogic::getLinkIndex ( const MSLink *const  link) const
inherited

Returns the index of the given link.

Parameters
[in]linkThe link to retrieve the index for
Returns
The index of the given link (-1 if it is not controlled by this tls)

Definition at line 264 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myLinks.

Referenced by GUITrafficLightLogicWrapper::getLinkIndex().

◆ getLinks()

◆ getLinksAt()

const LinkVector& MSTrafficLightLogic::getLinksAt ( int  i) const
inlineinherited

Returns the list of links that are controlled by the signals at the given position.

Parameters
[in]iThe index of the signal
Returns
The links controlled by the signal at the given index

Definition at line 210 of file MSTrafficLightLogic.h.

References MSTrafficLightLogic::myLinks.

Referenced by MSDeterministicHiLevelTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), and MSSwarmTrafficLightLogic::init().

◆ getLogicType()

const std::string MSSimpleTrafficLightLogic::getLogicType ( ) const
inlineinherited

Returns the type of the logic as a string.

Returns
The type of the logic

Definition at line 124 of file MSSimpleTrafficLightLogic.h.

◆ getMinimumMinDuration()

SUMOTime MSActuatedTrafficLightLogic::getMinimumMinDuration ( MSLane lane) const
protected

get the minimum min duration for all stretchable phases that affect the given lane

Definition at line 325 of file MSActuatedTrafficLightLogic.cpp.

References MSTrafficLightLogic::getLanesAt(), LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, MIN2(), and MSSimpleTrafficLightLogic::myPhases.

Referenced by init().

◆ getNextSwitchTime()

SUMOTime MSTrafficLightLogic::getNextSwitchTime ( ) const
inherited

Returns the assumed next switch time.

The time may change in case of adaptive/actuated traffic lights.

Returns
The assumed next switch time (simulation time)

Definition at line 281 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::SwitchCommand::getNextSwitchTime(), and MSTrafficLightLogic::mySwitchCommand.

Referenced by MSTrafficLightLogic::getSpentDuration(), and MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP().

◆ getOffsetFromIndex()

SUMOTime MSSimpleTrafficLightLogic::getOffsetFromIndex ( int  index) const
virtualinherited

Returns the position (start of a phase during a cycle) from of a given step.

Parameters
[in]indexThe index of the phase to return the begin of
Returns
The begin time of the phase
See also
MSTrafficLightLogic::getOffsetFromIndex

Implements MSTrafficLightLogic.

Definition at line 152 of file MSSimpleTrafficLightLogic.cpp.

References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), and MSSimpleTrafficLightLogic::myPhases.

◆ getParameter()

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 71 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NBEdge::addRestrictedLane(), FareModul::addStop(), NBEdge::append(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), libsumo::Simulation::findIntermodalRoute(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSwarmTrafficLightLogic::getChangePlanProbability(), GNELane::getColorValue(), GUILane::getColorValue(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), GUIBaseVehicle::getOptionalName(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Route::getParameter(), libsumo::Polygon::getParameter(), libsumo::POI::getParameter(), libsumo::Person::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), libsumo::Simulation::getParameter(), MSSwarmTrafficLightLogic::getPheroMaxVal(), MSSwarmTrafficLightLogic::getPoliciesParam(), MSSwarmTrafficLightLogic::getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), GNEVehicleType::initRailVisualizationParameters(), MSVehicleType::initRailVisualizationParameters(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), GNEVehicleType::overwriteVType(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSDevice_SSM::useGeoCoords(), NWWriter_DlrNavteq::writeLinksUnsplitted(), and NWWriter_OpenDrive::writeRoadObjects().

◆ getParametersMap()

const std::map< std::string, std::string > & Parameterised::getParametersMap ( ) const
inherited

Returns the inner key/value map.

Definition at line 105 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), NBEdge::addLane(), GUIParameterTableWindow::closeBuilding(), NLHandler::closeEdge(), NBTrafficLightDefinition::compute(), GNEVehicleType::getGenericParameters(), GNELane::getGenericParameters(), GNEPoly::getGenericParameters(), GNEStop::getGenericParameters(), GNEPOI::getGenericParameters(), GNEJunction::getGenericParameters(), GNERide::getGenericParameters(), GNEPersonTrip::getGenericParameters(), GNEWalk::getGenericParameters(), GNEEdge::getGenericParameters(), GNERoute::getGenericParameters(), GNEPerson::getGenericParameters(), GNEAdditional::getGenericParameters(), GNEVehicle::getGenericParameters(), GNEVehicleType::getGenericParametersStr(), GNELane::getGenericParametersStr(), GNEPoly::getGenericParametersStr(), GNEStop::getGenericParametersStr(), GNEPOI::getGenericParametersStr(), GNEJunction::getGenericParametersStr(), GNERide::getGenericParametersStr(), GNEPersonTrip::getGenericParametersStr(), GNEWalk::getGenericParametersStr(), GNEEdge::getGenericParametersStr(), GNERoute::getGenericParametersStr(), GNEPerson::getGenericParametersStr(), GNEAdditional::getGenericParametersStr(), GNEVehicle::getGenericParametersStr(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIPolygon::getParameterWindow(), GUIJunctionWrapper::getParameterWindow(), GUIPointOfInterest::getParameterWindow(), GUILane::getParameterWindow(), GUIPerson::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), NIImporter_OpenStreetMap::insertEdge(), NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), GUIParameterTableWindow::numParams(), GNEVehicleType::overwriteVType(), and TraCIServerAPI_TrafficLight::processGet().

◆ getPhase()

const MSPhaseDefinition & MSSimpleTrafficLightLogic::getPhase ( int  givenstep) const
virtualinherited

Returns the definition of the phase from the given position within the plan.

Parameters
[in]givenstepThe index of the phase within the plan
Returns
The definition of the phase at the given position
See also
MSTrafficLightLogic::getPhase

Implements MSTrafficLightLogic.

Definition at line 116 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myPhases.

Referenced by MSSimpleTrafficLightLogic::getIndexFromOffset(), MSSimpleTrafficLightLogic::getOffsetFromIndex(), MSSimpleTrafficLightLogic::getPhaseIndexAtTime(), and GUIViewTraffic::onGamingClick().

◆ getPhaseIndexAtTime()

SUMOTime MSSimpleTrafficLightLogic::getPhaseIndexAtTime ( SUMOTime  simStep) const
virtualinherited

Returns the index of the logic at the given simulation step.

Returns
The (estimated) index of the tls at the given simulation time step
See also
MSTrafficLightLogic::getPhaseIndexAtTime

Implements MSTrafficLightLogic.

Definition at line 137 of file MSSimpleTrafficLightLogic.cpp.

References MSPhaseDefinition::duration, MSSimpleTrafficLightLogic::getPhase(), MSTrafficLightLogic::myDefaultCycleTime, MSPhaseDefinition::myLastSwitch, and MSSimpleTrafficLightLogic::myStep.

◆ getPhaseNumber()

int MSSimpleTrafficLightLogic::getPhaseNumber ( ) const
virtualinherited

Returns the number of phases.

Returns
The number of this tls program's phases
See also
MSTrafficLightLogic::getPhaseNumber

Implements MSTrafficLightLogic.

Definition at line 98 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myPhases.

◆ getPhases() [1/2]

MSSimpleTrafficLightLogic::Phases & MSSimpleTrafficLightLogic::getPhases ( )
inherited

Returns the phases of this tls program.

Returns
The phases of this tls program
Todo:
Recheck!

Definition at line 110 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myPhases.

◆ getPhases() [2/2]

const MSSimpleTrafficLightLogic::Phases & MSSimpleTrafficLightLogic::getPhases ( ) const
virtualinherited

Returns the phases of this tls program.

Returns
The phases of this tls program
See also
MSTrafficLightLogic::getPhases

Implements MSTrafficLightLogic.

Definition at line 104 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myPhases.

Referenced by GUITLLogicPhasesTrackerWindow::drawValues().

◆ getProgramID()

◆ getSpentDuration()

SUMOTime MSTrafficLightLogic::getSpentDuration ( ) const
inherited

Returns the duration spent in the current phase.

Returns
The time spent in the current phase

Definition at line 287 of file MSTrafficLightLogic.cpp.

References MSPhaseDefinition::duration, MSTrafficLightLogic::getCurrentPhaseDef(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), and MSTrafficLightLogic::getNextSwitchTime().

◆ hasMajor()

bool MSActuatedTrafficLightLogic::hasMajor ( const std::string &  state,
const LaneVector lanes 
) const
protected

return whether there is a major link from the given lane in the given phase

Definition at line 345 of file MSActuatedTrafficLightLogic.cpp.

References MSTrafficLightLogic::getLanesAt(), and LINKSTATE_TL_GREEN_MAJOR.

Referenced by init().

◆ ignoreLinkIndex()

void MSTrafficLightLogic::ignoreLinkIndex ( int  pos)
inherited

ignore pedestrian crossing index in mesosim

Definition at line 366 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myIgnoredIndices.

◆ init()

◆ initMesoTLSPenalties()

void MSTrafficLightLogic::initMesoTLSPenalties ( )
privateinherited

initialize optional meso penalties

XXX penalty for wrap-around red phases is underestimated

Definition at line 311 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::getPhases(), MSGlobals::gMesoTLSPenalty, LINKSTATE_TL_RED, LINKSTATE_TL_REDYELLOW, MAX2(), MSTrafficLightLogic::myLinks, NUMERICAL_EPS, STEPS2TIME, and TIME2STEPS.

Referenced by MSTrafficLightLogic::init().

◆ isSelected()

bool MSTrafficLightLogic::isSelected ( ) const
inherited

whether this logic is selected in the GUI

Definition at line 372 of file MSTrafficLightLogic.cpp.

References MSNet::getInstance(), and MSNet::isSelected().

◆ knowsParameter()

◆ resetLinkStates()

void MSTrafficLightLogic::resetLinkStates ( const std::map< MSLink *, LinkState > &  vals) const
inherited

Resets the states of controlled links.

Parameters
[in]valsThe state of controlled links to use

Definition at line 251 of file MSTrafficLightLogic.cpp.

References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and MSTrafficLightLogic::myLinks.

◆ setCurrentDurationIncrement()

void MSTrafficLightLogic::setCurrentDurationIncrement ( SUMOTime  delay)
inherited

Delays current phase by the given delay.

Parameters
[in]delayThe time by which the current phase shall be delayed

Definition at line 306 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::myCurrentDurationIncrement.

◆ setID()

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

◆ setParameter()

void Parameterised::setParameter ( const std::string &  key,
const std::string &  value 
)
inherited

Sets a parameter.

Parameters
[in]keyThe parameter's name
[in]valueThe parameter's value

Definition at line 45 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::addDistrict(), SUMORouteHandler::addParam(), ShapeHandler::addPOI(), NBEdge::append(), NIImporter_OpenStreetMap::insertNodeChecking(), NBNodeCont::joinNodeCluster(), NBEdge::Lane::Lane(), NIImporter_OpenDrive::loadNetwork(), NIXMLTrafficLightsHandler::myStartElement(), MSStateHandler::myStartElement(), ShapeHandler::myStartElement(), NIXMLNodesHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), GNEAdditionalHandler::parseGenericParameter(), GNEVehicleType::setAttribute(), GNEConnection::setGenericParametersStr(), GNEVehicleType::setGenericParametersStr(), GNELane::setGenericParametersStr(), GNEPoly::setGenericParametersStr(), GNEStop::setGenericParametersStr(), GNEPOI::setGenericParametersStr(), GNEJunction::setGenericParametersStr(), GNERide::setGenericParametersStr(), GNEPersonTrip::setGenericParametersStr(), GNEWalk::setGenericParametersStr(), GNEEdge::setGenericParametersStr(), GNERoute::setGenericParametersStr(), GNEPerson::setGenericParametersStr(), GNEAdditional::setGenericParametersStr(), GNEVehicle::setGenericParametersStr(), NIImporter_OpenDrive::setLaneAttributes(), libsumo::Route::setParameter(), libsumo::Polygon::setParameter(), libsumo::POI::setParameter(), libsumo::TrafficLight::setParameter(), libsumo::Edge::setParameter(), and libsumo::Lane::setParameter().

◆ setPhases()

void MSSimpleTrafficLightLogic::setPhases ( const Phases phases,
int  index 
)
inherited

Replaces the phases and set the phase index.

Definition at line 203 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::deletePhases(), MSSimpleTrafficLightLogic::myPhases, and MSSimpleTrafficLightLogic::myStep.

◆ setShowDetectors()

void MSActuatedTrafficLightLogic::setShowDetectors ( bool  show)

◆ setTrafficLightSignals()

bool MSTrafficLightLogic::setTrafficLightSignals ( SUMOTime  t) const
inherited

Applies the current signal states to controlled links.

Parameters
[in]tThe current time
Returns
Always true
See also
LinkState
MSLink::setTLState

Definition at line 235 of file MSTrafficLightLogic.cpp.

References MSTrafficLightLogic::getCurrentPhaseDef(), MSPhaseDefinition::getState(), and MSTrafficLightLogic::myLinks.

Referenced by MSTLLogicControl::TLSLogicVariants::addLogic(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSRailCrossing::init(), and MSRailSignal::init().

◆ showDetectors()

bool MSActuatedTrafficLightLogic::showDetectors ( ) const
inline

◆ trySwitch()

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 51 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by GNEVehicleType::setAttribute().

◆ updateParameter()

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

◆ writeParams()

Field Documentation

◆ myCurrentDurationIncrement

SUMOTime MSTrafficLightLogic::myCurrentDurationIncrement
protectedinherited

A value for enlarge the current duration.

Definition at line 424 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::setCurrentDurationIncrement(), and MSSimpleTrafficLightLogic::trySwitch().

◆ myDefaultCycleTime

◆ myDetectorGap

double MSActuatedTrafficLightLogic::myDetectorGap
protected

The detector distance in seconds.

Definition at line 137 of file MSActuatedTrafficLightLogic.h.

Referenced by duration(), init(), and MSActuatedTrafficLightLogic().

◆ myEmptyLaneVector

const MSTrafficLightLogic::LaneVector MSTrafficLightLogic::myEmptyLaneVector
staticprotectedinherited

An empty lane vector.

Definition at line 433 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getLanesAt().

◆ myFile

std::string MSActuatedTrafficLightLogic::myFile
protected

The output file for generated detectors.

Definition at line 143 of file MSActuatedTrafficLightLogic.h.

Referenced by init(), and MSActuatedTrafficLightLogic().

◆ myFreq

SUMOTime MSActuatedTrafficLightLogic::myFreq
protected

The frequency for aggregating detector output.

Definition at line 146 of file MSActuatedTrafficLightLogic.h.

Referenced by init(), and MSActuatedTrafficLightLogic().

◆ myID

◆ myIgnoredIndices

std::set<int> MSTrafficLightLogic::myIgnoredIndices
protectedinherited

list of indices that are ignored in mesoscopic simulatino

Definition at line 436 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::adaptLinkInformationFrom(), MSTrafficLightLogic::ignoreLinkIndex(), and MSTrafficLightLogic::init().

◆ myInductLoops

std::vector<MSInductLoop*> MSActuatedTrafficLightLogic::myInductLoops
protected

Definition at line 128 of file MSActuatedTrafficLightLogic.h.

Referenced by gapControl(), init(), and setShowDetectors().

◆ myInductLoopsForPhase

InductLoopMap MSActuatedTrafficLightLogic::myInductLoopsForPhase
protected

A map from phase to induction loops to be used for gap control.

Definition at line 127 of file MSActuatedTrafficLightLogic.h.

Referenced by gapControl(), init(), and trySwitch().

◆ myLanes

◆ myLinks

◆ myLogicType

const TrafficLightType MSTrafficLightLogic::myLogicType
protectedinherited

The type of the logic.

Definition at line 412 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getLogicType().

◆ myMap

◆ myMaxGap

double MSActuatedTrafficLightLogic::myMaxGap
protected

The maximum gap to check in seconds.

Definition at line 131 of file MSActuatedTrafficLightLogic.h.

Referenced by gapControl(), and MSActuatedTrafficLightLogic().

◆ myOverridingTimes

std::vector<SUMOTime> MSTrafficLightLogic::myOverridingTimes
protectedinherited

A list of duration overrides.

Definition at line 421 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::addOverridingDuration(), and MSSimpleTrafficLightLogic::trySwitch().

◆ myPassingTime

double MSActuatedTrafficLightLogic::myPassingTime
protected

The passing time used in seconds.

Definition at line 134 of file MSActuatedTrafficLightLogic.h.

Referenced by init(), and MSActuatedTrafficLightLogic().

◆ myPhases

◆ myProgramID

const std::string MSTrafficLightLogic::myProgramID
protectedinherited

The id of the logic.

Definition at line 409 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getProgramID(), MSDelayBasedTrafficLightLogic::init(), and init().

◆ myShowDetectors

bool MSActuatedTrafficLightLogic::myShowDetectors
protected

Whether the detectors shall be shown in the GUI.

Definition at line 140 of file MSActuatedTrafficLightLogic.h.

Referenced by gapControl(), init(), MSActuatedTrafficLightLogic(), setShowDetectors(), showDetectors(), and trySwitch().

◆ myStep

◆ mySwitchCommand

◆ myVehicleTypes

std::string MSActuatedTrafficLightLogic::myVehicleTypes
protected

Whether detector output separates by vType.

Definition at line 149 of file MSActuatedTrafficLightLogic.h.

Referenced by init(), and MSActuatedTrafficLightLogic().


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