Eclipse 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 (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. | |
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 |
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. | |
Intermediate class for storing visum traffic lights during their import.
Definition at line 41 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 36 of file NIVisumTL.cpp.
NIVisumTL::~NIVisumTL | ( | ) |
|
inline |
void NIVisumTL::build | ( | NBEdgeCont & | ec, |
NBTrafficLightLogicCont & | tlc | ||
) |
build the traffic light and add it to the given container
Definition at line 72 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, myName, myNodes, myOffset, myPhaseDefined, mySignalGroups, NIVisumTL::SignalGroup::phases(), NBLoadedTLDef::setCycleDuration(), NBLoadedTLDef::setSignalYellowTimes(), TL, NBTrafficLightDefinition::TLCOLOR_GREEN, NBTrafficLightDefinition::TLCOLOR_RED, SUMOXMLDefinitions::TrafficLightTypes, and WRITE_WARNINGF.
|
inline |
Returns the map of named phases.
Definition at line 159 of file NIVisumTL.h.
References myPhases.
Referenced by NIImporter_VISUM::parse_SignalGroupsToPhases().
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().
|
private |
The cycle time of traffic light in seconds.
Definition at line 174 of file NIVisumTL.h.
Referenced by build().
|
private |
|
private |
|
private |
Vector of nodes belonging to this traffic light.
Definition at line 186 of file NIVisumTL.h.
|
private |
|
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().
|
private |
Map of used phases if phases defined.
Definition at line 189 of file NIVisumTL.h.
Referenced by addPhase(), getPhases(), and ~NIVisumTL().
|
private |
Map of used signal groups.
Definition at line 192 of file NIVisumTL.h.
Referenced by addSignalGroup(), build(), getSignalGroup(), and ~NIVisumTL().