73 double prob,
bool off,
SUMOTime timeThreshold,
74 const std::string& vTypes);
183 static const std::map<std::string, MSTriggeredRerouter*>&
getInstances() {
229 std::map<MSParkingArea*, ConstMSEdgeVector>& newRoutes,
230 std::map<MSParkingArea*, ConstMSEdgeVector>& parkApproaches,
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< MSEdge * > MSEdgeVector
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
A road/street connecting two junctions (gui-version)
A road/street connecting two junctions.
Representation of a lane in the micro simulation.
Something on a lane to be noticed about vehicle movement.
Notification
Definition of a vehicle state.
The simulated network and simulation perfomer.
A lane area vehicles can halt at.
Reroutes vehicles passing an edge.
bool isParkingRerouter() const
SUMOTime setPermissions(const SUMOTime currentTime)
Sets the edge permission if there are any defined in the closingEdge.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Tries to reroute the vehicle.
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.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Removes the reminder.
RandomDistributor< ParkingAreaVisible > myCurrentParkProb
new destinations with probabilities
RandomDistributor< ConstMSRoutePtr > myCurrentRouteProb
new routes with probabilities
double getUserProbability() const
Returns the rerouting probability given by the user.
static MSParkingArea * rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval *rerouteDef, SUMOVehicle &veh, bool &newDestination, ConstMSEdgeVector &newRoute)
std::vector< MSLane * > myCurrentClosedLanes
List of closed lanes.
bool myHaveParkProbs
whether this rerouter has loaded parkingReroute definitions
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
MSTriggeredRerouter(const std::string &id, const MSEdgeVector &edges, double prob, 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.
SVCPermissions myCurrentPermissions
List of permissions for closed edges.
static bool addParkValues(SUMOVehicle &veh, double brakeGap, bool newDestination, MSParkingArea *pa, double paOccupancy, double prob, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, MSParkingAreaMap_t &parkAreas, std::map< MSParkingArea *, ConstMSEdgeVector > &newRoutes, std::map< MSParkingArea *, ConstMSEdgeVector > &parkApproaches, ParkingParamMap_t &maxValues)
determine attributes of candiate parking area for scoring
static MSEdge mySpecialDest_terminateRoute
virtual void myEndElement(int element)
Called when a closing tag occurs.
const RerouteInterval * getCurrentReroute(SUMOTime time, SUMOVehicle &veh) const
Returns the rerouting definition valid for the given time and vehicle, 0 if none.
std::pair< MSParkingArea *, bool > ParkingAreaVisible
double myProbability
The probability and the user-given probability.
virtual ~MSTriggeredRerouter()
Destructor.
MSTriggeredRerouter(const MSTriggeredRerouter &)
Invalidated copy constructor.
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
std::map< std::string, double > ParkingParamMap_t
std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
MSEdgeVector myCurrentClosed
List of closed edges.
static void checkParkingRerouteConsistency()
issues warning for incomplete parkingReroute relationships
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
static std::map< std::string, MSTriggeredRerouter * > myInstances
bool vehicleApplies(const SUMOVehicle &veh) const
Checks whether the detector measures vehicles of the given type.
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
SUMOTime myCurrentIntervalEnd
static const std::map< std::string, MSTriggeredRerouter * > & getInstances()
return all rerouter instances
bool myAmInUserMode
Information whether the current rerouting probability is the user-given.
const MSEdgeVector myEdges
edges where vehicles are notified
MSTriggeredRerouter & operator=(const MSTriggeredRerouter &)
Invalidated assignment operator.
static MSEdge mySpecialDest_keepDestination
special destination values
double getProbability() const
Returns the rerouting probability.
std::map< MSParkingArea *, ParkingParamMap_t, ComparatorIdLess > MSParkingAreaMap_t
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
static double getWeight(SUMOVehicle &veh, const std::string param, const double defaultWeight)
Base class for objects which have an id.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.
Representation of a vehicle, person, or container.
Representation of a vehicle.
SUMOTime begin
The begin time these definitions are valid.
RandomDistributor< ConstMSRoutePtr > routeProbs
The distributions of new routes to use.
SUMOTime end
The end time these definitions are valid.
RandomDistributor< MSEdge * > edgeProbs
The distributions of new destinations to use.
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.
long long id
unique ID for this interval
SVCPermissions permissions
The permissions to use.
MSEdgeVector closed
The list of closed edges.
std::vector< MSLane * > closedLanes
The list of closed lanes.