SUMO - Simulation of Urban MObility
|
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 (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. | |
SignalGroup & | getSignalGroup (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 |
Toogles 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. |
Intermediate class for storing visum traffic lights during their import.
Definition at line 50 of file NIVisumTL.h.
NIVisumTL::NIVisumTL | ( | const std::string & | name, |
SUMOTime | cycleTime, | ||
SUMOTime | offset, | ||
SUMOTime | intermediateTime, | ||
bool | phaseDefined | ||
) |
Constructor.
[in] | name | The name of the TLS |
[in] | cycleTime | The cycle time of the TLS |
[in] | offset | Seconds to skip |
[in] | intermediateTime | The name of the TLS |
[in] | phaseDefined | Whether phases are defined |
Definition at line 47 of file NIVisumTL.cpp.
NIVisumTL::~NIVisumTL | ( | ) |
|
inline |
void NIVisumTL::build | ( | NBTrafficLightLogicCont & | tlc | ) |
build the traffic light and add it to the given container
Definition at line 83 of file NIVisumTL.cpp.
References NBLoadedTLDef::addSignalGroup(), NBLoadedTLDef::addSignalGroupPhaseBegin(), NBLoadedTLDef::addToSignalGroup(), NIVisumTL::SignalGroup::connections(), StringBijection< T >::get(), NIVisumTL::TimePeriod::getEndTime(), Named::getID(), OptionsCont::getOptions(), NIVisumTL::TimePeriod::getStartTime(), NIVisumTL::TimePeriod::getYellowTime(), NBTrafficLightLogicCont::insert(), MAX2(), myCycleTime, myIntermediateTime, myNodes, myOffset, myPhaseDefined, mySignalGroups, NIVisumTL::SignalGroup::phases(), NBLoadedTLDef::setCycleDuration(), NBLoadedTLDef::setSignalYellowTimes(), NBTrafficLightDefinition::TLCOLOR_GREEN, NBTrafficLightDefinition::TLCOLOR_RED, and SUMOXMLDefinitions::TrafficLightTypes.
|
inline |
NIVisumTL::SignalGroup & NIVisumTL::getSignalGroup | ( | const std::string & | name | ) |
Returns the named signal group.
Definition at line 77 of file NIVisumTL.cpp.
References mySignalGroups.
|
private |
The cycle time of traffic light in seconds.
Definition at line 179 of file NIVisumTL.h.
Referenced by build().
|
private |
|
private |
The name of traffic light.
Definition at line 176 of file NIVisumTL.h.
|
private |
Vector of nodes belonging to this traffic light.
Definition at line 191 of file NIVisumTL.h.
|
private |
|
private |
Toogles the usage either of phases or of time periods in signal groups.
Definition at line 188 of file NIVisumTL.h.
Referenced by build().
|
private |
Map of used phases if phases defined.
Definition at line 194 of file NIVisumTL.h.
Referenced by addPhase(), getPhases(), and ~NIVisumTL().
|
private |
Map of used signal groups.
Definition at line 197 of file NIVisumTL.h.
Referenced by addSignalGroup(), build(), getSignalGroup(), and ~NIVisumTL().