Eclipse SUMO - Simulation of Urban MObility
MSDelayBasedTrafficLightLogic Class Reference

An actuated traffic light logic based on time delay of approaching vehicles. More...

#include <MSDelayBasedTrafficLightLogic.h>

Inheritance diagram for MSDelayBasedTrafficLightLogic:
Collaboration diagram for MSDelayBasedTrafficLightLogic:

Public Types

typedef std::map< MSLane *, MSDetectorFileOutput * > LaneDetectorMap
 Definition of a map from lanes to corresponding areal detectors. 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...
 
std::string getParametersStr () const
 Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN". More...
 
void init (NLDetectorBuilder &nb)
 Initializes 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...
 
 MSDelayBasedTrafficLightLogic (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 setParameters (const Parameterised &params)
 set the inner key/value map in map<string, string> format More...
 
void setParametersMap (const std::map< std::string, std::string > &paramsMap)
 set the inner key/value map in map<string, string> format More...
 
void setParametersStr (const std::string &paramsString)
 set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN" More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameters (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...
 
 ~MSDelayBasedTrafficLightLogic ()
 Destructor. 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...
 
Switching and setting current rows
SUMOTime trySwitch ()
 Switches to the next phase, if possible. 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...
 
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...
 

Static Public Member Functions

static bool areParametersValid (const std::string &value, bool report=false)
 check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN" More...
 
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

bool myAmActive
 whether the current program is active More...
 
SUMOTime myCurrentDurationIncrement
 A value for enlarge the current duration. More...
 
SUMOTime myDefaultCycleTime
 The cycle time (without changes) More...
 
std::string myID
 The name of the object. More...
 
std::set< int > myIgnoredIndices
 list of indices that are ignored in mesoscopic simulatino 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...
 
std::vector< SUMOTimemyOverridingTimes
 A list of duration overrides. More...
 
Phases myPhases
 The list of phases this logic uses. More...
 
const std::string myProgramID
 The id of the logic. More...
 
int myStep
 The current step. More...
 
SwitchCommandmySwitchCommand
 The current switch command. 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...
 

Static Private Member Functions

static bool isParameterValid (const std::string &value, bool report)
 check if given string can be parsed to a parameter of type "key=value" More...
 

Private Attributes

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

"actuated" algorithm methods

LaneDetectorMap myLaneDetectors
 A map from lanes to the corresponding lane detectors. More...
 
bool myShowDetectors
 Whether the detectors shall be shown in the GUI. More...
 
double myDetectionRange
 Range of the connected detector, which provides the information on approaching vehicles. More...
 
double myTimeLossThreshold
 
std::string myFile
 The output file for generated detectors. More...
 
SUMOTime myFreq
 The frequency for aggregating detector output. More...
 
std::string myVehicleTypes
 Whether detector output separates by vType. More...
 
SUMOTime checkForWaitingTime ()
 Checks for approaching vehicles on the lanes associated with green signals and returns the minimal time to keep the green phase going. This is zero if no vehicle on the lane has gathered any waiting time or if the green time is exhausted (maximal green time has passed since switch). More...
 
SUMOTime proposeProlongation (const SUMOTime actDuration, const SUMOTime maxDuration, bool &othersEmpty)
 The returned, proposed prolongation for the green phase is oriented on the largest estimated passing time among the vehicles with waiting time. 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...
 

Detailed Description

An actuated traffic light logic based on time delay of approaching vehicles.

Todo:
Validate against the original algorithm's details.
Note
The current phase is not prolonged if the passing time of the next approaching vehicle is larger than the remaining greentime (in contrast to the original algorithm)
The maximal green time can be exceeded if no vehicles are present on other approaches;

Definition at line 46 of file MSDelayBasedTrafficLightLogic.h.

Member Typedef Documentation

◆ LaneDetectorMap

Definition of a map from lanes to corresponding areal detectors.

Definition at line 50 of file MSDelayBasedTrafficLightLogic.h.

◆ LaneVector

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

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

Definition at line 70 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 73 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 64 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 67 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 61 of file MSTrafficLightLogic.h.

Constructor & Destructor Documentation

◆ MSDelayBasedTrafficLightLogic()

MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic ( 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 45 of file MSDelayBasedTrafficLightLogic.cpp.

References FileHelpers::checkForRelativity(), OptionsCont::getOptions(), Parameterised::getParameter(), myDetectionRange, myFile, myFreq, myShowDetectors, myTimeLossThreshold, myVehicleTypes, TIME2STEPS, StringUtils::toBool(), StringUtils::toDouble(), and toString().

◆ ~MSDelayBasedTrafficLightLogic()

MSDelayBasedTrafficLightLogic::~MSDelayBasedTrafficLightLogic ( )

Destructor.

Definition at line 100 of file MSDelayBasedTrafficLightLogic.cpp.

Member Function Documentation

◆ activateProgram()

void MSTrafficLightLogic::activateProgram ( )
virtualinherited

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

References Named::StoringVisitor::add().

◆ areParametersValid()

◆ 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 187 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().

◆ checkForWaitingTime()

SUMOTime MSDelayBasedTrafficLightLogic::checkForWaitingTime ( )
protected

Checks for approaching vehicles on the lanes associated with green signals and returns the minimal time to keep the green phase going. This is zero if no vehicle on the lane has gathered any waiting time or if the green time is exhausted (maximal green time has passed since switch).

Returns
Minimal remaining green time.

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 100 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::beginEdgeParsing(), and GNERouteHandler::closeRoute().

◆ 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.

◆ deactivateProgram()

void MSTrafficLightLogic::deactivateProgram ( )
virtualinherited

◆ deletePhases()

void MSSimpleTrafficLightLogic::deletePhases ( )
privateinherited

◆ getCurrentPhaseDef()

◆ 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 123 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 270 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 76 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(), 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(), 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(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNodeTypeComputer::computeNodeTypes(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), MSVehicle::Manoeuvre::configureEntryManoeuvre(), MSVehicle::Manoeuvre::configureExitManoeuvre(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSActuatedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), MSVehicle::Manoeuvre::entryManoeuvreIsComplete(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSProgram::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(), GUITrafficLightLogicWrapper::getActiveTLLogic(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), MSActuatedTrafficLightLogic::getDetectorPriority(), 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(), GNEDialogACChooser::getObjectName(), 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(), MSActuatedTrafficLightLogic::getTarget(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSEdge::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSActuatedTrafficLightLogic::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(), 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_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::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(), MSDevice_Tripinfo::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_Example::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_ToC::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), GNETLSEditorFrame::onCmdDefSwitch(), 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_Connectors_legacy(), 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(), 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(), MSDevice_ToC::requestToC(), 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(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), 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(), MSEmissionExport::write(), MSBatteryExport::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 69 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V >::compute(), AStarRouter< E, V >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), NBPTLineCont::findWay(), 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 165 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 191 of file MSTrafficLightLogic.h.

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

Referenced by GUITrafficLightLogicWrapper::drawGL(), Command_SaveTLSSwitches::execute(), MSActuatedTrafficLightLogic::getMinimumMinDuration(), MSActuatedTrafficLightLogic::hasMajor(), MSActuatedTrafficLightLogic::init(), and 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 212 of file MSTrafficLightLogic.h.

References MSTrafficLightLogic::myLinks.

Referenced by libsumo::TrafficLight::getServedPersonCount(), 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 123 of file MSSimpleTrafficLightLogic.h.

◆ 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 151 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 72 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NBEdge::addRestrictedLane(), FareModul::addStop(), NBEdge::append(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), ROEdge::cacheParamRestrictions(), SUMOVTypeParameter::cacheParamRestrictions(), GNEEdge::drawEdgeName(), GNEConnection::drawGL(), GUIEdge::drawGL(), GUIBaseVehicle::drawOnPos(), libsumo::Simulation::findIntermodalRoute(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSwarmTrafficLightLogic::getChangePlanProbability(), GUIVehicle::getColorValue(), 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(), GUIJunctionWrapper::getOptionalName(), 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(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), 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()

◆ getParametersStr()

◆ 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 115 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 136 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 97 of file MSSimpleTrafficLightLogic.cpp.

References MSSimpleTrafficLightLogic::myPhases.

◆ getPhases() [1/2]

Phases& MSSimpleTrafficLightLogic::getPhases ( )
inherited

Returns the phases of this tls program.

Returns
The phases of this tls program
Todo:
Recheck!

◆ getPhases() [2/2]

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

◆ 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, MSEdge::recalcCache(), STEPS2TIME, and TIME2STEPS.

Referenced by MSTrafficLightLogic::init().

◆ isParameterValid()

bool Parameterised::isParameterValid ( const std::string &  value,
bool  report 
)
staticprivateinherited

check if given string can be parsed to a parameter of type "key=value"

Definition at line 189 of file Parameterised.cpp.

References StringTokenizer::getVector(), SUMOXMLDefinitions::isValidParameterKey(), and SUMOXMLDefinitions::isValidParameterValue().

Referenced by Parameterised::areParametersValid().

◆ 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()

◆ proposeProlongation()

SUMOTime MSDelayBasedTrafficLightLogic::proposeProlongation ( const SUMOTime  actDuration,
const SUMOTime  maxDuration,
bool &  othersEmpty 
)
protected

The returned, proposed prolongation for the green phase is oriented on the largest estimated passing time among the vehicles with waiting time.

Parameters
actDurationDuration of the current phase
maxDurationMaximal duration of the current phase
[in/out]othersEmpty Whether there are vehicles on another approach, which is not part of a green signal group for the current phase
Returns
The proposed prolongation time for the current phase

Definition at line 106 of file MSDelayBasedTrafficLightLogic.cpp.

References MSE2Collector::VehicleInfo::accumulatedTimeLoss, MSE2Collector::VehicleInfo::distToDetectorEnd, MSSimpleTrafficLightLogic::getCurrentPhaseDef(), MSE2Collector::getCurrentVehicles(), Named::getID(), MSTrafficLightLogic::getLanesAt(), MSPhaseDefinition::getState(), MSE2Collector::VehicleInfo::id, LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, MAX2(), myLaneDetectors, MSSimpleTrafficLightLogic::myStep, myTimeLossThreshold, SIMTIME, and TIME2STEPS.

Referenced by trySwitch().

◆ 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()

◆ setParameters()

void Parameterised::setParameters ( const Parameterised params)
inherited

set the inner key/value map in map<string, string> format

Definition at line 127 of file Parameterised.cpp.

References Parameterised::getParametersMap(), and Parameterised::myMap.

◆ setParametersMap()

void Parameterised::setParametersMap ( const std::map< std::string, std::string > &  paramsMap)
inherited

set the inner key/value map in map<string, string> format

Definition at line 133 of file Parameterised.cpp.

References Parameterised::myMap.

◆ setParametersStr()

void Parameterised::setParametersStr ( const std::string &  paramsString)
inherited

◆ setPhases()

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

Replaces the phases and set the phase index.

Definition at line 202 of file MSSimpleTrafficLightLogic.cpp.

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

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

◆ trySwitch()

◆ unsetParameter()

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

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 52 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_OpenStreetMap::insertEdge(), and GNEVehicleType::setAttribute().

◆ updateParameters()

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

◆ writeParams()

Field Documentation

◆ myAmActive

bool MSTrafficLightLogic::myAmActive
protectedinherited

whether the current program is active

Definition at line 441 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::activateProgram(), and MSTrafficLightLogic::deactivateProgram().

◆ myCurrentDurationIncrement

SUMOTime MSTrafficLightLogic::myCurrentDurationIncrement
protectedinherited

A value for enlarge the current duration.

Definition at line 426 of file MSTrafficLightLogic.h.

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

◆ myDefaultCycleTime

◆ myDetectionRange

double MSDelayBasedTrafficLightLogic::myDetectionRange
protected

Range of the connected detector, which provides the information on approaching vehicles.

Definition at line 124 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and MSDelayBasedTrafficLightLogic().

◆ myEmptyLaneVector

const MSTrafficLightLogic::LaneVector MSTrafficLightLogic::myEmptyLaneVector
staticprotectedinherited

An empty lane vector.

Definition at line 435 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getLanesAt().

◆ myFile

std::string MSDelayBasedTrafficLightLogic::myFile
protected

The output file for generated detectors.

Definition at line 132 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and MSDelayBasedTrafficLightLogic().

◆ myFreq

SUMOTime MSDelayBasedTrafficLightLogic::myFreq
protected

The frequency for aggregating detector output.

Definition at line 135 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and MSDelayBasedTrafficLightLogic().

◆ myID

◆ myIgnoredIndices

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

list of indices that are ignored in mesoscopic simulatino

Definition at line 438 of file MSTrafficLightLogic.h.

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

◆ myLaneDetectors

LaneDetectorMap MSDelayBasedTrafficLightLogic::myLaneDetectors
protected

A map from lanes to the corresponding lane detectors.

Definition at line 118 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and proposeProlongation().

◆ myLanes

◆ myLinks

◆ myLogicType

const TrafficLightType MSTrafficLightLogic::myLogicType
protectedinherited

The type of the logic.

Definition at line 414 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getLogicType().

◆ myMap

◆ myOverridingTimes

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

A list of duration overrides.

Definition at line 423 of file MSTrafficLightLogic.h.

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

◆ myPhases

◆ myProgramID

const std::string MSTrafficLightLogic::myProgramID
protectedinherited

The id of the logic.

Definition at line 411 of file MSTrafficLightLogic.h.

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

◆ myShowDetectors

bool MSDelayBasedTrafficLightLogic::myShowDetectors
protected

Whether the detectors shall be shown in the GUI.

Definition at line 121 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and MSDelayBasedTrafficLightLogic().

◆ myStep

◆ mySwitchCommand

◆ myTimeLossThreshold

double MSDelayBasedTrafficLightLogic::myTimeLossThreshold
protected

If a vehicle's timeloss is below myTimeLossThreshold, this is counted as insignificant, since this may stem from dawdling, or driving only slightly slower than the maximal velocity on the lane.

Definition at line 129 of file MSDelayBasedTrafficLightLogic.h.

Referenced by MSDelayBasedTrafficLightLogic(), and proposeProlongation().

◆ myVehicleTypes

std::string MSDelayBasedTrafficLightLogic::myVehicleTypes
protected

Whether detector output separates by vType.

Definition at line 138 of file MSDelayBasedTrafficLightLogic.h.

Referenced by init(), and MSDelayBasedTrafficLightLogic().


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