85 const std::map<const MSRailSignal*, std::vector<const MSRailSignal*> >&
getDeadlockChecks()
const {
98 void findDeadlockFoes(
const MSDriveWay* dw,
const std::vector<const MSRailSignal*>& others, std::vector<const MSDriveWay*> deadlockFoes);
A road/street connecting two junctions.
Interface for objects listening to vehicle state changes.
VehicleState
Definition of a vehicle state.
A base class for constraints.
void notifyApproach(const MSLink *link)
switch rail signal to active
void addSignal(MSRailSignal *signal)
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to, const std::string &info="")
Called if a vehicle changes its state.
std::map< const MSDriveWay *, std::set< const MSDriveWay * > > myDriveWaySucc
void addDeadlockCheck(std::vector< const MSRailSignal * > signals)
void addDrivewayFollower(const MSDriveWay *dw, const MSDriveWay *dw2)
std::vector< MSRailSignal * > mySignals
list of all rail signals
std::map< const MSRailSignal *, std::vector< const MSRailSignal * > > myDeadlockChecks
static bool hasInstance()
MSRailSignalControl()
Constructor.
std::set< const MSEdge * > myUsedEdges
all rail edges that are part of a known route
void addWaitRelation(const SUMOVehicle *waits, const MSRailSignal *rs, const SUMOVehicle *reason, MSRailSignalConstraint *constraint=nullptr)
static MSRailSignalControl * myInstance
std::map< const SUMOVehicle *, WaitRelation > myWaitRelations
void addDWDeadlockChecks(const MSRailSignal *rs, MSDriveWay *dw)
check whether the given signal and driveway are part of a deadlock circle
static MSRailSignalControl & getInstance()
std::map< const MSDriveWay *, std::set< const MSDriveWay * > > myDriveWayPred
const std::map< const MSRailSignal *, std::vector< const MSRailSignal * > > & getDeadlockChecks() const
void updateDriveways(const MSEdge *used)
compute additioanl deadlock-check requirements for registered driveways
bool haveDeadlock(const SUMOVehicle *veh) const
whether there is a circle in the waiting-for relationships that contains the given vehicle
const std::vector< MSRailSignal * > & getSignals() const
std::set< std::set< const SUMOVehicle * > > myWrittenDeadlocks
void updateSignals(SUMOTime t)
update active rail signals
std::set< MSRailSignal *, ComparatorNumericalIdLess > myActiveSignals
std::map< std::pair< int, int >, bool > myDriveWayCompatibility
static void clearState()
Perform resets events when quick-loading state.
void resetWaitRelations()
reset all waiting-for relationships at the start of the simulation step
std::vector< std::pair< MSLink *, int > > mySwitchedGreenFlanks
list of signals that switched green along with driveway index
void findDeadlockFoes(const MSDriveWay *dw, const std::vector< const MSRailSignal * > &others, std::vector< const MSDriveWay * > deadlockFoes)
Representation of a vehicle.
MSRailSignalConstraint * constraint
WaitRelation(const MSRailSignal *_railSignal=nullptr, const SUMOVehicle *_foe=nullptr, MSRailSignalConstraint *_constraint=nullptr)
const MSRailSignal * railSignal