Adaptive Traffic Simulator
Loading...
Searching...
No Matches
TrafficSignal Struct Reference

#include <Header1.h>

Collaboration diagram for TrafficSignal:

Public Member Functions

 TrafficSignal ()
void Timer (bool state, float time)
float starvationCost () const
void turnGreen (bool &state)
void turnRed (bool &state)
bool canSwitch (int currentQueue, int maxOtherQueue) const
bool mustSwitch () const

Public Attributes

float greentimer
float minGreenTime
float queueThreshold
float maxGreenTime
float redtimer
float pa
float pb

Constructor & Destructor Documentation

◆ TrafficSignal()

TrafficSignal::TrafficSignal ( )
inline

Member Function Documentation

◆ canSwitch()

bool TrafficSignal::canSwitch ( int currentQueue,
int maxOtherQueue ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mustSwitch()

bool TrafficSignal::mustSwitch ( ) const
inline
Here is the caller graph for this function:

◆ starvationCost()

float TrafficSignal::starvationCost ( ) const
inline
Here is the caller graph for this function:

◆ Timer()

void TrafficSignal::Timer ( bool state,
float time )
inline

◆ turnGreen()

void TrafficSignal::turnGreen ( bool & state)
inline

◆ turnRed()

void TrafficSignal::turnRed ( bool & state)
inline

Member Data Documentation

◆ greentimer

float TrafficSignal::greentimer

◆ maxGreenTime

float TrafficSignal::maxGreenTime

◆ minGreenTime

float TrafficSignal::minGreenTime

◆ pa

float TrafficSignal::pa

◆ pb

float TrafficSignal::pb

◆ queueThreshold

float TrafficSignal::queueThreshold

◆ redtimer

float TrafficSignal::redtimer

The documentation for this struct was generated from the following file: