Eclipse SUMO - Simulation of Urban MObility
NIVisumTL Class Reference

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

#include <NIVisumTL.h>

Collaboration diagram for NIVisumTL:

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

Private Attributes

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

Detailed Description

Intermediate class for storing visum traffic lights during their import.

Definition at line 44 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 38 of file NIVisumTL.cpp.

◆ ~NIVisumTL()

NIVisumTL::~NIVisumTL ( )

Destructor.

Definition at line 45 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 147 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 62 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 56 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 158 of file NIVisumTL.h.

References myPhases.

◆ getSignalGroup()

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

Returns the named signal group.

Definition at line 68 of file NIVisumTL.cpp.

References mySignalGroups.

Field Documentation

◆ myCycleTime

SUMOTime NIVisumTL::myCycleTime
private

The cycle time of traffic light in seconds.

Definition at line 173 of file NIVisumTL.h.

Referenced by build().

◆ myIntermediateTime

SUMOTime NIVisumTL::myIntermediateTime
private

The all-red time (unused here)

Definition at line 179 of file NIVisumTL.h.

Referenced by build().

◆ myName

std::string NIVisumTL::myName
private

The name of traffic light.

Definition at line 170 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 185 of file NIVisumTL.h.

Referenced by addNode(), and build().

◆ myOffset

SUMOTime NIVisumTL::myOffset
private

The offset in the plan.

Definition at line 176 of file NIVisumTL.h.

Referenced by build().

◆ myPhaseDefined

bool NIVisumTL::myPhaseDefined
private

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

Definition at line 182 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 188 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 191 of file NIVisumTL.h.

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


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