91#ifdef DEBUG_REGISTER_DRIVEWAY
92 std::cout <<
"MSRailSignalControl edge=" << protectedBidi->
getID() <<
" assumed secure by driveway " << driveWayID <<
" at signal " << rs->
getID() <<
"\n";
99 item.first->updateDriveway(item.second);
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permission is a railway edge.
A road/street connecting two junctions.
VehicleState
Definition of a vehicle state.
@ NEWROUTE
The vehicle got a new route.
@ DEPARTED
The vehicle has departed (was inserted into the network)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
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 MSEdge *, std::vector< std::pair< MSRailSignal *, int > > > myProtectedDriveways
map of driveways that must perform additional checks if the key edge is used by a train route
std::vector< MSRailSignal * > mySignals
list of all rail signals
MSRailSignalControl()
Constructor.
std::set< const MSEdge * > myUsedEdges
all rail edges that are part of a known route
static MSRailSignalControl * myInstance
static MSRailSignalControl & getInstance()
void updateDriveways(const MSEdge *used)
compute additioanl deadlock-check requirements for registered driveways
static void clearState()
Perform resets events when quick-loading state.
void registerProtectedDriveway(MSRailSignal *rs, int driveWayID, const MSEdge *protectedBidi)
mark driveway that must receive additional checks if protectedBidi is ever used by a train route
const ConstMSEdgeVector & getEdges() const
const std::string & getID() const
Returns the id.
virtual SUMOVehicleClass getVClass() const =0
Returns the object's access class.
Representation of a vehicle.
virtual const MSRoute & getRoute() const =0
Returns the current route.