![]() |
SUMO - Simulation of Urban MObility
|
This class simply switches to the next program. More...
#include <MSTLLogicControl.h>
Public Member Functions | |
bool | trySwitch (SUMOTime step) |
Determines whether a switch is possible. More... | |
WAUTSwitchProcedure_JustSwitch (MSTLLogicControl &control, WAUT &waut, MSTrafficLightLogic *from, MSTrafficLightLogic *to, bool synchron) | |
Constructor. More... | |
~WAUTSwitchProcedure_JustSwitch () | |
Destructor. More... | |
Protected Member Functions | |
SUMOTime | getDiffToStartOfPhase (MSTrafficLightLogic &logic, SUMOTime toTime) |
Returns the difference between a given time and the start of the phase. More... | |
int | getGSPValue (const MSTrafficLightLogic &logic) const |
Returns the GSP-value. More... | |
bool | isPosAtGSP (SUMOTime currentTime, const MSTrafficLightLogic &logic) |
Checks, whether the position of a signal programm is at the GSP ("GuenstigerUmschaltPunkt") More... | |
void | switchToPos (SUMOTime simStep, MSTrafficLightLogic &logic, SUMOTime toTime) |
switches the given logic directly to the given position More... | |
Protected Attributes | |
MSTLLogicControl & | myControl |
The control the logic belongs to. More... | |
MSTrafficLightLogic * | myFrom |
The current program of the tls to switch. More... | |
bool | mySwitchSynchron |
Information whether to switch synchron (?) More... | |
MSTrafficLightLogic * | myTo |
The program to switch the tls to. More... | |
WAUT & | myWAUT |
The WAUT responsible for switching. More... | |
Private Member Functions | |
WAUTSwitchProcedure_JustSwitch & | operator= (const WAUTSwitchProcedure_JustSwitch &) |
Invalidated assignment operator. More... | |
WAUTSwitchProcedure_JustSwitch (const WAUTSwitchProcedure_JustSwitch &) | |
Invalidated copy constructor. More... | |
This class simply switches to the next program.
Definition at line 620 of file MSTLLogicControl.h.
MSTLLogicControl::WAUTSwitchProcedure_JustSwitch::WAUTSwitchProcedure_JustSwitch | ( | MSTLLogicControl & | control, |
WAUT & | waut, | ||
MSTrafficLightLogic * | from, | ||
MSTrafficLightLogic * | to, | ||
bool | synchron | ||
) |
Constructor.
[in] | control | The responsible tls control |
[in] | waut | The WAUT to switch |
[in] | from | The original tls program |
[in] | to | The destination tls program |
[in] | synchron | Whether the switch shall be done in synchronuous mode |
Definition at line 282 of file MSTLLogicControl.cpp.
MSTLLogicControl::WAUTSwitchProcedure_JustSwitch::~WAUTSwitchProcedure_JustSwitch | ( | ) |
Destructor.
Definition at line 288 of file MSTLLogicControl.cpp.
|
private |
Invalidated copy constructor.
|
protectedinherited |
Returns the difference between a given time and the start of the phase.
[in] | logic | The logic to consider |
[in] | toTime | The time to ask for |
Definition at line 260 of file MSTLLogicControl.cpp.
References MSTrafficLightLogic::getIndexFromOffset(), and MSTrafficLightLogic::getOffsetFromIndex().
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
|
protectedinherited |
Returns the GSP-value.
The GSP must be given as a logic's parameter ("GSP").
[in] | logic | The logic to retrieve the GSP from |
Definition at line 241 of file MSTLLogicControl.cpp.
References TplConvert::_2int(), and Parameterised::getParameter().
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
protectedinherited |
Checks, whether the position of a signal programm is at the GSP ("GuenstigerUmschaltPunkt")
The GSP must be given as a logic's parameter ("GSP"). Not the simulation second, but the phase the GSP lies within is used. If the phase the GSP lies within is the same as the logic's current phase, the result is true.
[in] | currentTime | The current time step |
[in] | logic | The logic for which this should be examined |
Definition at line 251 of file MSTLLogicControl.cpp.
References MSPhaseDefinition::duration, MSTrafficLightLogic::getCurrentPhaseDef(), MSTrafficLightLogic::getCurrentPhaseIndex(), MSTrafficLightLogic::getDefaultCycleTime(), MSTrafficLightLogic::getNextSwitchTime(), MSTrafficLightLogic::getOffsetFromIndex(), and TIME2STEPS.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
private |
Invalidated assignment operator.
|
protectedinherited |
switches the given logic directly to the given position
[in] | simStep | The current simulation time |
[in] | logic | The logic to switch |
[in] | toTime | The time offset within the logic's phases to switch to |
Definition at line 269 of file MSTLLogicControl.cpp.
References MSTrafficLightLogic::changeStepAndDuration(), MSPhaseDefinition::duration, MSTrafficLightLogic::getIndexFromOffset(), and MSTrafficLightLogic::getPhase().
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
virtual |
Determines whether a switch is possible.
[in] | step | The current simulation step |
Implements MSTLLogicControl::WAUTSwitchProcedure.
Definition at line 292 of file MSTLLogicControl.cpp.
|
protectedinherited |
The control the logic belongs to.
Definition at line 603 of file MSTLLogicControl.h.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
|
protectedinherited |
The current program of the tls to switch.
Definition at line 591 of file MSTLLogicControl.h.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
protectedinherited |
Information whether to switch synchron (?)
Definition at line 597 of file MSTLLogicControl.h.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
protectedinherited |
The program to switch the tls to.
Definition at line 594 of file MSTLLogicControl.h.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_GSP::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::cutLogic(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), MSTLLogicControl::WAUTSwitchProcedure_GSP::trySwitch(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::trySwitch().
|
protectedinherited |
The WAUT responsible for switching.
Definition at line 600 of file MSTLLogicControl.h.
Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().