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