19 #ifndef MSRailCrossing_h 20 #define MSRailCrossing_h 54 const std::string&
id,
const std::string& subid,
55 const std::map<std::string, std::string>& parameters);
108 return "railCrossing";
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
#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.
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.
const std::string getLogicType() const
Returns the type of the logic as a string.
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.
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.
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