49 const std::string&
id,
const std::string& subid,
50 const std::map<std::string, std::string>& parameters) :
102 for (std::map<const SUMOVehicle*, MSLink::ApproachingVehicleInformation>::const_iterator
103 it_avi = (*it_link)->getApproaching().begin();
104 it_avi != (*it_link)->getApproaching().end(); ++it_avi) {
110 if ((*it_link)->getViaLane() != 0 && (*it_link)->getViaLane()->getVehicleNumberWithPartials() > 0) {
116 const SUMOTime wait = stayRedUntil - now;
Builds detectors for microsim.
int getIndexFromOffset(SUMOTime offset) const
Returns the step (the phasenumber) of a given position of the cycle.
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
Phases myPhases
The list of phases this logic uses.
int myStep
The current step.
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
bool setTrafficLightSignals(SUMOTime t) const
Applies the current signal states to controlled links.
A fixed traffic light logic.
~MSRailCrossing()
Destructor.
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.
A class that stores and controls tls and switching of their programs.
virtual void adaptLinkInformationFrom(const MSTrafficLightLogic &logic)
Applies information about controlled links and lanes from the given logic.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
SUMOTime mySecurityGap
minimum time gap between closing the crossing (end of yellow time) and train passing the crossing ...
SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const
Returns the index of the logic at the given simulation step.
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...
MSRailCrossing(MSTLLogicControl &tlcontrol, const std::string &id, const std::string &subid, const std::map< std::string, std::string > ¶meters)
Constructor.
void addLink(MSLink *link, MSLane *lane, int pos)
Adds a link on building.
virtual void addLink(MSLink *link, MSLane *lane, int pos)
Adds a link on building.
The parent class for traffic light logics.
SUMOTime myYellowTime
minimum green time
SUMOTime trySwitch()
Switches to the next phase.
std::vector< MSLink * > myIncomingRailLinks
The incoming rail links.
Representation of a lane in the micro simulation.
The definition of a single phase of a tls logic.
SUMOTime myMinGreenTime
minimum green time