#include <MSTrafficLightLogic.h>

Definition at line 57 of file MSTrafficLightLogic.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. | |
| MSTrafficLightLogic (MSTLLogicControl &tlcontrol, const std::string &id, const std::string &subid, SUMOTime delay) throw () | |
| Constructor. | |
| virtual | ~MSTrafficLightLogic () throw () |
| Destructor. | |
Handling of controlled links | |
| virtual void | adaptLinkInformationFrom (const MSTrafficLightLogic &logic) throw () |
| Applies information about controlled links and lanes from the given logic. | |
| 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. | |
| virtual void | changeStepAndDuration (MSTLLogicControl &tlcontrol, SUMOTime simStep, unsigned int step, SUMOTime stepDuration)=0 throw () |
| Changes the current phase and her duration. | |
| void | setCurrentDurationIncrement (SUMOTime delay) throw () |
| Delays current phase by the given delay. | |
Dynamic Information Retrieval | |
| virtual const MSPhaseDefinition & | getCurrentPhaseDef () const =0 throw () |
| Returns the definition of the current phase. | |
| virtual unsigned int | getCurrentPhaseIndex () const =0 throw () |
| Returns the current index within the program. | |
| 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. | |
| virtual const MSPhaseDefinition & | getPhase (unsigned int givenstep) const =0 throw () |
| Returns the definition of the phase from the given position within the plan. | |
| virtual unsigned int | getPhaseNumber () const =0 throw () |
| Returns the number of phases. | |
| virtual const Phases & | getPhases () const =0 throw () |
| Returns the phases of this tls program. | |
| const std::string & | getSubID () const throw () |
| Returns this tl-logic's id. | |
Conversion between time and phase | |
| virtual unsigned int | getIndexFromOffset (unsigned int offset) const =0 throw () |
| Returns the step (the phasenumber) of a given position of the cycle. | |
| virtual unsigned int | getOffsetFromIndex (unsigned int index) const =0 throw () |
| Returns the position (start of a phase during a cycle) from of a given step. | |
| virtual unsigned int | getPhaseIndexAtTime (SUMOTime simStep) const =0 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. | |
Switching and setting current rows | |
| virtual void | setLinkPriorities () const =0 throw () |
| Applies the priorities resulting from the current phase to controlled links. | |
| virtual bool | setTrafficLightSignals () const =0 throw () |
| Clears all incoming vehicle information on links that have red. | |
| virtual SUMOTime | trySwitch (bool isActive)=0 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 | |
| MSTrafficLightLogic (const MSTrafficLightLogic &s) | |
| invalidated copy constructor | |
| MSTrafficLightLogic & | operator= (const MSTrafficLightLogic &s) |
| invalidated assignment operator | |
Data Structures | |
| class | SwitchCommand |
| Class realising the switch between the traffic light phases. More... | |
| typedef std::vector<MSLane*> MSTrafficLightLogic::LaneVector |
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 |
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 |
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 |
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 |
Definition of a list of phases, being the junction logic.
Definition at line 63 of file MSTrafficLightLogic.h.
| MSTrafficLightLogic::MSTrafficLightLogic | ( | MSTLLogicControl & | tlcontrol, | |
| const std::string & | id, | |||
| const std::string & | subid, | |||
| SUMOTime | delay | |||
| ) | throw () |
Constructor.
| [in] | tlcontrol | The tls control responsible for this tls |
| [in] | id | This tls' id |
| [in] | subid | This tls' sub-id (program id) |
| [in] | delay | The time to wait before the first switch |
Definition at line 99 of file MSTrafficLightLogic.cpp.
References MSEventControl::addEvent(), MSNet::getBeginOfTimestepEvents(), MSNet::getInstance(), mySwitchCommand, MSEventControl::NO_CHANGE, and MSTrafficLightLogic::SwitchCommand::SwitchCommand().
00102 : myID(id), mySubID(subid), myCurrentDurationIncrement(-1), 00103 myDefaultCycleTime(0) { 00104 mySwitchCommand = new SwitchCommand(tlcontrol, this, delay); 00105 MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( 00106 mySwitchCommand, delay, MSEventControl::NO_CHANGE); 00107 }
| MSTrafficLightLogic::~MSTrafficLightLogic | ( | ) | throw () [virtual] |
Destructor.
Definition at line 115 of file MSTrafficLightLogic.cpp.
References MSTrafficLightLogic::SwitchCommand::deschedule(), and mySwitchCommand.
00115 { 00116 mySwitchCommand->deschedule(this); 00117 }
| MSTrafficLightLogic::MSTrafficLightLogic | ( | const MSTrafficLightLogic & | s | ) | [private] |
invalidated copy constructor
| void MSTrafficLightLogic::adaptLinkInformationFrom | ( | const MSTrafficLightLogic & | logic | ) | throw () [virtual] |
Applies information about controlled links and lanes from the given logic.
If we load a logic after the network has been loaded, we do not get the information about controlled links afterwards. We have to copy them from a previously loaded logic.
| [in] | logic | The logic to use the information about controlled links/lanes from |
Reimplemented in MSOffTrafficLightLogic.
Definition at line 139 of file MSTrafficLightLogic.cpp.
References myLanes, and myLinks.
Referenced by MSOffTrafficLightLogic::adaptLinkInformationFrom().
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 myLanes, and 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 () |
Changes the duration of the next phase.
| [in] | duration | The new duration |
Definition at line 198 of file MSTrafficLightLogic.cpp.
References myOverridingTimes.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
00198 { 00199 myOverridingTimes.push_back(duration); 00200 }
| virtual void MSTrafficLightLogic::changeStepAndDuration | ( | MSTLLogicControl & | tlcontrol, | |
| SUMOTime | simStep, | |||
| unsigned int | step, | |||
| SUMOTime | stepDuration | |||
| ) | throw () [pure 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 |
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), TraCIServerAPI_TLS::processSet(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
| std::map< MSLink *, std::pair< MSLink::LinkState, bool > > MSTrafficLightLogic::collectLinkStates | ( | ) | const throw () |
Returns the (uncontrolled) states of the controlled links.
Definition at line 146 of file MSTrafficLightLogic.cpp.
References 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 }
| virtual const MSPhaseDefinition& MSTrafficLightLogic::getCurrentPhaseDef | ( | ) | const throw () [pure virtual] |
Returns the definition of the current phase.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by traci::TraCIServer::commandGetTLStatus(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSState::execute(), MSTLLogicControl::getPhaseDef(), and TraCIServerAPI_TLS::processGet().
| virtual unsigned int MSTrafficLightLogic::getCurrentPhaseIndex | ( | ) | const throw () [pure virtual] |
Returns the current index within the program.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by traci::TraCIServer::commandGetTLStatus(), MSTrafficLightLogic::SwitchCommand::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSState::execute(), traci::TraCIServer::handleTrafficLightDomain(), TraCIServerAPI_TLS::processGet(), and TraCIServerAPI_TLS::processSet().
| unsigned int MSTrafficLightLogic::getDefaultCycleTime | ( | ) | const throw () [inline] |
Returns the cycle time.
Definition at line 261 of file MSTrafficLightLogic.h.
References 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] |
Returns this tl-logic's id.
Definition at line 168 of file MSTrafficLightLogic.h.
References 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 }
| virtual unsigned int MSTrafficLightLogic::getIndexFromOffset | ( | unsigned int | offset | ) | const throw () [pure 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 |
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by traci::TraCIServer::commandGetTLStatus(), and traci::TraCIServer::handleTrafficLightDomain().
| const LaneVectorVector& MSTrafficLightLogic::getLanes | ( | ) | const throw () [inline] |
Returns the list of lists of all lanes controlled by this tls.
Definition at line 184 of file MSTrafficLightLogic.h.
References myLanes.
Referenced by GUITrafficLightLogicWrapper::getCenteringBoundary(), and TraCIServerAPI_TLS::processGet().
00184 { 00185 return myLanes; 00186 }
| const LaneVector& MSTrafficLightLogic::getLanesAt | ( | unsigned int | i | ) | const throw () [inline] |
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 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 () |
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 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] |
Returns the list of lists of all affected links.
Definition at line 201 of file MSTrafficLightLogic.h.
References myLinks.
Referenced by traci::TraCIServer::commandGetTLStatus(), GUITLLogicPhasesTrackerWindow::drawValues(), Command_SaveTLSSwitches::execute(), FXIMPLEMENT(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), traci::TraCIServer::handleTrafficLightDomain(), GUINet::initTLMap(), TraCIServerAPI_TLS::processGet(), and MSOffTrafficLightLogic::rebuildPhase().
00201 { 00202 return myLinks; 00203 }
| const LinkVector& MSTrafficLightLogic::getLinksAt | ( | unsigned int | i | ) | const throw () [inline] |
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 myLinks.
00210 { 00211 return myLinks[i]; 00212 }
| SUMOTime MSTrafficLightLogic::getNextSwitchTime | ( | ) | const throw () |
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 mySwitchCommand.
Referenced by TraCIServerAPI_TLS::processGet().
00191 { 00192 return mySwitchCommand!=0 ? mySwitchCommand->getNextSwitchTime() : -1; 00193 }
| virtual unsigned int MSTrafficLightLogic::getOffsetFromIndex | ( | unsigned int | index | ) | const throw () [pure 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 |
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
| std::string MSTrafficLightLogic::getParameterValue | ( | const std::string & | key | ) | const throw () |
Returns a named parameter.
| [in] | key | The name of the parameter |
Definition at line 219 of file MSTrafficLightLogic.cpp.
References 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 }
| virtual const MSPhaseDefinition& MSTrafficLightLogic::getPhase | ( | unsigned int | givenstep | ) | const throw () [pure virtual] |
Returns the definition of the phase from the given position within the plan.
| [in] | givenstep | The index of the phase within the plan |
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by traci::TraCIServer::commandGetTLStatus(), traci::TraCIServer::handleTrafficLightDomain(), TraCIServerAPI_TLS::processGet(), and TraCIServerAPI_TLS::processSet().
| virtual unsigned int MSTrafficLightLogic::getPhaseIndexAtTime | ( | SUMOTime | simStep | ) | const throw () [pure virtual] |
Returns the index of the logic at the given simulation step.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by traci::TraCIServer::commandGetTLStatus(), and traci::TraCIServer::handleTrafficLightDomain().
| virtual unsigned int MSTrafficLightLogic::getPhaseNumber | ( | ) | const throw () [pure virtual] |
Returns the number of phases.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by TraCIServerAPI_TLS::processGet(), and TraCIServerAPI_TLS::processSet().
| virtual const Phases& MSTrafficLightLogic::getPhases | ( | ) | const throw () [pure virtual] |
Returns the phases of this tls program.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
| const std::string& MSTrafficLightLogic::getSubID | ( | ) | const throw () [inline] |
Returns this tl-logic's id.
Definition at line 176 of file MSTrafficLightLogic.h.
References mySubID.
Referenced by Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), Command_SaveTLSState::execute(), GUIViewTraffic::onGamingClick(), and TraCIServerAPI_TLS::processGet().
00176 { 00177 return mySubID; 00178 }
| void MSTrafficLightLogic::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 in MSActuatedTrafficLightLogic, MSAgentbasedTrafficLightLogic, and MSOffTrafficLightLogic.
Definition at line 111 of file MSTrafficLightLogic.cpp.
| MSTrafficLightLogic& MSTrafficLightLogic::operator= | ( | const MSTrafficLightLogic & | s | ) | [private] |
invalidated assignment operator
| void MSTrafficLightLogic::resetLinkStates | ( | const std::map< MSLink *, std::pair< MSLink::LinkState, bool > > & | vals | ) | const throw () |
Resets the states of controlled links.
| [in] | The | state of controlled links to use |
Definition at line 159 of file MSTrafficLightLogic.cpp.
References 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 () |
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 myCurrentDurationIncrement.
00204 { 00205 myCurrentDurationIncrement = delay; 00206 }
| virtual void MSTrafficLightLogic::setLinkPriorities | ( | ) | const throw () [pure virtual] |
Applies the priorities resulting from the current phase to controlled links.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by MSTrafficLightLogic::SwitchCommand::execute(), and TraCIServerAPI_TLS::processSet().
| void MSTrafficLightLogic::setParameter | ( | const std::map< std::string, std::string > & | params | ) | throw () |
Inserts read parameter.
| [in] | params | The parameter to use |
Definition at line 213 of file MSTrafficLightLogic.cpp.
References myParameter.
Referenced by NLJunctionControlBuilder::closeTrafficLightLogic().
00213 { 00214 myParameter = params; 00215 }
| virtual bool MSTrafficLightLogic::setTrafficLightSignals | ( | ) | const throw () [pure virtual] |
Clears all incoming vehicle information on links that have red.
Implemented in MSOffTrafficLightLogic, and MSSimpleTrafficLightLogic.
Referenced by MSTLLogicControl::TLSLogicVariants::setTrafficLightSignals().
Switches to the next phase.
| [in] | isActive | Whether this program is the currently used one |
Implemented in MSActuatedTrafficLightLogic, MSAgentbasedTrafficLightLogic, MSOffTrafficLightLogic, MSSimpleTrafficLightLogic, and MSUnboundActuatedTrafficLightLogic.
Referenced by MSTrafficLightLogic::SwitchCommand::execute().
A value for enlarge the current duration.
Definition at line 427 of file MSTrafficLightLogic.h.
Referenced by setCurrentDurationIncrement(), and MSSimpleTrafficLightLogic::trySwitch().
unsigned int MSTrafficLightLogic::myDefaultCycleTime [protected] |
The cycle time (without changes).
Definition at line 433 of file MSTrafficLightLogic.h.
Referenced by getDefaultCycleTime(), MSSimpleTrafficLightLogic::getIndexFromOffset(), and MSSimpleTrafficLightLogic::getPhaseIndexAtTime().
std::string MSTrafficLightLogic::myID [protected] |
LaneVectorVector MSTrafficLightLogic::myLanes [protected] |
The list of links which do participate in this traffic light.
Definition at line 421 of file MSTrafficLightLogic.h.
Referenced by adaptLinkInformationFrom(), addLink(), getLanes(), and getLanesAt().
LinkVectorVector MSTrafficLightLogic::myLinks [protected] |
The list of links which do participate in this traffic light.
Definition at line 418 of file MSTrafficLightLogic.h.
Referenced by adaptLinkInformationFrom(), addLink(), collectLinkStates(), getLinkIndex(), getLinks(), getLinksAt(), resetLinkStates(), MSSimpleTrafficLightLogic::setLinkPriorities(), and MSSimpleTrafficLightLogic::setTrafficLightSignals().
std::vector<SUMOTime> MSTrafficLightLogic::myOverridingTimes [protected] |
A list of duration overrides.
Definition at line 424 of file MSTrafficLightLogic.h.
Referenced by addOverridingDuration(), and MSSimpleTrafficLightLogic::trySwitch().
std::map<std::string, std::string> MSTrafficLightLogic::myParameter [protected] |
Given parameter.
Definition at line 412 of file MSTrafficLightLogic.h.
Referenced by getParameterValue(), and setParameter().
std::string MSTrafficLightLogic::mySubID [protected] |
SwitchCommand* MSTrafficLightLogic::mySwitchCommand [protected] |
The current switch command.
Definition at line 430 of file MSTrafficLightLogic.h.
Referenced by MSSimpleTrafficLightLogic::changeStepAndDuration(), getNextSwitchTime(), MSTrafficLightLogic(), and ~MSTrafficLightLogic().
1.5.6