Eclipse SUMO - Simulation of Urban MObility
|
Class realising the switch between the traffic light phases. More...
#include <MSTrafficLightLogic.h>
Public Member Functions | |
void | deschedule (MSTrafficLightLogic *tlLogic) |
Marks this swicth as invalid (if the phase duration has changed, f.e.) | |
SUMOTime | execute (SUMOTime currentTime) |
Executes the regarded junction's "trySwitch"- method. | |
SUMOTime | getNextSwitchTime () const |
Returns the assumed next switch time. | |
SUMOTime | shiftTime (SUMOTime currentTime, SUMOTime execTime, SUMOTime newTime) |
Reschedule or deschedule the command when quick-loading state. | |
SwitchCommand (MSTLLogicControl &tlcontrol, MSTrafficLightLogic *tlLogic, SUMOTime nextSwitch) | |
Constructor. | |
~SwitchCommand () | |
Destructor. | |
Data Fields | |
int | priority = 0 |
Private Member Functions | |
SwitchCommand & | operator= (const SwitchCommand &) |
Invalidated assignment operator. | |
SwitchCommand (const SwitchCommand &) | |
Invalidated copy constructor. | |
Private Attributes | |
bool | myAmValid |
Information whether this switch command is still valid. | |
SUMOTime | myAssumedNextSwitch |
Assumed switch time (may change in case of adaptive traffic lights) | |
MSTLLogicControl & | myTLControl |
The responsible traffic lights control. | |
MSTrafficLightLogic * | myTLLogic |
The logic to be executed on a switch. | |
Class realising the switch between the traffic light phases.
Definition at line 441 of file MSTrafficLightLogic.h.
MSTrafficLightLogic::SwitchCommand::SwitchCommand | ( | MSTLLogicControl & | tlcontrol, |
MSTrafficLightLogic * | tlLogic, | ||
SUMOTime | nextSwitch | ||
) |
Constructor.
[in] | tlcontrol | The responsible traffic lights control |
[in] | tlLogic | The controlled tls logic |
[in] | duration | Duration till next switch |
Definition at line 52 of file MSTrafficLightLogic.cpp.
References Command::priority.
MSTrafficLightLogic::SwitchCommand::~SwitchCommand | ( | ) |
Destructor.
Definition at line 61 of file MSTrafficLightLogic.cpp.
|
private |
Invalidated copy constructor.
void MSTrafficLightLogic::SwitchCommand::deschedule | ( | MSTrafficLightLogic * | tlLogic | ) |
Marks this swicth as invalid (if the phase duration has changed, f.e.)
[in] | tlLogic | The controlled tls logic |
Definition at line 94 of file MSTrafficLightLogic.cpp.
Referenced by MSActuatedTrafficLightLogic::changeStepAndDuration(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSActuatedTrafficLightLogic::loadState(), MSRailSignal::MSRailSignal(), and MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic().
Executes the regarded junction's "trySwitch"- method.
[in] | currentTime | The current simulation time |
Implements Command.
Definition at line 66 of file MSTrafficLightLogic.cpp.
References MSTLLogicControl::TLSLogicVariants::executeOnSwitchActions().
|
inline |
Returns the assumed next switch time.
Definition at line 471 of file MSTrafficLightLogic.h.
References myAssumedNextSwitch.
Referenced by MSTrafficLightLogic::getNextSwitchTime().
|
private |
Invalidated assignment operator.
|
virtual |
Reschedule or deschedule the command when quick-loading state.
The implementations should return -1 if the command shall not be re-scheduled, or a value >= 0 that describe the new time at which the command shall be executed again.
[in] | currentTime | The current simulation time |
[in] | execTime | The time at which the command would have been executed |
[in] | newTime | The simulation time at which the simulation is restarted |
Reimplemented from Command.
Definition at line 103 of file MSTrafficLightLogic.cpp.
References DELTA_T, and UNUSED_PARAMETER.
|
private |
Information whether this switch command is still valid.
Definition at line 499 of file MSTrafficLightLogic.h.
|
private |
Assumed switch time (may change in case of adaptive traffic lights)
Definition at line 496 of file MSTrafficLightLogic.h.
Referenced by getNextSwitchTime().
|
private |
The responsible traffic lights control.
Definition at line 490 of file MSTrafficLightLogic.h.
|
private |
The logic to be executed on a switch.
Definition at line 493 of file MSTrafficLightLogic.h.
|
inherited |
Definition at line 87 of file Command.h.
Referenced by MSTransportableDevice_FCDReplay::MovePedestrians::MovePedestrians(), and SwitchCommand().