 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef MSActuatedTrafficLightLogic_h
19 #define MSActuatedTrafficLightLogic_h
62 const std::string&
id,
const std::string& programID,
65 const std::map<std::string, std::string>& parameter,
66 const std::string& basePath);
Representation of a lane in the micro simulation.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
bool myShowDetectors
Whether the detectors shall be shown in the GUI.
An unextended detector measuring at a fixed position on a fixed lane.
std::vector< InductLoopInfo > myInductLoops
~MSActuatedTrafficLightLogic()
Destructor.
int decideNextPhase()
select am candidate phases based on detector states
SUMOTime trySwitch()
Switches to the next phase.
SUMOTime duration(const double detectionGap) const
Returns the minimum duration of the current phase.
std::vector< MSLane * > LaneVector
Definition of the list of arrival lanes subjected to this tls.
int getTarget(int step)
get the green phase following step
std::string myFile
The output file for generated detectors.
std::string myVehicleTypes
Whether detector output separates by vType.
SUMOTime getMinimumMinDuration(MSLane *lane) const
get the minimum min duration for all stretchable phases that affect the given lane
A fixed traffic light logic.
An actuated (adaptive) traffic light logic.
SUMOTime myFreq
The frequency for aggregating detector output.
InductLoopInfo(MSInductLoop *_loop, int numPhases)
bool showDetectors() const
void setShowDetectors(bool show)
int getDetectorPriority(const InductLoopInfo &loopInfo) const
std::vector< bool > servedPhase
SUMOTime myInactiveThreshold
The time threshold to avoid starved phases.
bool hasMajor(const std::string &state, const LaneVector &lanes) const
return whether there is a major link from the given lane in the given phase
double myDetectorGap
The detector distance in seconds.
void init(NLDetectorBuilder &nb)
Initialises the tls with information about incoming lanes.
double gapControl()
Return the minimum detection gap of all detectors if the current phase should be extended and double:...
A class that stores and controls tls and switching of their programs.
InductLoopMap myInductLoopsForPhase
A map from phase to induction loops to be used for gap control.
MSActuatedTrafficLightLogic(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const MSSimpleTrafficLightLogic::Phases &phases, int step, SUMOTime delay, const std::map< std::string, std::string > ¶meter, const std::string &basePath)
Constructor.
std::vector< std::vector< InductLoopInfo * > > InductLoopMap
Definition of a map from phases to induct loops controlling them.
double myPassingTime
The passing time used in seconds.
double myMaxGap
The maximum gap to check in seconds.
void activateProgram()
called when switching programs
Builds detectors for microsim.
int getPhasePriority(int step) const
count the number of active detectors for the given step