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) |
Adds a phase. | |
void | addSignalGroup (const std::string &name, SUMOTime startTime, SUMOTime endTime) |
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 intermediateTime, bool phaseDefined) | |
Constructor. | |
~NIVisumTL () | |
Destructor. | |
Private Attributes | |
SUMOTime | myCycleTime |
SUMOTime | myIntermediateTime |
std::string | myName |
std::vector< NBNode * > | myNodes |
bool | myPhaseDefined |
std::map< std::string, Phase * > | myPhases |
std::map< std::string, SignalGroup * > | mySignalGroups |
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 | intermediateTime, | ||
bool | phaseDefined | ||
) |
Constructor.
[in] | name | The name of the TLS |
[in] | cycleTime | The cycle time of the TLS |
[in] | intermediateTime | The name of the TLS |
[in] | phaseDefined | Whether phases are defined |
Definition at line 49 of file NIVisumTL.cpp.
void NIVisumTL::addNode | ( | NBNode * | n | ) | [inline] |
void NIVisumTL::addPhase | ( | const std::string & | name, |
SUMOTime | startTime, | ||
SUMOTime | endTime | ||
) |
void NIVisumTL::addSignalGroup | ( | const std::string & | name, |
SUMOTime | startTime, | ||
SUMOTime | endTime | ||
) |
void NIVisumTL::build | ( | NBTrafficLightLogicCont & | tlc | ) |
build the traffic light and add it to the given container
Definition at line 85 of file NIVisumTL.cpp.
References NBLoadedTLDef::addSignalGroup(), NBLoadedTLDef::addSignalGroupPhaseBegin(), NBLoadedTLDef::addToSignalGroup(), NIVisumTL::SignalGroup::connections(), NIVisumTL::TimePeriod::getEndTime(), Named::getID(), NIVisumTL::TimePeriod::getStartTime(), NBTrafficLightLogicCont::insert(), myCycleTime, myIntermediateTime, myNodes, myPhaseDefined, mySignalGroups, NIVisumTL::SignalGroup::phases(), NBLoadedTLDef::setCycleDuration(), NBLoadedTLDef::setSignalYellowTimes(), NBTrafficLightDefinition::TLCOLOR_GREEN, and NBTrafficLightDefinition::TLCOLOR_RED.
std::map<std::string, Phase*>& NIVisumTL::getPhases | ( | ) | [inline] |
NIVisumTL::SignalGroup & NIVisumTL::getSignalGroup | ( | const std::string & | name | ) |
Returns the named signal group.
Definition at line 79 of file NIVisumTL.cpp.
References mySignalGroups.
SUMOTime NIVisumTL::myCycleTime [private] |
Definition at line 170 of file NIVisumTL.h.
Referenced by build().
SUMOTime NIVisumTL::myIntermediateTime [private] |
Definition at line 173 of file NIVisumTL.h.
Referenced by build().
std::string NIVisumTL::myName [private] |
Definition at line 167 of file NIVisumTL.h.
std::vector<NBNode*> NIVisumTL::myNodes [private] |
Definition at line 179 of file NIVisumTL.h.
bool NIVisumTL::myPhaseDefined [private] |
Definition at line 176 of file NIVisumTL.h.
Referenced by build().
std::map<std::string, Phase*> NIVisumTL::myPhases [private] |
Definition at line 182 of file NIVisumTL.h.
Referenced by addPhase(), getPhases(), and ~NIVisumTL().
std::map<std::string, SignalGroup*> NIVisumTL::mySignalGroups [private] |
Definition at line 185 of file NIVisumTL.h.
Referenced by addSignalGroup(), build(), getSignalGroup(), and ~NIVisumTL().