#include <MSOffTrafficLightLogic.h>

Definition at line 48 of file MSOffTrafficLightLogic.h.
Public Types | |
Structure definitions | |
| typedef std::vector< MSLane * > | LaneVector |
| Definition of the list of links that participate in this tl-light. | |
| typedef std::vector< LaneVector > | LaneVectorVector |
| Definition of a list that holds lists of links that do have the same attribute. | |
| typedef std::vector< MSLink * > | LinkVector |
| Definition of the list of links that participate in this tl-light. | |
| typedef std::vector< LinkVector > | LinkVectorVector |
| Definition of a list that holds lists of links that do have the same attribute. | |
| typedef std::vector < MSPhaseDefinition * > | Phases |
| Definition of a list of phases, being the junction logic. | |
Public Member Functions | |
| virtual void | init (NLDetectorBuilder &nb) throw (ProcessError) |
| Initialises the tls with information about incoming lanes. | |
| MSOffTrafficLightLogic (MSTLLogicControl &tlcontrol, const std::string &id) throw () | |
| Constructor. | |
| ~MSOffTrafficLightLogic () throw () | |
| Destructor. | |
Handling of controlled links | |
| void | adaptLinkInformationFrom (const MSTrafficLightLogic &logic) throw () |
| Applies information about controlled links and lanes from the given logic. | |
Handling of controlled links | |
| void | addLink (MSLink *link, MSLane *lane, unsigned int pos) throw () |
| Adds a link on building. | |
| std::map< MSLink *, std::pair < MSLink::LinkState, bool > > | collectLinkStates () const throw () |
| Returns the (uncontrolled) states of the controlled links. | |
| void | resetLinkStates (const std::map< MSLink *, std::pair< MSLink::LinkState, bool > > &vals) const throw () |
| Resets the states of controlled links. | |
Changing phases and phase durations | |
| void | addOverridingDuration (SUMOTime duration) throw () |
| Changes the duration of the next phase. | |
| void | setCurrentDurationIncrement (SUMOTime delay) throw () |
| Delays current phase by the given delay. | |
Changing phases and phase durations | |
| void | changeStepAndDuration (MSTLLogicControl &tlcontrol, SUMOTime simStep, unsigned int step, SUMOTime stepDuration) throw () |
| Changes the current phase and her duration. | |
Dynamic Information Retrieval | |
| const MSPhaseDefinition & | getCurrentPhaseDef () const throw () |
| Returns the definition of the current phase. | |
| unsigned int | getCurrentPhaseIndex () const throw () |
| Returns the current index within the program. | |
Dynamic Information Retrieval | |
| unsigned int | getDefaultCycleTime () const throw () |
| Returns the cycle time. | |
| SUMOTime | getNextSwitchTime () const throw () |
| Returns the assumed next switch time. | |
Static Information Retrieval | |
| const std::string & | getID () const throw () |
| Returns this tl-logic's id. | |
| const LaneVectorVector & | getLanes () const throw () |
| Returns the list of lists of all lanes controlled by this tls. | |
| const LaneVector & | getLanesAt (unsigned int i) const throw () |
| Returns the list of lanes that are controlled by the signals at the given position. | |
| int | getLinkIndex (const MSLink *const link) const throw () |
| Returns the index of the given link. | |
| const LinkVectorVector & | getLinks () const throw () |
| Returns the list of lists of all affected links. | |
| const LinkVector & | getLinksAt (unsigned int i) const throw () |
| Returns the list of links that are controlled by the signals at the given position. | |
| const std::string & | getSubID () const throw () |
| Returns this tl-logic's id. | |
Conversion between time and phase | |
| unsigned int | getIndexFromOffset (unsigned int offset) const throw () |
| Returns the step (the phasenumber) of a given position of the cycle. | |
| unsigned int | getOffsetFromIndex (unsigned int index) const throw () |
| Returns the position (start of a phase during a cycle) from of a given step. | |
| unsigned int | getPhaseIndexAtTime (SUMOTime simStep) const throw () |
| Returns the index of the logic at the given simulation step. | |
Algorithm parameter handling | |
| std::string | getParameterValue (const std::string &key) const throw () |
| Returns a named parameter. | |
| void | setParameter (const std::map< std::string, std::string > ¶ms) throw () |
| Inserts read parameter. | |
Static Information Retrieval | |
| const MSPhaseDefinition & | getPhase (unsigned int givenstep) const throw () |
| Returns the definition of the phase from the given position within the plan. | |
| unsigned int | getPhaseNumber () const throw () |
| Returns the number of phases. | |
| const Phases & | getPhases () const throw () |
| Returns the phases of this tls program. | |
Switching and setting current rows | |
| void | setLinkPriorities () const throw () |
| Applies the priorities resulting from the current phase to controlled links. | |
| bool | setTrafficLightSignals () const throw () |
| Clears all incoming vehicle information on links that have red. | |
| SUMOTime | trySwitch (bool isActive) throw () |
| Switches to the next phase. | |
Protected Attributes | |
| SUMOTime | myCurrentDurationIncrement |
| A value for enlarge the current duration. | |
| unsigned int | myDefaultCycleTime |
| The cycle time (without changes). | |
| std::string | myID |
| The id of the logic. | |
| LaneVectorVector | myLanes |
| The list of links which do participate in this traffic light. | |
| LinkVectorVector | myLinks |
| The list of links which do participate in this traffic light. | |
| std::vector< SUMOTime > | myOverridingTimes |
| A list of duration overrides. | |
| std::map< std::string, std::string > | myParameter |
| Given parameter. | |
| std::string | mySubID |
| SwitchCommand * | mySwitchCommand |
| The current switch command. | |
Private Member Functions | |
| void | rebuildPhase () throw () |
| (Re)builds the internal phase definition | |
Private Attributes | |
| MSTrafficLightLogic::Phases | myPhaseDefinition |
| The phase definition (only one). | |
typedef std::vector<MSLane*> MSTrafficLightLogic::LaneVector [inherited] |
Definition of the list of links that participate in this tl-light.
Definition at line 72 of file MSTrafficLightLogic.h.
typedef std::vector<LaneVector> MSTrafficLightLogic::LaneVectorVector [inherited] |
Definition of a list that holds lists of links that do have the same attribute.
Definition at line 75 of file MSTrafficLightLogic.h.
typedef std::vector<MSLink*> MSTrafficLightLogic::LinkVector [inherited] |
Definition of the list of links that participate in this tl-light.
Definition at line 66 of file MSTrafficLightLogic.h.
typedef std::vector<LinkVector> MSTrafficLightLogic::LinkVectorVector [inherited] |
Definition of a list that holds lists of links that do have the same attribute.
Definition at line 69 of file MSTrafficLightLogic.h.
typedef std::vector<MSPhaseDefinition*> MSTrafficLightLogic::Phases [inherited] |
Definition of a list of phases, being the junction logic.
Definition at line 63 of file MSTrafficLightLogic.h.
| MSOffTrafficLightLogic::MSOffTrafficLightLogic | ( | MSTLLogicControl & | tlcontrol, | |
| const std::string & | id | |||
| ) | throw () |
Constructor.
| [in] | tlcontrol | The tls control responsible for this tls |
| [in] | id | This tls' id The sub-id is always "off". |
Definition at line 45 of file MSOffTrafficLightLogic.cpp.
00047 : MSTrafficLightLogic(tlcontrol, id, "off", 0) { 00048 myDefaultCycleTime = 120; 00049 }
| MSOffTrafficLightLogic::~MSOffTrafficLightLogic | ( | ) | throw () |
Destructor.
Definition at line 52 of file MSOffTrafficLightLogic.cpp.
References myPhaseDefinition.
00052 { 00053 for (MSTrafficLightLogic::Phases::const_iterator i=myPhaseDefinition.begin(); i!=myPhaseDefinition.end(); ++i) { 00054 delete *i; 00055 } 00056 }
| void MSOffTrafficLightLogic::adaptLinkInformationFrom | ( | const MSTrafficLightLogic & | logic | ) | throw () [virtual] |
Applies information about controlled links and lanes from the given logic.
| [in] | logic | The logic to use the information about controlled links/lanes from |
Reimplemented from MSTrafficLightLogic.
Definition at line 67 of file MSOffTrafficLightLogic.cpp.
References MSTrafficLightLogic::adaptLinkInformationFrom(), and rebuildPhase().
00067 { 00068 MSTrafficLightLogic::adaptLinkInformationFrom(logic); 00069 rebuildPhase(); 00070 }
| void MSTrafficLightLogic::addLink | ( | MSLink * | link, | |
| MSLane * | lane, | |||
| unsigned int | pos | |||
| ) | throw () [inherited] |
Adds a link on building.
| [in] | link | The controlled link |
| [in] | lane | The lane this link starts at |
| [in] | pos | The link's index (signal group) within this program |
Definition at line 122 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLanes, and MSTrafficLightLogic::myLinks.
00122 { 00123 // !!! should be done within the loader (checking necessary) 00124 myLinks.reserve(pos+1); 00125 while (myLinks.size()<=pos) { 00126 myLinks.push_back(LinkVector()); 00127 } 00128 myLinks[pos].push_back(link); 00129 // 00130 myLanes.reserve(pos+1); 00131 while (myLanes.size()<=pos) { 00132 myLanes.push_back(LaneVector()); 00133 } 00134 myLanes[pos].push_back(lane); 00135 }
| void MSTrafficLightLogic::addOverridingDuration | ( | SUMOTime | duration | ) | throw () [inherited] |
Changes the duration of the next phase.
| [in] | duration | The new duration |
Definition at line 198 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myOverridingTimes.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
00198 { 00199 myOverridingTimes.push_back(duration); 00200 }
| void MSOffTrafficLightLogic::changeStepAndDuration | ( | MSTLLogicControl & | tlcontrol, | |
| SUMOTime | simStep, | |||
| unsigned int | step, | |||
| SUMOTime | stepDuration | |||
| ) | throw () [inline, virtual] |
Changes the current phase and her duration.
| [in] | tlcontrol | The responsible traffic lights control |
| [in] | simStep | The current simulation step |
| [in] | step | Index of the phase to use |
| [in] | stepDuration | The left duration of the phase |
Implements MSTrafficLightLogic.
Definition at line 201 of file MSOffTrafficLightLogic.h.
| std::map< MSLink *, std::pair< MSLink::LinkState, bool > > MSTrafficLightLogic::collectLinkStates | ( | ) | const throw () [inherited] |
Returns the (uncontrolled) states of the controlled links.
Definition at line 146 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLinks.
Referenced by MSTLLogicControl::TLSLogicVariants::saveInitialStates().
00146 { 00147 std::map<MSLink*, std::pair<MSLink::LinkState, bool> > ret; 00148 for (LinkVectorVector::const_iterator i1=myLinks.begin(); i1!=myLinks.end(); ++i1) { 00149 const LinkVector &l = (*i1); 00150 for (LinkVector::const_iterator i2=l.begin(); i2!=l.end(); ++i2) { 00151 ret[*i2] = std::make_pair((*i2)->getState(), (*i2)->havePriority()); 00152 } 00153 } 00154 return ret; 00155 }
| const MSPhaseDefinition & MSOffTrafficLightLogic::getCurrentPhaseDef | ( | ) | const throw () [virtual] |
Returns the definition of the current phase.
Implements MSTrafficLightLogic.
Definition at line 116 of file MSOffTrafficLightLogic.cpp.
References myPhaseDefinition.
00116 { 00117 return *myPhaseDefinition[0]; 00118 }
| unsigned int MSOffTrafficLightLogic::getCurrentPhaseIndex | ( | ) | const throw () [virtual] |
Returns the current index within the program.
Implements MSTrafficLightLogic.
Definition at line 110 of file MSOffTrafficLightLogic.cpp.
| unsigned int MSTrafficLightLogic::getDefaultCycleTime | ( | ) | const throw () [inline, inherited] |
Returns the cycle time.
Definition at line 261 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myDefaultCycleTime.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), and MSTLLogicControl::WAUTSwitchProcedure::isPosAtGSP().
00261 { 00262 return myDefaultCycleTime; 00263 }
| const std::string& MSTrafficLightLogic::getID | ( | ) | const throw () [inline, inherited] |
Returns this tl-logic's id.
Definition at line 168 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myID.
Referenced by GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTrafficLightLogic::SwitchCommand::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSState::execute(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), GUITrafficLightLogicWrapper::getMicrosimID(), GUITrafficLightLogicWrapper::getPopUpMenu(), traci::TraCIServer::handleTrafficLightDomain(), GUINet::initTLMap(), MSTLLogicControl::isActive(), GUIViewTraffic::onGamingClick(), and GUITrafficLightLogicWrapper::switchTLSLogic().
00168 { 00169 return myID; 00170 }
| unsigned int MSOffTrafficLightLogic::getIndexFromOffset | ( | unsigned int | offset | ) | const throw () [virtual] |
Returns the step (the phasenumber) of a given position of the cycle.
| [in] | offset | The offset (time) for which the according phase shall be returned |
Implements MSTrafficLightLogic.
Definition at line 135 of file MSOffTrafficLightLogic.cpp.
| const LaneVectorVector& MSTrafficLightLogic::getLanes | ( | ) | const throw () [inline, inherited] |
Returns the list of lists of all lanes controlled by this tls.
Definition at line 184 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLanes.
Referenced by GUITrafficLightLogicWrapper::getCenteringBoundary(), and TraCIServerAPI_TLS::processGet().
00184 { 00185 return myLanes; 00186 }
| const LaneVector& MSTrafficLightLogic::getLanesAt | ( | unsigned int | i | ) | const throw () [inline, inherited] |
Returns the list of lanes that are controlled by the signals at the given position.
| [in] | i | The index of the signal |
Definition at line 193 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLanes.
Referenced by MSAgentbasedTrafficLightLogic::collectData(), traci::TraCIServer::commandGetTLStatus(), MSUnboundActuatedTrafficLightLogic::duration(), MSActuatedTrafficLightLogic::duration(), Command_SaveTLSSwitches::execute(), MSUnboundActuatedTrafficLightLogic::gapControl(), MSActuatedTrafficLightLogic::gapControl(), traci::TraCIServer::handleTrafficLightDomain(), and GUIViewTraffic::onGamingClick().
00193 { 00194 return myLanes[i]; 00195 }
| int MSTrafficLightLogic::getLinkIndex | ( | const MSLink *const | link | ) | const throw () [inherited] |
Returns the index of the given link.
| [in] | link | The link to retrieve the index for |
Definition at line 174 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLinks.
Referenced by GUITrafficLightLogicWrapper::getLinkIndex().
00174 { 00175 int index = 0; 00176 for (LinkVectorVector::const_iterator i1=myLinks.begin(); i1!=myLinks.end(); ++i1, ++index) { 00177 const LinkVector &l = (*i1); 00178 for (LinkVector::const_iterator i2=l.begin(); i2!=l.end(); ++i2) { 00179 if ((*i2)==link) { 00180 return index; 00181 } 00182 } 00183 } 00184 return -1; 00185 }
| const LinkVectorVector& MSTrafficLightLogic::getLinks | ( | ) | const throw () [inline, inherited] |
Returns the list of lists of all affected links.
Definition at line 201 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLinks.
Referenced by traci::TraCIServer::commandGetTLStatus(), GUITLLogicPhasesTrackerWindow::drawValues(), Command_SaveTLSSwitches::execute(), FXIMPLEMENT(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), traci::TraCIServer::handleTrafficLightDomain(), GUINet::initTLMap(), TraCIServerAPI_TLS::processGet(), and rebuildPhase().
00201 { 00202 return myLinks; 00203 }
| const LinkVector& MSTrafficLightLogic::getLinksAt | ( | unsigned int | i | ) | const throw () [inline, inherited] |
Returns the list of links that are controlled by the signals at the given position.
| [in] | i | The index of the signal |
Definition at line 210 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::myLinks.
00210 { 00211 return myLinks[i]; 00212 }
| SUMOTime MSTrafficLightLogic::getNextSwitchTime | ( | ) | const throw () [inherited] |
Returns the assumed next switch time.
The time may change in case of adaptive/actuated traffic lights.
Definition at line 191 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::SwitchCommand::getNextSwitchTime(), and MSTrafficLightLogic::mySwitchCommand.
Referenced by TraCIServerAPI_TLS::processGet().
00191 { 00192 return mySwitchCommand!=0 ? mySwitchCommand->getNextSwitchTime() : -1; 00193 }
| unsigned int MSOffTrafficLightLogic::getOffsetFromIndex | ( | unsigned int | index | ) | const throw () [virtual] |
Returns the position (start of a phase during a cycle) from of a given step.
| [in] | index | The index of the phase to return the begin of |
Implements MSTrafficLightLogic.
Definition at line 129 of file MSOffTrafficLightLogic.cpp.
| std::string MSTrafficLightLogic::getParameterValue | ( | const std::string & | key | ) | const throw () [inherited] |
Returns a named parameter.
| [in] | key | The name of the parameter |
Definition at line 219 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myParameter.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereicheNo(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
00219 { 00220 if (myParameter.find(key)==myParameter.end()) { 00221 return ""; 00222 } 00223 return myParameter.find(key)->second; 00224 }
| const MSPhaseDefinition & MSOffTrafficLightLogic::getPhase | ( | unsigned int | givenstep | ) | const throw () [virtual] |
Returns the definition of the phase from the given position within the plan.
| [in] | givenstep | The index of the phase within the plan |
Implements MSTrafficLightLogic.
Definition at line 103 of file MSOffTrafficLightLogic.cpp.
References myPhaseDefinition.
00103 { 00104 return *myPhaseDefinition[0]; 00105 }
| unsigned int MSOffTrafficLightLogic::getPhaseIndexAtTime | ( | SUMOTime | simStep | ) | const throw () [virtual] |
Returns the index of the logic at the given simulation step.
Implements MSTrafficLightLogic.
Definition at line 123 of file MSOffTrafficLightLogic.cpp.
| unsigned int MSOffTrafficLightLogic::getPhaseNumber | ( | ) | const throw () [virtual] |
Returns the number of phases.
Implements MSTrafficLightLogic.
Definition at line 91 of file MSOffTrafficLightLogic.cpp.
| const MSOffTrafficLightLogic::Phases & MSOffTrafficLightLogic::getPhases | ( | ) | const throw () [virtual] |
Returns the phases of this tls program.
Implements MSTrafficLightLogic.
Definition at line 97 of file MSOffTrafficLightLogic.cpp.
References myPhaseDefinition.
00097 { 00098 return myPhaseDefinition; 00099 }
| const std::string& MSTrafficLightLogic::getSubID | ( | ) | const throw () [inline, inherited] |
Returns this tl-logic's id.
Definition at line 176 of file MSTrafficLightLogic.h.
References MSTrafficLightLogic::mySubID.
Referenced by Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSState::execute(), GUIViewTraffic::onGamingClick(), and TraCIServerAPI_TLS::processGet().
00176 { 00177 return mySubID; 00178 }
| void MSOffTrafficLightLogic::init | ( | NLDetectorBuilder & | nb | ) | throw (ProcessError) [virtual] |
Initialises the tls with information about incoming lanes.
| [in] | nb | The detector builder |
| [in] | edgeContinuations | Information about edge predecessors/successors |
| ProcessError | If something fails on initialisation |
Reimplemented from MSTrafficLightLogic.
Definition at line 60 of file MSOffTrafficLightLogic.cpp.
References rebuildPhase().
00060 { 00061 rebuildPhase(); 00062 }
| void MSOffTrafficLightLogic::rebuildPhase | ( | ) | throw () [private] |
(Re)builds the internal phase definition
Definition at line 74 of file MSOffTrafficLightLogic.cpp.
References MSTrafficLightLogic::getLinks(), and myPhaseDefinition.
Referenced by adaptLinkInformationFrom(), and init().
00074 { 00075 size_t no = getLinks().size(); 00076 std::string state; 00077 for (unsigned int i=0; i<no; ++i) { 00078 // !!! no brake mask! 00079 state += 'o'; 00080 } 00081 for (MSTrafficLightLogic::Phases::const_iterator i=myPhaseDefinition.begin(); i!=myPhaseDefinition.end(); ++i) { 00082 delete *i; 00083 } 00084 myPhaseDefinition.clear(); 00085 myPhaseDefinition.push_back(new MSPhaseDefinition(1, state)); 00086 }
| void MSTrafficLightLogic::resetLinkStates | ( | const std::map< MSLink *, std::pair< MSLink::LinkState, bool > > & | vals | ) | const throw () [inherited] |
Resets the states of controlled links.
| [in] | The | state of controlled links to use |
Definition at line 159 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myLinks.
Referenced by MSTLLogicControl::TLSLogicVariants::switchTo().
00159 { 00160 for (LinkVectorVector::const_iterator i1=myLinks.begin(); i1!=myLinks.end(); ++i1) { 00161 const LinkVector &l = (*i1); 00162 for (LinkVector::const_iterator i2=l.begin(); i2!=l.end(); ++i2) { 00163 assert(vals.find(*i2)!=vals.end()); 00164 const std::pair<MSLink::LinkState, bool> &lvals = vals.find(*i2)->second; 00165 (*i2)->setTLState(lvals.first); 00166 (*i2)->setPriority(lvals.second); 00167 } 00168 } 00169 }
| void MSTrafficLightLogic::setCurrentDurationIncrement | ( | SUMOTime | delay | ) | throw () [inherited] |
Delays current phase by the given delay.
| [in] | delay | The time by which the current phase shall be delayed |
Definition at line 204 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myCurrentDurationIncrement.
00204 { 00205 myCurrentDurationIncrement = delay; 00206 }
| void MSOffTrafficLightLogic::setLinkPriorities | ( | ) | const throw () [inline, virtual] |
Applies the priorities resulting from the current phase to controlled links.
This method is overridded, as in off-state, a tls does not change rows.
Implements MSTrafficLightLogic.
Definition at line 103 of file MSOffTrafficLightLogic.h.
| void MSTrafficLightLogic::setParameter | ( | const std::map< std::string, std::string > & | params | ) | throw () [inherited] |
Inserts read parameter.
| [in] | params | The parameter to use |
Definition at line 213 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::myParameter.
Referenced by NLJunctionControlBuilder::closeTrafficLightLogic().
00213 { 00214 myParameter = params; 00215 }
| bool MSOffTrafficLightLogic::setTrafficLightSignals | ( | ) | const throw () [inline, virtual] |
Clears all incoming vehicle information on links that have red.
Implements MSTrafficLightLogic.
Definition at line 110 of file MSOffTrafficLightLogic.h.
Switches to the next phase.
| [in] | isActive | Whether this program is the currently used one |
Implements MSTrafficLightLogic.
Definition at line 91 of file MSOffTrafficLightLogic.h.
References DELTA_T.
00091 { 00092 return 120*DELTA_T; 00093 }
SUMOTime MSTrafficLightLogic::myCurrentDurationIncrement [protected, inherited] |
A value for enlarge the current duration.
Definition at line 427 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::setCurrentDurationIncrement(), and MSSimpleTrafficLightLogic::trySwitch().
unsigned int MSTrafficLightLogic::myDefaultCycleTime [protected, inherited] |
The cycle time (without changes).
Definition at line 433 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getDefaultCycleTime(), MSSimpleTrafficLightLogic::getIndexFromOffset(), and MSSimpleTrafficLightLogic::getPhaseIndexAtTime().
std::string MSTrafficLightLogic::myID [protected, inherited] |
The id of the logic.
Definition at line 415 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getID().
LaneVectorVector MSTrafficLightLogic::myLanes [protected, inherited] |
The list of links which do participate in this traffic light.
Definition at line 421 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::adaptLinkInformationFrom(), MSTrafficLightLogic::addLink(), MSTrafficLightLogic::getLanes(), and MSTrafficLightLogic::getLanesAt().
LinkVectorVector MSTrafficLightLogic::myLinks [protected, inherited] |
The list of links which do participate in this traffic light.
Definition at line 418 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::adaptLinkInformationFrom(), MSTrafficLightLogic::addLink(), MSTrafficLightLogic::collectLinkStates(), MSTrafficLightLogic::getLinkIndex(), MSTrafficLightLogic::getLinks(), MSTrafficLightLogic::getLinksAt(), MSTrafficLightLogic::resetLinkStates(), MSSimpleTrafficLightLogic::setLinkPriorities(), and MSSimpleTrafficLightLogic::setTrafficLightSignals().
std::vector<SUMOTime> MSTrafficLightLogic::myOverridingTimes [protected, inherited] |
A list of duration overrides.
Definition at line 424 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::addOverridingDuration(), and MSSimpleTrafficLightLogic::trySwitch().
std::map<std::string, std::string> MSTrafficLightLogic::myParameter [protected, inherited] |
Given parameter.
Definition at line 412 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getParameterValue(), and MSTrafficLightLogic::setParameter().
The phase definition (only one).
Definition at line 214 of file MSOffTrafficLightLogic.h.
Referenced by getCurrentPhaseDef(), getPhase(), getPhases(), rebuildPhase(), and ~MSOffTrafficLightLogic().
std::string MSTrafficLightLogic::mySubID [protected, inherited] |
Definition at line 415 of file MSTrafficLightLogic.h.
Referenced by MSTrafficLightLogic::getSubID().
SwitchCommand* MSTrafficLightLogic::mySwitchCommand [protected, inherited] |
The current switch command.
Definition at line 430 of file MSTrafficLightLogic.h.
Referenced by MSSimpleTrafficLightLogic::changeStepAndDuration(), MSTrafficLightLogic::getNextSwitchTime(), MSTrafficLightLogic::MSTrafficLightLogic(), and MSTrafficLightLogic::~MSTrafficLightLogic().
1.5.6