Eclipse SUMO - Simulation of Urban MObility
MSSwarmTrafficLightLogic Class Reference

#include <MSSwarmTrafficLightLogic.h>

Inheritance diagram for MSSwarmTrafficLightLogic:
Collaboration diagram for MSSwarmTrafficLightLogic:

Public Types

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 activate (MSSOTLPolicy *policy)
 
void addPolicy (MSSOTLPolicy *policy)
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
double getBetaNo ()
 
double getBetaSp ()
 
double getChangePlanProbability ()
 
MSSOTLPolicygetCurrentPolicy ()
 Returns the low-level policy currently selected by this high-level tll. More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
double getForgettingCox ()
 
double getGammaNo ()
 
double getGammaSp ()
 
const std::string & getID () const
 Returns the id. More...
 
double getLearningCox ()
 
const std::string getLogicType () const
 Returns the type of the logic as a string. More...
 
SUMOTime getMaxCongestionDuration ()
 
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...
 
double getPheroMaxVal ()
 
std::vector< MSSOTLPolicy * > & getPolicies ()
 Returns the vector of the low-level policies used by this high-level tll. More...
 
double getScaleFactorDispersionIn ()
 
double getScaleFactorDispersionOut ()
 
double getThetaInit ()
 
double getThetaMax ()
 
double getThetaMin ()
 
void init (NLDetectorBuilder &nb)
 Initialises the tls with sensors on incoming and outgoing lanes Sensors are built in the simulation according to the type of sensor specified in the simulation parameter. 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...
 
 MSSwarmTrafficLightLogic (MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > &parameters)
 Constructor without sensors passed. 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 setPhases (const Phases &phases, int index)
 Replaces the phases and set the phase index. More...
 
SUMOTime trySwitch ()
 Switches to the next phase. 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...
 
 ~MSSwarmTrafficLightLogic ()
 
Static Information Retrieval

Switches to the next phase

Parameters
[in]isActiveWhether this program is the currently used one
Returns
The time of the next switch
See also
MSTrafficLightLogic::trySwitch
int getPhaseNumber () const
 Returns the number of phases. More...
 
const PhasesgetPhases () const
 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...
 
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...
 
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
virtual void activateProgram ()
 called when switching programs More...
 
virtual void deactivateProgram ()
 
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

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 Types

typedef std::map< const std::string, std::vector< MSPushButton * > > PhasePushButtons
 

Protected Member Functions

bool allowLine (MSLane *)
 Check if a lane is allowed to be added to the maps pheromoneInputLanes and pheromoneOutputLanes Control in this function if the lane is a walking area, a crossing, or if only pedestrian are allowed. Return true if the lane has to be added, false otherwise. More...
 
double calculateEtaDiff ()
 Method that should calculate the valor of eta a coefficient to evaluate the current policy's work. This eta is based on the difference between the number of vehicles that enters a tl and the ones that exit it. It consider vehicles on a lane with a tl set to red as well to determinate policy work. More...
 
double calculateEtaRatio ()
 
double calculatePhi (int factor)
 Method that should calculate the valor of phi a coefficient to amplify/attenuate eta based on a factor. The factor depends on the situation when the function is called; should be the number of cars in the target lanes or the number of cars in the lanes with a red tl. More...
 
bool canRelease ()
 
void choosePolicy (double phero_in, double phero_out)
 
void choosePolicy (double phero_in, double phero_out, double dispersion_in, double dispersion_out)
 
virtual SUMOTime computeReturnTime ()
 
int countVehicles (MSPhaseDefinition phase)
 
int decideNextPhase ()
 
void decidePolicy ()
 Decide the current policy according to pheromone levels The decision reflects on currentPolicy value. More...
 
MSSOTLE2SensorsgetCountSensors ()
 Return the sensors that count the passage of vehicles in and out of the tl. More...
 
SUMOTime getCurrentPhaseElapsed ()
 
double getDispersionForInputLanes (double average_phero_in)
 
double getDispersionForOutputLanes (double average_phero_out)
 
double getDistanceOfMaxPheroForInputLanes ()
 
double getDistanceOfMaxPheroForOutputLanes ()
 
double getInputSensorsLength ()
 
std::string getLaneLightState (const std::string &laneId)
 
double getOutputSensorsLength ()
 
int getPhaseIndexWithMaxCTS ()
 
double getPheromoneForInputLanes ()
 
double getPheromoneForOutputLanes ()
 
std::string getPoliciesParam ()
 
int getReinforcementMode ()
 
MSSOTLSensorsgetSensors ()
 
double getSpeedThreshold ()
 
int getThreshold ()
 
void initScaleFactorDispersionIn (int lanes_in)
 
void initScaleFactorDispersionOut (int lanes_out)
 
bool isPushButtonPressed ()
 
bool isThresholdPassed ()
 
void logStatus ()
 
void proceedToNextStep ()
 Proceed to the next step. More...
 
void resetLaneCheck ()
 
void resetPheromone ()
 Resets pheromone levels. More...
 
void setStep (int step)
 Forces a specific step. More...
 
void updatePheromoneLevels ()
 Update pheromone levels Pheromone on input lanes is costantly updated Pheromone follows a discrete-time dynamic law "pheromone(k+1) = beta*pheromone(k) + gamma * sensed_val(k)". More...
 
void updatePheromoneLevels (MSLaneId_PheromoneMap &, std::string, const double, const double)
 Utility method to avoid code duplication. More...
 
void updateSensitivities ()
 

Protected Attributes

int carsIn
 
int carsOut
 
SUMOTime congestion_steps
 
bool gotTargetLane
 When true indicates that we've already acquired the target lanes for this particular phase. More...
 
int inTarget
 
LaneCheckMap laneCheck
 Map to check if a lane was already controlled during the elaboration of eta. More...
 
SUMOTime lastThetaSensitivityUpdate
 
bool logData
 
double m_derivativeAlpha
 
std::map< std::string, CircularBuffer< double > * > m_derivativeHistory
 
std::map< std::string, std::vector< int > > m_laneIndexMap
 
int m_losCounter
 
int m_losMaxLimit
 
std::map< std::string, CircularBuffer< double > * > m_meanSpeedHistory
 
std::map< std::string, std::string > m_pheroLevelLog
 
PhasePushButtons m_pushButtons
 
bool m_useVehicleTypesWeights
 
bool mustChange
 When true, indicates that the current policy MUST be changed.
It's used to force the exit from the congestion policy. More...
 
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...
 
int notTarget
 
MSLaneId_PheromoneMap pheromoneInputLanes
 This pheronome is an indicator of congestion on input lanes.
Its levels refer to the average speed of vehicles passing the input lane: the lower the speed the higher the pheromone.
These levels are updated on every input lane, independently on lights state. More...
 
MSLaneId_PheromoneMap pheromoneOutputLanes
 This pheromone is an indicator of congestion on output lanes.
Its levels refer to the average speed of vehicles passing the output lane: the lower the speed the higher the pheromone.
These levels are updated on every output lane, independently on lights state. More...
 
double scaleFactorDispersionIn
 
double scaleFactorDispersionOut
 
bool skipEta
 When true indicates that we can skip the evaluation of eta since we've a congestion policy that is lasting too much. More...
 
std::ofstream swarmLogFile
 
LaneIdVector targetLanes
 A copy of the target lanes of this phase. More...
 

Static Protected Attributes

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

Private Member Functions

void checkPhases ()
 
void deletePhases ()
 frees memory responsibilities More...
 
double getDecayConstant ()
 
int getMode ()
 
int getTargetPhaseMaxLastSelection ()
 
void initMesoTLSPenalties ()
 initialize optional meso penalties More...
 
bool isDecayThresholdActivated ()
 
void resetCTS (int phaseStep)
 
void setToATargetPhase ()
 
void setupCTS ()
 
void updateCTS ()
 
void updateDecayThreshold ()
 

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

MSSOTLPolicycurrentPolicy
 
double decayThreshold
 
int lastChain
 
std::map< int, SUMOTimelastCheckForTargetPhase
 
MSSOTLE2SensorsmyCountSensors
 
std::map< std::string, std::string > myMap
 The key->value map. More...
 
MSSOTLSensorsmySensors
 
std::vector< MSSOTLPolicy * > policies
 
bool sensorsSelfBuilt
 
std::map< int, SUMOTimetargetPhasesCTS
 
std::map< int, int > targetPhasesLastSelection
 

Detailed Description

Definition at line 100 of file MSSwarmTrafficLightLogic.h.

Member Typedef Documentation

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

◆ PhasePushButtons

typedef std::map<const std::string, std::vector<MSPushButton*> > MSSOTLTrafficLightLogic::PhasePushButtons
protectedinherited

Definition at line 116 of file MSSOTLTrafficLightLogic.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

◆ MSSwarmTrafficLightLogic()

MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic ( MSTLLogicControl tlcontrol,
const std::string &  id,
const std::string &  programID,
const Phases phases,
int  step,
SUMOTime  delay,
const std::map< std::string, std::string > &  parameters 
)

Constructor without sensors passed.

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]parametersParameters defined for the tll

Definition at line 27 of file MSSwarmTrafficLightLogic.cpp.

References MSSOTLHiLevelTrafficLightLogic::addPolicy(), congestion_steps, DBG, MSSOTLPolicy::getDesirabilityAlgorithm(), getMaxCongestionDuration(), MSSOTLPolicyDesirability::getMessage(), MSSOTLPolicy::getName(), Parameterised::getParameter(), MSSOTLHiLevelTrafficLightLogic::getPolicies(), getPoliciesParam(), MSSOTLPolicy::getThetaSensitivity(), gotTargetLane, m_useVehicleTypesWeights, mustChange, MSSOTLHiLevelTrafficLightLogic::policies, skipEta, WRITE_ERROR, and WRITE_MESSAGE.

◆ ~MSSwarmTrafficLightLogic()

MSSwarmTrafficLightLogic::~MSSwarmTrafficLightLogic ( )

Member Function Documentation

◆ activate()

void MSSOTLHiLevelTrafficLightLogic::activate ( MSSOTLPolicy policy)
inherited

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

◆ addPolicy()

void MSSOTLHiLevelTrafficLightLogic::addPolicy ( MSSOTLPolicy policy)
inherited

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

◆ allowLine()

bool MSSwarmTrafficLightLogic::allowLine ( MSLane lane)
protected

Check if a lane is allowed to be added to the maps pheromoneInputLanes and pheromoneOutputLanes Control in this function if the lane is a walking area, a crossing, or if only pedestrian are allowed. Return true if the lane has to be added, false otherwise.

Definition at line 90 of file MSSwarmTrafficLightLogic.cpp.

References MSLane::getEdge(), MSLane::getPermissions(), MSEdge::isCrossing(), MSEdge::isWalkingArea(), SVC_BICYCLE, and SVC_PEDESTRIAN.

Referenced by init().

◆ areParametersValid()

◆ calculateEtaDiff()

double MSSwarmTrafficLightLogic::calculateEtaDiff ( )
protected

Method that should calculate the valor of eta a coefficient to evaluate the current policy's work. This eta is based on the difference between the number of vehicles that enters a tl and the ones that exit it. It consider vehicles on a lane with a tl set to red as well to determinate policy work.

Definition at line 679 of file MSSwarmTrafficLightLogic.cpp.

References calculatePhi(), carsIn, carsOut, DBG, MSSOTLTrafficLightLogic::getCountSensors(), MSSOTLHiLevelTrafficLightLogic::getCurrentPolicy(), Named::getID(), MSNet::getInstance(), MSSOTLPolicy::getName(), MSSOTLE2Sensors::getPassedVeh(), inTarget, laneCheck, MSTrafficLightLogic::myLanes, MSTrafficLightLogic::myLinks, notTarget, resetLaneCheck(), MSSOTLE2Sensors::subtractPassedVeh(), targetLanes, time2string(), and WRITE_MESSAGE.

Referenced by updateSensitivities().

◆ calculateEtaRatio()

◆ calculatePhi()

double MSSwarmTrafficLightLogic::calculatePhi ( int  factor)
protected

Method that should calculate the valor of phi a coefficient to amplify/attenuate eta based on a factor. The factor depends on the situation when the function is called; should be the number of cars in the target lanes or the number of cars in the lanes with a red tl.

Parameters
[in]factor- the value to consider to compute this coefficient.

Definition at line 668 of file MSSwarmTrafficLightLogic.cpp.

Referenced by calculateEtaDiff(), and calculateEtaRatio().

◆ canRelease()

◆ changeStepAndDuration()

void MSPhasedTrafficLightLogic::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 182 of file MSPhasedTrafficLightLogic.cpp.

References MSEventControl::addEvent(), MSTrafficLightLogic::SwitchCommand::deschedule(), MSNet::getBeginOfTimestepEvents(), MSNet::getInstance(), MSPhasedTrafficLightLogic::myStep, and MSTrafficLightLogic::mySwitchCommand.

◆ checkPhases()

◆ choosePolicy() [1/2]

void MSSwarmTrafficLightLogic::choosePolicy ( double  phero_in,
double  phero_out 
)
protected

Definition at line 1133 of file MSSwarmTrafficLightLogic.cpp.

References choosePolicy().

◆ choosePolicy() [2/2]

void MSSwarmTrafficLightLogic::choosePolicy ( double  phero_in,
double  phero_out,
double  dispersion_in,
double  dispersion_out 
)
protected

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

◆ computeReturnTime()

virtual SUMOTime MSSwarmTrafficLightLogic::computeReturnTime ( )
inlineprotectedvirtual

Reimplemented from MSSOTLTrafficLightLogic.

Definition at line 227 of file MSSwarmTrafficLightLogic.h.

References DELTA_T.

◆ countVehicles()

◆ deactivateProgram()

void MSTrafficLightLogic::deactivateProgram ( )
virtualinherited

◆ decideNextPhase()

◆ decidePolicy()

◆ deletePhases()

void MSPhasedTrafficLightLogic::deletePhases ( )
privateinherited

frees memory responsibilities

Definition at line 204 of file MSPhasedTrafficLightLogic.cpp.

References MSPhasedTrafficLightLogic::myPhases.

Referenced by MSPhasedTrafficLightLogic::setPhases().

◆ getBetaNo()

double MSSwarmTrafficLightLogic::getBetaNo ( )
inline

◆ getBetaSp()

double MSSwarmTrafficLightLogic::getBetaSp ( )
inline

◆ getChangePlanProbability()

double MSSwarmTrafficLightLogic::getChangePlanProbability ( )
inline

Definition at line 152 of file MSSwarmTrafficLightLogic.h.

References Parameterised::getParameter(), and StringUtils::toDouble().

Referenced by decidePolicy().

◆ getCountSensors()

MSSOTLE2Sensors* MSSOTLTrafficLightLogic::getCountSensors ( )
inlineprotectedinherited

Return the sensors that count the passage of vehicles in and out of the tl.

Definition at line 182 of file MSSOTLTrafficLightLogic.h.

References MSSOTLTrafficLightLogic::myCountSensors.

Referenced by calculateEtaDiff(), calculateEtaRatio(), and updatePheromoneLevels().

◆ getCurrentPhaseDef()

◆ getCurrentPhaseElapsed()

◆ getCurrentPhaseIndex()

int MSPhasedTrafficLightLogic::getCurrentPhaseIndex ( ) const
virtualinherited

◆ getCurrentPolicy()

◆ getDecayConstant()

double MSSOTLTrafficLightLogic::getDecayConstant ( )
inlineprivateinherited

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

◆ getDispersionForInputLanes()

double MSSwarmTrafficLightLogic::getDispersionForInputLanes ( double  average_phero_in)
protected

◆ getDispersionForOutputLanes()

double MSSwarmTrafficLightLogic::getDispersionForOutputLanes ( double  average_phero_out)
protected

◆ getDistanceOfMaxPheroForInputLanes()

double MSSwarmTrafficLightLogic::getDistanceOfMaxPheroForInputLanes ( )
protected

Definition at line 563 of file MSSwarmTrafficLightLogic.cpp.

References DBG, pheromoneInputLanes, and WRITE_MESSAGE.

Referenced by decidePolicy().

◆ getDistanceOfMaxPheroForOutputLanes()

double MSSwarmTrafficLightLogic::getDistanceOfMaxPheroForOutputLanes ( )
protected

Definition at line 598 of file MSSwarmTrafficLightLogic.cpp.

References DBG, pheromoneOutputLanes, and WRITE_MESSAGE.

Referenced by decidePolicy().

◆ getDouble()

◆ getForgettingCox()

double MSSwarmTrafficLightLogic::getForgettingCox ( )
inline

◆ getGammaNo()

double MSSwarmTrafficLightLogic::getGammaNo ( )
inline

◆ getGammaSp()

double MSSwarmTrafficLightLogic::getGammaSp ( )
inline

◆ 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(), LaneStoringVisitor::add(), Named::StoringVisitor::add(), MSVehicleTransfer::add(), MSPModel_Striping::add(), MSPModel_Remote::add(), PCPolyContainer::add(), ShapeContainer::add(), MSDetectorControl::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NLHandler::addConnection(), NBLoadedSUMOTLDef::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(), MSRouteHandler::addStop(), ROVehicle::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(), NIVissimEdge::buildNBEdge(), NGEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), calculateEtaDiff(), 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(), choosePolicy(), MSDevice_SSM::classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), IntermodalRouter< E, L, N, V >::compute(), ROJTRRouter::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(), MSActuatedTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), MSVehicle::Manoeuvre::entryManoeuvreIsComplete(), METriggeredCalibrator::execute(), Command_SaveTLSProgram::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSSwitchStates::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSCalibrator::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(), MSLink::getDescription(), NBTrafficLightDefinition::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), MSActuatedTrafficLightLogic::getDetectorPriority(), GUIPerson::getEdgeID(), GUIMEVehicle::getEdgeID(), MSMeanData::getEdgeID(), libsumo::Lane::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::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(), GUILane::getParameterWindow(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParentName(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), getPheromoneForInputLanes(), 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(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSPerson::MSPersonStage_Driving::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(), MSActuatedTrafficLightLogic::init(), MSDelayBasedTrafficLightLogic::init(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSSOTLTrafficLightLogic::init(), init(), MSTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::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(), MSE2Collector::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Transportable::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_Example::notifyMove(), MSDevice_SSM::notifyMove(), MSE2Collector::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_ToC::notifyMove(), GNETLSEditorFrame::onCmdDefSwitch(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), RODFNet::idComp::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(), 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(), MSDevice_ToC::requestToC(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROPerson::Ride::saveAsXML(), ROVehicle::saveAsXML(), MSBaseVehicle::saveState(), MSLane::saveState(), MSDevice::saveState(), MSDevice_Routing::saveState(), MSDevice_Tripinfo::saveState(), MSDevice_Vehroutes::saveState(), MSTransportableDevice_Routing::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(), NBLoadedTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::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(), MSDevice_SSM::update(), PolygonDynamics::update(), MSDevice_SSM::updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), updatePheromoneLevels(), updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSInstantInductLoop::write(), NBParking::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSMeanData::writeEdge(), NWWriter_SUMO::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSFullExport::writeLane(), MSQueueExport::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(), SUMOPolygon::writeXML(), PointOfInterest::writeXML(), MSE2Collector::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSRouteProbe::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(), AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), NBPTLineCont::findWay(), MSCFModel_CACC::followSpeed(), MSCFModel_W99::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_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getIndexFromOffset()

int MSPhasedTrafficLightLogic::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 159 of file MSPhasedTrafficLightLogic.cpp.

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

◆ getInputSensorsLength()

double MSSOTLTrafficLightLogic::getInputSensorsLength ( )
inlineprotectedinherited

◆ getLaneLightState()

std::string MSSwarmTrafficLightLogic::getLaneLightState ( const std::string &  laneId)
protected

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

◆ getLaneVectors()

const LaneVectorVector& MSTrafficLightLogic::getLaneVectors ( ) const
inlineinherited

◆ getLearningCox()

double MSSwarmTrafficLightLogic::getLearningCox ( )
inline

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

◆ getLogicType()

const std::string MSSwarmTrafficLightLogic::getLogicType ( ) const
inline

Returns the type of the logic as a string.

Returns
The type of the logic

Definition at line 187 of file MSSwarmTrafficLightLogic.h.

◆ getMaxCongestionDuration()

SUMOTime MSSwarmTrafficLightLogic::getMaxCongestionDuration ( )
inline

◆ getMode()

int MSSOTLTrafficLightLogic::getMode ( )
inlineprivateinherited

◆ 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 MSPhasedTrafficLightLogic::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 148 of file MSPhasedTrafficLightLogic.cpp.

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

Referenced by MSPhasedTrafficLightLogic::getPhaseIndexAtTime().

◆ getOutputSensorsLength()

double MSSOTLTrafficLightLogic::getOutputSensorsLength ( )
inlineprotectedinherited

◆ 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(), GUIEdge::drawGL(), GNEConnection::drawGL(), GUIBaseVehicle::drawOnPos(), libsumo::Simulation::findIntermodalRoute(), getBetaNo(), getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), getChangePlanProbability(), GUILane::getColorValue(), GUIVehicle::getColorValue(), GNELane::getColorValue(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), getForgettingCox(), getGammaNo(), getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), getLearningCox(), getMaxCongestionDuration(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), GUIBaseVehicle::getOptionalName(), GUIJunctionWrapper::getOptionalName(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::Simulation::getParameter(), libsumo::POI::getParameter(), libsumo::Polygon::getParameter(), libsumo::Person::getParameter(), libsumo::Route::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), getPheroMaxVal(), getPoliciesParam(), getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), getThetaInit(), getThetaMax(), getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), MSSOTLPhasePolicy::init(), MSSOTLTrafficLightLogic::init(), init(), PushButtonLogic::init(), SigmoidLogic::init(), MSVehicleType::initRailVisualizationParameters(), GNEVehicleType::initRailVisualizationParameters(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic(), GNEVehicleType::overwriteVType(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSDevice_SSM::useGeoCoords(), NWWriter_DlrNavteq::writeLinksUnsplitted(), and NWWriter_OpenDrive::writeRoadObjects().

◆ getParametersMap()

◆ getParametersStr()

◆ getPhase()

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

◆ getPhaseIndexAtTime()

SUMOTime MSPhasedTrafficLightLogic::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 138 of file MSPhasedTrafficLightLogic.cpp.

References MSPhasedTrafficLightLogic::getOffsetFromIndex(), MSPhasedTrafficLightLogic::getPhase(), MSTrafficLightLogic::myDefaultCycleTime, MSPhaseDefinition::myLastSwitch, and MSPhasedTrafficLightLogic::myStep.

◆ getPhaseIndexWithMaxCTS()

◆ getPhaseNumber()

int MSPhasedTrafficLightLogic::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 106 of file MSPhasedTrafficLightLogic.cpp.

References MSPhasedTrafficLightLogic::myPhases.

Referenced by MSSOTLWaveTrafficLightLogic::MSSOTLWaveTrafficLightLogic().

◆ getPhases()

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

◆ getPheroMaxVal()

double MSSwarmTrafficLightLogic::getPheroMaxVal ( )
inline

◆ getPheromoneForInputLanes()

double MSSwarmTrafficLightLogic::getPheromoneForInputLanes ( )
protected

◆ getPheromoneForOutputLanes()

double MSSwarmTrafficLightLogic::getPheromoneForOutputLanes ( )
protected

◆ getPolicies()

std::vector<MSSOTLPolicy*>& MSSOTLHiLevelTrafficLightLogic::getPolicies ( )
inlineinherited

Returns the vector of the low-level policies used by this high-level tll.

Definition at line 84 of file MSSOTLHiLevelTrafficLightLogic.h.

References MSSOTLHiLevelTrafficLightLogic::policies.

Referenced by MSDeterministicHiLevelTrafficLightLogic::choosePolicy(), choosePolicy(), MSSwarmTrafficLightLogic(), and updateSensitivities().

◆ getPoliciesParam()

std::string MSSwarmTrafficLightLogic::getPoliciesParam ( )
inlineprotected

Definition at line 318 of file MSSwarmTrafficLightLogic.h.

References Parameterised::getParameter().

Referenced by MSSwarmTrafficLightLogic().

◆ getProgramID()

◆ getReinforcementMode()

int MSSwarmTrafficLightLogic::getReinforcementMode ( )
inlineprotected

◆ getScaleFactorDispersionIn()

double MSSwarmTrafficLightLogic::getScaleFactorDispersionIn ( )
inline

Definition at line 176 of file MSSwarmTrafficLightLogic.h.

References scaleFactorDispersionIn.

Referenced by getDispersionForInputLanes().

◆ getScaleFactorDispersionOut()

double MSSwarmTrafficLightLogic::getScaleFactorDispersionOut ( )
inline

Definition at line 180 of file MSSwarmTrafficLightLogic.h.

References scaleFactorDispersionOut.

Referenced by getDispersionForOutputLanes().

◆ getSensors()

◆ getSpeedThreshold()

double MSSOTLTrafficLightLogic::getSpeedThreshold ( )
inlineprotectedinherited

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

◆ getTargetPhaseMaxLastSelection()

int MSSOTLTrafficLightLogic::getTargetPhaseMaxLastSelection ( )
inlineprivateinherited

◆ getThetaInit()

double MSSwarmTrafficLightLogic::getThetaInit ( )
inline

◆ getThetaMax()

double MSSwarmTrafficLightLogic::getThetaMax ( )
inline

◆ getThetaMin()

double MSSwarmTrafficLightLogic::getThetaMin ( )
inline

◆ getThreshold()

int MSSOTLTrafficLightLogic::getThreshold ( )
inlineprotectedinherited

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

◆ initScaleFactorDispersionIn()

void MSSwarmTrafficLightLogic::initScaleFactorDispersionIn ( int  lanes_in)
inlineprotected

Definition at line 332 of file MSSwarmTrafficLightLogic.h.

References getPheroMaxVal(), and scaleFactorDispersionIn.

Referenced by init().

◆ initScaleFactorDispersionOut()

void MSSwarmTrafficLightLogic::initScaleFactorDispersionOut ( int  lanes_out)
inlineprotected

Definition at line 360 of file MSSwarmTrafficLightLogic.h.

References getPheroMaxVal(), and scaleFactorDispersionOut.

Referenced by init().

◆ isDecayThresholdActivated()

bool MSSOTLTrafficLightLogic::isDecayThresholdActivated ( )
inlineprivateinherited

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

◆ isPushButtonPressed()

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

◆ isThresholdPassed()

◆ knowsParameter()

◆ logStatus()

void MSSOTLTrafficLightLogic::logStatus ( )
protectedinherited

Definition at line 83 of file MSSOTLTrafficLightLogic.cpp.

◆ proceedToNextStep()

void MSPhasedTrafficLightLogic::proceedToNextStep ( )
protectedinherited

Proceed to the next step.

MEMBER FACTORIZED TO PARENT CLASS (MSTrafficLightLogic)

Definition at line 91 of file MSPhasedTrafficLightLogic.cpp.

References MSPhasedTrafficLightLogic::myStep, and MSPhasedTrafficLightLogic::setStep().

◆ resetCTS()

void MSSOTLTrafficLightLogic::resetCTS ( int  phaseStep)
privateinherited

◆ resetLaneCheck()

void MSSwarmTrafficLightLogic::resetLaneCheck ( )
protected

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

◆ resetPheromone()

void MSSwarmTrafficLightLogic::resetPheromone ( )
protected

Resets pheromone levels.

Definition at line 200 of file MSSwarmTrafficLightLogic.cpp.

References pheromoneInputLanes, and pheromoneOutputLanes.

Referenced by decideNextPhase().

◆ 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 MSPhasedTrafficLightLogic::setPhases ( const Phases phases,
int  index 
)
inherited

Replaces the phases and set the phase index.

Definition at line 195 of file MSPhasedTrafficLightLogic.cpp.

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

◆ setStep()

◆ setToATargetPhase()

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

◆ setupCTS()

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

◆ updateCTS()

◆ updateDecayThreshold()

◆ updateParameters()

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

◆ updatePheromoneLevels() [1/2]

void MSSwarmTrafficLightLogic::updatePheromoneLevels ( )
protected

Update pheromone levels Pheromone on input lanes is costantly updated Pheromone follows a discrete-time dynamic law "pheromone(k+1) = beta*pheromone(k) + gamma * sensed_val(k)".

Definition at line 284 of file MSSwarmTrafficLightLogic.cpp.

References getBetaNo(), getBetaSp(), getGammaNo(), getGammaSp(), pheromoneInputLanes, and pheromoneOutputLanes.

Referenced by decideNextPhase().

◆ updatePheromoneLevels() [2/2]

◆ updateSensitivities()

void MSSwarmTrafficLightLogic::updateSensitivities ( )
protected

◆ writeParams()

Field Documentation

◆ carsIn

int MSSwarmTrafficLightLogic::carsIn
protected

◆ carsOut

int MSSwarmTrafficLightLogic::carsOut
protected

◆ congestion_steps

SUMOTime MSSwarmTrafficLightLogic::congestion_steps
protected

◆ currentPolicy

MSSOTLPolicy* MSSOTLHiLevelTrafficLightLogic::currentPolicy
privateinherited

◆ decayThreshold

◆ gotTargetLane

bool MSSwarmTrafficLightLogic::gotTargetLane
protected

When true indicates that we've already acquired the target lanes for this particular phase.

Definition at line 420 of file MSSwarmTrafficLightLogic.h.

Referenced by decideNextPhase(), and MSSwarmTrafficLightLogic().

◆ inTarget

int MSSwarmTrafficLightLogic::inTarget
protected

◆ laneCheck

LaneCheckMap MSSwarmTrafficLightLogic::laneCheck
protected

Map to check if a lane was already controlled during the elaboration of eta.

Definition at line 406 of file MSSwarmTrafficLightLogic.h.

Referenced by calculateEtaDiff(), calculateEtaRatio(), init(), and resetLaneCheck().

◆ lastChain

◆ lastCheckForTargetPhase

std::map<int, SUMOTime> MSSOTLTrafficLightLogic::lastCheckForTargetPhase
privateinherited

◆ lastThetaSensitivityUpdate

SUMOTime MSSwarmTrafficLightLogic::lastThetaSensitivityUpdate
protected

This member keeps track of the last thresholds update, s.t. updates can be correctly performed even on time-variable interations.

See also
MSSwarmTrafficLightLogic::updateSensitivities()

Definition at line 214 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and updateSensitivities().

◆ logData

bool MSSwarmTrafficLightLogic::logData
protected

Definition at line 394 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and ~MSSwarmTrafficLightLogic().

◆ m_derivativeAlpha

double MSSwarmTrafficLightLogic::m_derivativeAlpha
protected

Definition at line 441 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and updatePheromoneLevels().

◆ m_derivativeHistory

std::map<std::string, CircularBuffer<double>* > MSSwarmTrafficLightLogic::m_derivativeHistory
protected

◆ m_laneIndexMap

std::map<std::string, std::vector<int> > MSSwarmTrafficLightLogic::m_laneIndexMap
protected

Definition at line 433 of file MSSwarmTrafficLightLogic.h.

Referenced by getLaneLightState(), and init().

◆ m_losCounter

int MSSwarmTrafficLightLogic::m_losCounter
protected

Definition at line 442 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and updatePheromoneLevels().

◆ m_losMaxLimit

int MSSwarmTrafficLightLogic::m_losMaxLimit
protected

Definition at line 443 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and updatePheromoneLevels().

◆ m_meanSpeedHistory

std::map<std::string, CircularBuffer<double>* > MSSwarmTrafficLightLogic::m_meanSpeedHistory
protected

◆ m_pheroLevelLog

std::map<std::string, std::string> MSSwarmTrafficLightLogic::m_pheroLevelLog
protected

Definition at line 436 of file MSSwarmTrafficLightLogic.h.

Referenced by updatePheromoneLevels().

◆ m_pushButtons

PhasePushButtons MSSOTLTrafficLightLogic::m_pushButtons
protectedinherited

◆ m_useVehicleTypesWeights

bool MSSwarmTrafficLightLogic::m_useVehicleTypesWeights
protected

Definition at line 444 of file MSSwarmTrafficLightLogic.h.

Referenced by choosePolicy(), and MSSwarmTrafficLightLogic().

◆ mustChange

bool MSSwarmTrafficLightLogic::mustChange
protected

When true, indicates that the current policy MUST be changed.
It's used to force the exit from the congestion policy.

Definition at line 400 of file MSSwarmTrafficLightLogic.h.

Referenced by decideNextPhase(), decidePolicy(), and MSSwarmTrafficLightLogic().

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

◆ myCountSensors

MSSOTLE2Sensors* MSSOTLTrafficLightLogic::myCountSensors
privateinherited

◆ 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

◆ myEmptyLaneVector

const MSTrafficLightLogic::LaneVector MSTrafficLightLogic::myEmptyLaneVector
staticprotectedinherited

An empty lane vector.

Definition at line 435 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getLanesAt().

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

◆ 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

◆ mySensors

◆ myStep

◆ mySwitchCommand

◆ notTarget

int MSSwarmTrafficLightLogic::notTarget
protected

◆ pheromoneInputLanes

MSLaneId_PheromoneMap MSSwarmTrafficLightLogic::pheromoneInputLanes
protected

This pheronome is an indicator of congestion on input lanes.
Its levels refer to the average speed of vehicles passing the input lane: the lower the speed the higher the pheromone.
These levels are updated on every input lane, independently on lights state.

Definition at line 199 of file MSSwarmTrafficLightLogic.h.

Referenced by getDispersionForInputLanes(), getDistanceOfMaxPheroForInputLanes(), getPheromoneForInputLanes(), init(), resetPheromone(), and updatePheromoneLevels().

◆ pheromoneOutputLanes

MSLaneId_PheromoneMap MSSwarmTrafficLightLogic::pheromoneOutputLanes
protected

This pheromone is an indicator of congestion on output lanes.
Its levels refer to the average speed of vehicles passing the output lane: the lower the speed the higher the pheromone.
These levels are updated on every output lane, independently on lights state.

Definition at line 207 of file MSSwarmTrafficLightLogic.h.

Referenced by getDispersionForOutputLanes(), getDistanceOfMaxPheroForOutputLanes(), getPheromoneForOutputLanes(), init(), resetPheromone(), and updatePheromoneLevels().

◆ policies

◆ scaleFactorDispersionIn

double MSSwarmTrafficLightLogic::scaleFactorDispersionIn
protected

\factors to scale pheromoneDispersion in range [0, 10]

Definition at line 429 of file MSSwarmTrafficLightLogic.h.

Referenced by getScaleFactorDispersionIn(), and initScaleFactorDispersionIn().

◆ scaleFactorDispersionOut

double MSSwarmTrafficLightLogic::scaleFactorDispersionOut
protected

◆ sensorsSelfBuilt

bool MSSOTLTrafficLightLogic::sensorsSelfBuilt
privateinherited

◆ skipEta

bool MSSwarmTrafficLightLogic::skipEta
protected

When true indicates that we can skip the evaluation of eta since we've a congestion policy that is lasting too much.

Definition at line 415 of file MSSwarmTrafficLightLogic.h.

Referenced by decideNextPhase(), decidePolicy(), MSSwarmTrafficLightLogic(), and updateSensitivities().

◆ swarmLogFile

std::ofstream MSSwarmTrafficLightLogic::swarmLogFile
protected

Definition at line 395 of file MSSwarmTrafficLightLogic.h.

Referenced by init(), and ~MSSwarmTrafficLightLogic().

◆ targetLanes

LaneIdVector MSSwarmTrafficLightLogic::targetLanes
protected

A copy of the target lanes of this phase.

Definition at line 410 of file MSSwarmTrafficLightLogic.h.

Referenced by calculateEtaDiff(), calculateEtaRatio(), and decideNextPhase().

◆ targetPhasesCTS

◆ targetPhasesLastSelection

std::map<int, int> MSSOTLTrafficLightLogic::targetPhasesLastSelection
privateinherited

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