22 #ifndef MSTriggeredRerouter_h
23 #define MSTriggeredRerouter_h
79 const std::vector<MSEdge*>& edges,
80 SUMOReal prob,
const std::string& file,
bool off);
bool hasCurrentReroute(SUMOTime time, SUMOVehicle &veh) const
Returns whether a rerouting definition is valid for the given time and vehicle.
std::vector< MSEdge * > closed
The list of closed edges.
SUMOTime myCurrentIntervalEnd
RandomDistributor< MSEdge * > edgeProbs
The distributions of new destinations to use.
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
Notification
Definition of a vehicle state.
const RerouteInterval & getCurrentReroute(SUMOTime time, SUMOVehicle &veh) const
Returns the rerouting definition valid for the given time and vehicle.
void setUserUsageProbability(SUMOReal prob)
Sets the probability with which a vehicle is rerouted given by the user.
SUMOReal getUserProbability() const
Returns the rerouting probability given by the user.
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
SUMOReal myUserProbability
SAX-handler base for SUMO-files.
The simulated network and simulation perfomer.
SUMOReal myProbability
The probability and the user-given probability.
A road/street connecting two junctions.
MSTriggeredRerouter & operator=(const MSTriggeredRerouter &)
Invalidated assignment operator.
void myEndElement(int element)
Called when a closing tag occurs.
An abstract device that changes the state of the micro simulation.
Representation of a vehicle.
Encapsulated SAX-Attributes.
virtual ~MSTriggeredRerouter()
Destructor.
SUMOTime begin
The begin time these definitions are valid.
std::vector< MSEdge * > myCurrentClosed
List of closed edges.
RandomDistributor< const MSRoute * > myCurrentRouteProb
new routes with probabilities
static MSEdge mySpecialDest_keepDestination
special destination values
SUMOReal getProbability() const
Returns the rerouting probability.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Tries to reroute the vehicle.
Something on a lane to be noticed about vehicle movement.
static MSEdge mySpecialDest_terminateRoute
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
Reroutes vehicles passing an edge.
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
SUMOTime end
The end time these definitions are valid.
RandomDistributor< const MSRoute * > routeProbs
The distributions of new routes to use.
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
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;.
MSTriggeredRerouter(const std::string &id, const std::vector< MSEdge * > &edges, SUMOReal prob, const std::string &file, bool off)
Constructor.
Representation of a lane in the micro simulation.