MSOffTrafficLightLogic Class Reference

#include <MSOffTrafficLightLogic.h>

Inheritance diagram for MSOffTrafficLightLogic:

MSTrafficLightLogic

Detailed Description

A traffic lights logic which represents a tls in an off-mode.

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< LaneVectorLaneVectorVector
 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< LinkVectorLinkVectorVector
 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 MSPhaseDefinitiongetCurrentPhaseDef () 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 LaneVectorVectorgetLanes () const throw ()
 Returns the list of lists of all lanes controlled by this tls.
const LaneVectorgetLanesAt (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 LinkVectorVectorgetLinks () const throw ()
 Returns the list of lists of all affected links.
const LinkVectorgetLinksAt (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 > &params) throw ()
 Inserts read parameter.
Static Information Retrieval
const MSPhaseDefinitiongetPhase (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 PhasesgetPhases () 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< SUMOTimemyOverridingTimes
 A list of duration overrides.
std::map< std::string,
std::string > 
myParameter
 Given parameter.
std::string mySubID
SwitchCommandmySwitchCommand
 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).

Member Typedef Documentation

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.


Constructor & Destructor Documentation

MSOffTrafficLightLogic::MSOffTrafficLightLogic ( MSTLLogicControl tlcontrol,
const std::string &  id 
) throw ()

Constructor.

Parameters:
[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 }


Member Function Documentation

void MSOffTrafficLightLogic::adaptLinkInformationFrom ( const MSTrafficLightLogic logic  )  throw () [virtual]

Applies information about controlled links and lanes from the given logic.

Parameters:
[in] logic The logic to use the information about controlled links/lanes from
See also:
MSTrafficLightLogic::adaptLinkInformationFrom

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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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
See also:
MSTrafficLightLogic::changeStepAndDuration

Implements MSTrafficLightLogic.

Definition at line 201 of file MSOffTrafficLightLogic.h.

00201                                                                                                                                 {
00202     }

std::map< MSLink *, std::pair< MSLink::LinkState, bool > > MSTrafficLightLogic::collectLinkStates (  )  const throw () [inherited]

Returns the (uncontrolled) states of the controlled links.

Returns:
The controlled link's states

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.

Returns:
The current phase
See also:
MSTrafficLightLogic::getCurrentPhaseDef

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.

Returns:
The index of the current phase within the tls
See also:
MSTrafficLightLogic::getCurrentPhaseIndex

Implements MSTrafficLightLogic.

Definition at line 110 of file MSOffTrafficLightLogic.cpp.

00110                                                            {
00111     return 0;
00112 }

unsigned int MSTrafficLightLogic::getDefaultCycleTime (  )  const throw () [inline, inherited]

Returns the cycle time.

Returns:
The (maybe changing) cycle time of this tls

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]

unsigned int MSOffTrafficLightLogic::getIndexFromOffset ( unsigned int  offset  )  const throw () [virtual]

Returns the step (the phasenumber) of a given position of the cycle.

Parameters:
[in] offset The offset (time) for which the according phase shall be returned
Returns:
The according phase
See also:
MSTrafficLightLogic::getIndexFromOffset

Implements MSTrafficLightLogic.

Definition at line 135 of file MSOffTrafficLightLogic.cpp.

00135                                                                             {
00136     return 0;
00137 }

const LaneVectorVector& MSTrafficLightLogic::getLanes (  )  const throw () [inline, inherited]

Returns the list of lists of all lanes controlled by this tls.

Returns:
All lanes controlled by this tls, sorted by the signal index

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.

Parameters:
[in] i The index of the signal
Returns:
The lanes controlled by the signal at the given index

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.

Parameters:
[in] link The link to retrieve the index for
Returns:
The index of the given link (-1 if it is not controlled by this tls)

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]

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.

Parameters:
[in] i The index of the signal
Returns:
The links controlled by the signal at the given index

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.

Returns:
The assumed next switch time (simulation time)

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.

Parameters:
[in] index The index of the phase to return the begin of
Returns:
The begin time of the phase
See also:
MSTrafficLightLogic::getOffsetFromIndex

Implements MSTrafficLightLogic.

Definition at line 129 of file MSOffTrafficLightLogic.cpp.

00129                                                                            {
00130     return 0;
00131 }

std::string MSTrafficLightLogic::getParameterValue ( const std::string &  key  )  const throw () [inherited]

Returns a named parameter.

Parameters:
[in] key The name of the parameter
Returns:
The value of the parameter, "" if the parameter is not known

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.

Parameters:
[in] givenstep The index of the phase within the plan
Returns:
The definition of the phase at the given position
See also:
MSTrafficLightLogic::getPhase

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.

Returns:
The (estimated) index of the tls at the given simulation time step
See also:
MSTrafficLightLogic::getPhaseIndexAtTime

Implements MSTrafficLightLogic.

Definition at line 123 of file MSOffTrafficLightLogic.cpp.

00123                                                                           {
00124     return 0;
00125 }

unsigned int MSOffTrafficLightLogic::getPhaseNumber (  )  const throw () [virtual]

Returns the number of phases.

Returns:
The number of this tls program's phases
See also:
MSTrafficLightLogic::getPhaseNumber

Implements MSTrafficLightLogic.

Definition at line 91 of file MSOffTrafficLightLogic.cpp.

00091                                                      {
00092     return 0;
00093 }

const MSOffTrafficLightLogic::Phases & MSOffTrafficLightLogic::getPhases (  )  const throw () [virtual]

Returns the phases of this tls program.

Returns:
The phases of this tls program
See also:
MSTrafficLightLogic::getPhases

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.

Returns:
This program'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.

Parameters:
[in] nb The detector builder
[in] edgeContinuations Information about edge predecessors/successors
Exceptions:
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.

Parameters:
[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.

Parameters:
[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.

Todo:
Check whether this can be integrated into "setTrafficLightSignals"
See also:
MSTrafficLightLogic::setLinkPriorities

Implements MSTrafficLightLogic.

Definition at line 103 of file MSOffTrafficLightLogic.h.

00103 { }

void MSTrafficLightLogic::setParameter ( const std::map< std::string, std::string > &  params  )  throw () [inherited]

Inserts read parameter.

Parameters:
[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.

Returns:
Always true
See also:
MSTrafficLightLogic::setTrafficLightSignals

Implements MSTrafficLightLogic.

Definition at line 110 of file MSOffTrafficLightLogic.h.

00110                                                 {
00111         return true;
00112     }

SUMOTime MSOffTrafficLightLogic::trySwitch ( bool  isActive  )  throw () [inline, virtual]

Switches to the next phase.

Parameters:
[in] isActive Whether this program is the currently used one
Returns:
The time of the next switch (always 120)
See also:
MSTrafficLightLogic::trySwitch

Implements MSTrafficLightLogic.

Definition at line 91 of file MSOffTrafficLightLogic.h.

References DELTA_T.

00091                                               {
00092         return 120*DELTA_T;
00093     }


Field Documentation

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]

std::string MSTrafficLightLogic::myID [protected, inherited]

The id of the logic.

Definition at line 415 of file MSTrafficLightLogic.h.

Referenced by MSTrafficLightLogic::getID().

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().

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().


The documentation for this class was generated from the following files:

Generated on Wed May 5 00:06:49 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6