20 #ifndef MSRailCrossing_h
21 #define MSRailCrossing_h
55 const std::string&
id,
const std::string& subid,
56 const std::map<std::string, std::string>& parameters);
109 return "railCrossing";
SUMOTime getOffsetFromIndex(int index) const
Returns the position (start of a phase during a cycle) from of a given step.
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.
const std::string getLogicType() const
Returns the type of the logic as a string.
SUMOTime updateCurrentPhase()
updates the current phase of the signal
#define UNUSED_PARAMETER(x)
A fixed traffic light logic.
~MSRailCrossing()
Destructor.
void init(NLDetectorBuilder &nb)
Initialises the rail signal with information about adjacent rail signals.
A class that stores and controls tls and switching of their programs.
SUMOTime mySecurityGap
minimum time gap between closing the crossing (end of yellow time) and train passing the crossing ...
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.
void changeStepAndDuration(MSTLLogicControl &tlcontrol, SUMOTime simStep, int step, SUMOTime stepDuration)
Changes the current phase and her duration.
SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const
Returns the index of the logic at the given simulation step.
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.
SUMOTime myMinGreenTime
minimum green time