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