Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NIVisumTL Class Reference

Intermediate class for storing visum traffic lights during their import. More...

#include <NIVisumTL.h>

Data Structures

class  Phase
 A phase. More...
 
class  SignalGroup
 A signal group can be defined either by a time period or by phases. More...
 
class  TimePeriod
 A time period with a start and an end time. More...
 

Public Member Functions

void addNode (NBNode *n)
 Adds a node to control.
 
void addPhase (const std::string &name, SUMOTime startTime, SUMOTime endTime, SUMOTime yellowTime)
 Adds a phase.
 
void addSignalGroup (const std::string &name, SUMOTime startTime, SUMOTime endTime, SUMOTime yellowTime)
 Adds a signal group.
 
void build (NBEdgeCont &ec, NBTrafficLightLogicCont &tlc)
 build the traffic light and add it to the given container
 
std::map< std::string, Phase * > & getPhases ()
 Returns the map of named phases.
 
SignalGroupgetSignalGroup (const std::string &name)
 Returns the named signal group.
 
 NIVisumTL (const std::string &name, SUMOTime cycleTime, SUMOTime offset, SUMOTime intermediateTime, bool phaseDefined)
 Constructor.
 
 ~NIVisumTL ()
 Destructor.
 

Private Attributes

SUMOTime myCycleTime
 The cycle time of traffic light in seconds.
 
SUMOTime myIntermediateTime
 The all-red time (unused here)
 
std::string myName
 The name of traffic light.
 
std::vector< NBNode * > myNodes
 Vector of nodes belonging to this traffic light.
 
SUMOTime myOffset
 The offset in the plan.
 
bool myPhaseDefined
 Toggles the usage either of phases or of time periods in signal groups.
 
std::map< std::string, Phase * > myPhases
 Map of used phases if phases defined.
 
std::map< std::string, SignalGroup * > mySignalGroups
 Map of used signal groups.
 

Detailed Description

Intermediate class for storing visum traffic lights during their import.

Definition at line 41 of file NIVisumTL.h.

Constructor & Destructor Documentation

◆ NIVisumTL()

NIVisumTL::NIVisumTL ( const std::string &  name,
SUMOTime  cycleTime,
SUMOTime  offset,
SUMOTime  intermediateTime,
bool  phaseDefined 
)

Constructor.

Parameters
[in]nameThe name of the TLS
[in]cycleTimeThe cycle time of the TLS
[in]offsetSeconds to skip
[in]intermediateTimeThe name of the TLS
[in]phaseDefinedWhether phases are defined

Definition at line 36 of file NIVisumTL.cpp.

◆ ~NIVisumTL()

NIVisumTL::~NIVisumTL ( )

Destructor.

Definition at line 43 of file NIVisumTL.cpp.

References myPhases, and mySignalGroups.

Member Function Documentation

◆ addNode()

void NIVisumTL::addNode ( NBNode n)
inline

Adds a node to control.

Definition at line 148 of file NIVisumTL.h.

References myNodes.

◆ addPhase()

void NIVisumTL::addPhase ( const std::string &  name,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  yellowTime 
)

Adds a phase.

Definition at line 60 of file NIVisumTL.cpp.

References myPhases.

◆ addSignalGroup()

void NIVisumTL::addSignalGroup ( const std::string &  name,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  yellowTime 
)

Adds a signal group.

Definition at line 54 of file NIVisumTL.cpp.

References mySignalGroups.

◆ build()

◆ getPhases()

std::map< std::string, Phase * > & NIVisumTL::getPhases ( )
inline

Returns the map of named phases.

Definition at line 159 of file NIVisumTL.h.

References myPhases.

Referenced by NIImporter_VISUM::parse_SignalGroupsToPhases().

Here is the caller graph for this function:

◆ getSignalGroup()

NIVisumTL::SignalGroup & NIVisumTL::getSignalGroup ( const std::string &  name)

Returns the named signal group.

Definition at line 66 of file NIVisumTL.cpp.

References mySignalGroups.

Referenced by NIImporter_VISUM::parse_SignalGroupsToPhases().

Here is the caller graph for this function:

Field Documentation

◆ myCycleTime

SUMOTime NIVisumTL::myCycleTime
private

The cycle time of traffic light in seconds.

Definition at line 174 of file NIVisumTL.h.

Referenced by build().

◆ myIntermediateTime

SUMOTime NIVisumTL::myIntermediateTime
private

The all-red time (unused here)

Definition at line 180 of file NIVisumTL.h.

Referenced by build().

◆ myName

std::string NIVisumTL::myName
private

The name of traffic light.

Definition at line 171 of file NIVisumTL.h.

Referenced by build().

◆ myNodes

std::vector<NBNode*> NIVisumTL::myNodes
private

Vector of nodes belonging to this traffic light.

Definition at line 186 of file NIVisumTL.h.

Referenced by addNode(), and build().

◆ myOffset

SUMOTime NIVisumTL::myOffset
private

The offset in the plan.

Definition at line 177 of file NIVisumTL.h.

Referenced by build().

◆ myPhaseDefined

bool NIVisumTL::myPhaseDefined
private

Toggles the usage either of phases or of time periods in signal groups.

Definition at line 183 of file NIVisumTL.h.

Referenced by build().

◆ myPhases

std::map<std::string, Phase*> NIVisumTL::myPhases
private

Map of used phases if phases defined.

Definition at line 189 of file NIVisumTL.h.

Referenced by addPhase(), getPhases(), and ~NIVisumTL().

◆ mySignalGroups

std::map<std::string, SignalGroup*> NIVisumTL::mySignalGroups
private

Map of used signal groups.

Definition at line 192 of file NIVisumTL.h.

Referenced by addSignalGroup(), build(), getSignalGroup(), and ~NIVisumTL().


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