 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
42 const std::string&
id,
const std::string& programID,
43 const std::map<std::string, std::string>& parameters) :
95 for (
auto it_avi : (*it_link)->getApproaching()) {
101 if ((*it_link)->getViaLane() !=
nullptr && (*it_link)->getViaLane()->getVehicleNumberWithPartials() > 0) {
107 const SUMOTime wait = stayRedUntil - now;
bool setTrafficLightSignals(SUMOTime t) const
Applies the current signal states to controlled links.
LinkVectorVector myLinks
The list of LinkVectors; each vector contains the links that belong to the same link index.
Representation of a lane in the micro simulation.
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
~MSRailCrossing()
Destructor.
virtual void adaptLinkInformationFrom(const MSTrafficLightLogic &logic)
Applies information about controlled links and lanes from the given logic.
virtual void addLink(MSLink *link, MSLane *lane, int pos)
Adds a link on building.
int getIndexFromOffset(SUMOTime offset) const
Returns the step (the phasenumber) of a given position of the cycle.
void init(NLDetectorBuilder &nb)
Initialises the rail signal with information about adjacent rail signals.
SUMOTime getOffsetFromIndex(int index) const
Returns the position (start of a phase during a cycle) from of a given step.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const
Returns the index of the logic at the given simulation step.
A fixed traffic light logic.
SUMOTime trySwitch()
Switches to the next phase.
MSRailCrossing(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &programID, const std::map< std::string, std::string > ¶meters)
Constructor.
The parent class for traffic light logics.
std::vector< MSLink * > myIncomingRailLinks
The incoming rail links.
SUMOTime myMinGreenTime
minimum green time
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
#define SUMO_MAX_CONNECTIONS
the maximum number of connections across an intersection
void adaptLinkInformationFrom(const MSTrafficLightLogic &logic)
Applies information about controlled links and lanes from the given logic.
Phases myPhases
The list of phases this logic uses.
void addLink(MSLink *link, MSLane *lane, int pos)
Adds a link on building.
A class that stores and controls tls and switching of their programs.
The definition of a single phase of a tls logic.
int myStep
The current step.
SUMOTime mySecurityGap
minimum time gap between closing the crossing (end of yellow time) and train passing the crossing
SUMOTime myYellowTime
minimum green time
SUMOTime updateCurrentPhase()
updates the current phase of the signal
Builds detectors for microsim.