20 #ifndef MSTriggeredRerouter_h 21 #define MSTriggeredRerouter_h 78 double prob,
const std::string& file,
bool off,
80 const std::string& vTypes);
A lane area vehicles can halt at.
double getProbability() const
Returns the rerouting probability.
MSEdgeVector closed
The list of closed edges.
const RerouteInterval * getCurrentReroute(SUMOTime time, SUMOVehicle &veh) const
Returns the rerouting definition valid for the given time and vehicle, 0 if none. ...
double getUserProbability() const
Returns the rerouting probability given by the user.
SUMOTime myCurrentIntervalEnd
Represents a generic random distribution.
SUMOTime setPermissions(const SUMOTime currentTime)
Sets the edge permission if there are any defined in the closingEdge.
SVCPermissions myCurrentPermissions
List of permissions for closed edges.
RandomDistributor< MSEdge * > edgeProbs
The distributions of new destinations to use.
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
std::vector< MSLane * > myCurrentClosedLanes
List of closed lanes.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Notification
Definition of a vehicle state.
MSTriggeredRerouter(const std::string &id, const MSEdgeVector &edges, double prob, const std::string &file, bool off, SUMOTime timeThreshold, const std::string &vTypes)
Constructor.
void setUserUsageProbability(double prob)
Sets the probability with which a vehicle is rerouted given by the user.
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
SAX-handler base for SUMO-files.
std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
double myProbability
The probability and the user-given probability.
The simulated network and simulation perfomer.
RandomDistributor< ParkingAreaVisible > myCurrentParkProb
new destinations with probabilities
A road/street connecting two junctions (gui-version)
A road/street connecting two junctions.
MSTriggeredRerouter & operator=(const MSTriggeredRerouter &)
Invalidated assignment operator.
virtual void myEndElement(int element)
Called when a closing tag occurs.
An abstract device that changes the state of the micro simulation.
double getWeight(SUMOVehicle &veh, const std::string param, const double defaultWeight) const
Representation of a vehicle.
Encapsulated SAX-Attributes.
long long id
unique ID for this interval
virtual ~MSTriggeredRerouter()
Destructor.
SUMOTime begin
The begin time these definitions are valid.
RandomDistributor< const MSRoute * > myCurrentRouteProb
new routes with probabilities
static MSEdge mySpecialDest_keepDestination
special destination values
MSParkingArea * rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval *rerouteDef, SUMOVehicle &veh, bool &newDestination) const
Something on a lane to be noticed about vehicle movement.
static MSEdge mySpecialDest_terminateRoute
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Tries to reroute the vehicle.
bool notifyLeave(SUMOVehicle &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Removes the reminder.
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
Reroutes vehicles passing an edge.
SUMOTime end
The end time these definitions are valid.
std::vector< MSLane * > closedLanes
The list of closed lanes.
RandomDistributor< const MSRoute * > routeProbs
The distributions of new routes to use.
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
MSEdgeVector myCurrentClosed
List of closed edges.
bool myAmInUserMode
Information whether the current rerouting probability is the user-given.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
std::vector< MSEdge * > MSEdgeVector
bool notifyMove(SUMOVehicle &veh, double oldPos, double newPos, double newSpeed)
Triggers rerouting (once) for vehicles that are already on the edge when the rerouter activates...
std::pair< MSParkingArea *, bool > ParkingAreaVisible
bool vehicleApplies(const SUMOVehicle &veh) const
Checks whether the detector measures vehicles of the given type.
SVCPermissions permissions
The permissions to use.
RandomDistributor< ParkingAreaVisible > parkProbs
The distributions of new parking areas to use as destinations.
Representation of a lane in the micro simulation.
MSEdgeVector closedLanesAffected
The list of edges that are affect by closed lanes.