 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
60 #define DEBUGCOND (veh.isSelected())
74 double prob,
const std::string& file,
bool off,
76 const std::string& vTypes) :
81 myUserProbability(prob),
82 myAmInUserMode(false),
83 myTimeThreshold(timeThreshold) {
85 for (MSEdgeVector::const_iterator j = edges.begin(); j != edges.end(); ++j) {
91 const std::vector<MSLane*>& destLanes = (*j)->getLanes();
92 for (std::vector<MSLane*>::const_iterator i = destLanes.begin(); i != destLanes.end(); ++i) {
93 (*i)->addMoveReminder(
this);
122 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": No destination edge id given.");
126 if (dest ==
"keepDestination") {
128 }
else if (dest ==
"terminateRoute") {
131 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Destination edge '" + dest +
"' is not known.");
141 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Attribute 'probability' for destination '" + dest +
"' is negative (must not).");
152 if (closed ==
nullptr) {
153 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Edge '" + closed_id +
"' to close is not known.");
166 if (closed ==
nullptr) {
167 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Lane '" + closed_id +
"' to close is not known.");
186 if (routeStr ==
"") {
190 if (route ==
nullptr) {
191 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Route '" + routeStr +
"' does not exist.");
201 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Attribute 'probability' for route '" + routeStr +
"' is negative (must not).");
211 if (parkingarea ==
"") {
212 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": No parking area id given.");
216 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Parking area '" + parkingarea +
"' is not known.");
225 throw ProcessError(
"MSTriggeredRerouter " +
getID() +
": Attribute 'probability' for destination '" + parkingarea +
"' is negative (must not).");
253 std::set<MSEdge*> affected;
255 affected.insert(&l->
getEdge());
280 if (i->begin == currentTime && !(i->closed.empty() && i->closedLanes.empty()) && i->permissions !=
SVCAll) {
281 for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) {
282 for (std::vector<MSLane*>::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l) {
284 (*l)->setPermissions(i->permissions, i->id);
286 (*e)->rebuildAllowedLanes();
288 for (std::vector<MSLane*>::iterator l = i->closedLanes.begin(); l != i->closedLanes.end(); ++l) {
289 (*l)->setPermissions(i->permissions, i->id);
290 (*l)->getEdge().rebuildAllowedLanes();
295 if (i->end == currentTime && !(i->closed.empty() && i->closedLanes.empty()) && i->permissions !=
SVCAll) {
296 for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) {
297 for (std::vector<MSLane*>::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l) {
298 (*l)->resetPermissions(i->id);
301 (*e)->rebuildAllowedLanes();
303 for (std::vector<MSLane*>::iterator l = i->closedLanes.begin(); l != i->closedLanes.end(); ++l) {
304 (*l)->resetPermissions(i->id);
305 (*l)->getEdge().rebuildAllowedLanes();
316 if (i->begin <= time && i->end > time) {
319 i->edgeProbs.getOverallProb() > 0 ||
321 i->routeProbs.getOverallProb() > 0 ||
323 i->parkProbs.getOverallProb() > 0 ||
339 if (i->begin <= time && i->end > time) {
340 if (i->parkProbs.getOverallProb() != 0 || i->edgeProbs.getOverallProb() != 0 || i->routeProbs.getOverallProb() != 0 || !i->closed.empty()) {
368 SUMOVehicle& veh = static_cast<SUMOVehicle&>(tObject);
375 if (rerouteDef ==
nullptr) {
387 if (rerouteDef->
closedLanes.size() > 0 && !hasReroutingDevice) {
393 #ifdef DEBUG_REROUTER
400 bool newDestination =
false;
403 if (newParkingArea !=
nullptr) {
409 if (newDestination) {
424 const double savings = previousCost - routeCost;
430 std::string errorMsg;
435 +
"' could not reroute to new parkingArea '" + newParkingArea->
getID()
445 if (newRoute !=
nullptr) {
446 #ifdef DEBUG_REROUTER
448 std::cout <<
" replacedRoute from routeDist " << newRoute->
getID() <<
"\n";
454 const MSEdge* newEdge = lastEdge;
456 double newArrivalPos = -1;
457 const bool destUnreachable = std::find(rerouteDef->
closed.begin(), rerouteDef->
closed.end(), lastEdge) != rerouteDef->
closed.end();
458 bool keepDestination =
false;
461 if (rerouteDef->
closed.size() == 0 || destUnreachable) {
464 keepDestination =
true;
472 WRITE_WARNING(
"Cannot keep destination edge '" + lastEdge->
getID() +
"' for vehicle '" + veh.
getID() +
"' due to closed edges. Terminating route.");
477 }
else if (newEdge ==
nullptr) {
478 #ifdef DEBUG_REROUTER
480 std::cout <<
" could not find new edge!\n";
498 edgeProbs2.
remove(const_cast<MSEdge*>(newEdge));
499 while (edges.size() == 0 && edgeProbs2.
getVals().size() > 0) {
500 newEdge = edgeProbs2.
get();
501 edgeProbs2.
remove(const_cast<MSEdge*>(newEdge));
503 newEdge = veh.getEdge();
504 newArrivalPos = veh.getPositionOnLane();
516 const bool useNewRoute = veh.replaceRouteEdges(edges, routeCost, 0,
getID());
517 #ifdef DEBUG_REROUTER
518 if (
DEBUGCOND) std::cout <<
" rerouting: newDest=" << newEdge->
getID()
520 <<
" useNewRoute=" << useNewRoute <<
" newArrivalPos=" << newArrivalPos <<
" numClosed=" << rerouteDef->
closed.size()
521 <<
" destUnreachable=" << destUnreachable <<
" containsClosed=" << veh.getRoute().containsAnyOf(rerouteDef->
closed) <<
"\n";
523 if (useNewRoute && newArrivalPos != -1) {
525 veh.setArrivalPos(newArrivalPos);
582 return defaultWeight;
600 if (destParkArea ==
nullptr) {
605 bool destVisible =
false;
606 for (
auto paVis : parks) {
607 if (paVis.first == destParkArea
629 <<
" rerouteParkingArea dest=" << destParkArea->
getID()
631 <<
" newDest=" << newDestination
636 typedef std::map<std::string, double> ParkingParamMap_t;
637 typedef std::map<MSParkingArea*, ParkingParamMap_t> MSParkingAreaMap_t;
639 ParkingParamMap_t weights;
640 std::map<MSParkingArea*, ConstMSEdgeVector> newRoutes;
643 weights[
"probability"] =
getWeight(veh,
"parking.probability.weight", 0.0);
646 weights[
"capacity"] =
getWeight(veh,
"parking.capacity.weight", 0.0);
649 weights[
"absfreespace"] =
getWeight(veh,
"parking.absfreespace.weight", 0.0);
652 weights[
"relfreespace"] =
getWeight(veh,
"parking.relfreespace.weight", 0.0);
655 weights[
"distanceto"] =
getWeight(veh,
"parking.distanceto.weight",
getWeight(veh,
"parking.distance.weight", 1.0));
658 weights[
"timeto"] =
getWeight(veh,
"parking.timeto.weight", 0.0);
661 weights[
"distancefrom"] =
getWeight(veh,
"parking.distancefrom.weight", 0.0);
664 weights[
"timefrom"] =
getWeight(veh,
"parking.timefrom.weight", 0.0);
667 ParkingParamMap_t maxValues;
669 maxValues[
"probability"] = 0.0;
670 maxValues[
"capacity"] = 0.0;
671 maxValues[
"absfreespace"] = 0.0;
672 maxValues[
"relfreespace"] = 0.0;
673 maxValues[
"distanceto"] = 0.0;
674 maxValues[
"timeto"] = 0.0;
675 maxValues[
"distancefrom"] = 0.0;
676 maxValues[
"timefrom"] = 0.0;
679 MSParkingAreaMap_t parkAreas;
687 for (
int i = 0; i < (int)parks.size(); ++i) {
689 const double prob = probs[i];
693 if (paOccupancy < pa->getCapacity()) {
696 ParkingParamMap_t parkValues;
707 if (edgesToPark.size() > 0) {
712 double nextPos = veh.getArrivalPos();
713 int nextDestinationIndex = route.
size() - 1;
714 if (!newDestination) {
715 std::vector<std::pair<int, double> > stopIndices = veh.getStopIndices();
716 if (stopIndices.size() > 1) {
717 nextDestinationIndex = stopIndices[1].first;
718 nextDestination = route.
getEdges()[nextDestinationIndex];
719 nextPos = stopIndices[1].second;
722 if (parkEdge == nextDestination && nextPos < pa->getEndLanePosition()) {
729 if (edgesFromPark.size() > 0 || newDestination) {
731 parkValues[
"probability"] = prob;
733 if (parkValues[
"probability"] > maxValues[
"probability"]) {
734 maxValues[
"probability"] = parkValues[
"probability"];
737 parkValues[
"capacity"] = (double)(pa->
getCapacity());
738 parkValues[
"absfreespace"] = (double)(pa->
getCapacity() - paOccupancy);
739 parkValues[
"relfreespace"] = parkValues[
"absfreespace"] / parkValues[
"capacity"];
741 if (parkValues[
"capacity"] > maxValues[
"capacity"]) {
742 maxValues[
"capacity"] = parkValues[
"capacity"];
745 if (parkValues[
"absfreespace"] > maxValues[
"absfreespace"]) {
746 maxValues[
"absfreespace"] = parkValues[
"absfreespace"];
749 if (parkValues[
"relfreespace"] > maxValues[
"relfreespace"]) {
750 maxValues[
"relfreespace"] = parkValues[
"relfreespace"];
757 routeToPark.begin(), routeToPark.end() - 1, includeInternalLengths);
766 if (parkValues[
"distanceto"] < brakeGap) {
775 if (parkValues[
"distanceto"] > maxValues[
"distanceto"]) {
776 maxValues[
"distanceto"] = parkValues[
"distanceto"];
779 if (parkValues[
"timeto"] > maxValues[
"timeto"]) {
780 maxValues[
"timeto"] = parkValues[
"timeto"];
785 if (newDestination) {
786 parkValues[
"distancefrom"] = 0;
787 parkValues[
"timefrom"] = 0;
789 MSRoute routeFromPark(route.
getID() +
"!frompark#1", edgesFromPark,
false,
793 routeFromPark.begin(), routeFromPark.end() - 1, includeInternalLengths);
796 newEdges.insert(newEdges.end(), edgesFromPark.begin() + 1, edgesFromPark.end());
797 newEdges.insert(newEdges.end(), route.
begin() + nextDestinationIndex + 1, route.
end());
800 if (parkValues[
"distancefrom"] > maxValues[
"distancefrom"]) {
801 maxValues[
"distancefrom"] = parkValues[
"distancefrom"];
804 if (parkValues[
"timefrom"] > maxValues[
"timefrom"]) {
805 maxValues[
"timefrom"] = parkValues[
"timefrom"];
808 parkAreas[pa] = parkValues;
809 newRoutes[pa] = newEdges;
813 std::cout <<
" altPA=" << pa->
getID()
825 std::cout <<
" maxValues=" <<
joinToString(maxValues,
" ",
":") <<
"\n";
830 double minParkingCost = 0.0;
832 for (MSParkingAreaMap_t::iterator it = parkAreas.begin(); it != parkAreas.end(); ++it) {
834 ParkingParamMap_t parkValues = it->second;
837 parkValues[
"probability"] = maxValues[
"probability"] > 0.0 ? 1.0 - parkValues[
"probability"] / maxValues[
"probability"] : 0.0;
838 parkValues[
"capacity"] = maxValues[
"capacity"] > 0.0 ? 1.0 - parkValues[
"capacity"] / maxValues[
"capacity"] : 0.0;
839 parkValues[
"absfreespace"] = maxValues[
"absfreespace"] > 0.0 ? 1.0 - parkValues[
"absfreespace"] / maxValues[
"absfreespace"] : 0.0;
840 parkValues[
"relfreespace"] = maxValues[
"relfreespace"] > 0.0 ? 1.0 - parkValues[
"relfreespace"] / maxValues[
"relfreespace"] : 0.0;
842 parkValues[
"distanceto"] = maxValues[
"distanceto"] > 0.0 ? parkValues[
"distanceto"] / maxValues[
"distanceto"] : 0.0;
843 parkValues[
"timeto"] = maxValues[
"timeto"] > 0.0 ? parkValues[
"timeto"] / maxValues[
"timeto"] : 0.0;
845 parkValues[
"distancefrom"] = maxValues[
"distancefrom"] > 0.0 ? parkValues[
"distancefrom"] / maxValues[
"distancefrom"] : 0.0;
846 parkValues[
"timefrom"] = maxValues[
"timefrom"] > 0.0 ? parkValues[
"timefrom"] / maxValues[
"timefrom"] : 0.0;
849 double parkingCost = 0.0;
852 for (ParkingParamMap_t::iterator pc = parkValues.begin(); pc != parkValues.end(); ++pc) {
853 parkingCost += weights[pc->first] * pc->second;
857 if (nearParkArea ==
nullptr || parkingCost < minParkingCost) {
858 minParkingCost = parkingCost;
859 nearParkArea = it->first;
860 newRoute = newRoutes[nearParkArea];
865 std::cout <<
" altPA=" << it->first->
getID() <<
" score=" << parkingCost <<
"\n";
887 for (
auto vTypeDist : vTypeDists) {
virtual bool compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)=0
Builds the route between the given edges using the minimum effort at the given time The definition of...
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
const MSLane & getLane() const
Returns the lane this stop is located at.
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.
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
The vehicle changes lanes (micro only)
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
RandomDistributor< const MSRoute * > routeProbs
The distributions of new routes to use.
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
bool hasInternalLinks() const
return whether the network contains internal links
Representation of a vehicle or person.
virtual SUMOTime getWaitingTime() const =0
The arrival position is given.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
A lane area vehicles can halt at.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
A device that performs vehicle rerouting based on current edge speeds.
#define WRITE_WARNING(msg)
Representation of a lane in the micro simulation.
virtual void replaceParameter(const SUMOVehicleParameter *newParameter)=0
Replaces the vehicle's parameter.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
virtual bool replaceRouteEdges(ConstMSEdgeVector &edges, double cost, double savings, const std::string &info, bool onInit=false, bool check=false, bool removeStops=true)=0
Replaces the current route by the given edges.
SAX-handler base for SUMO-files.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
A single mesoscopic segment (cell)
double getEndLanePosition() const
Returns the end position of this stop.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
virtual bool replaceParkingArea(MSParkingArea *parkingArea, std::string &errorMsg)=0
Replaces a stop.
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
virtual bool isVehicle() const =0
Get the vehicle's ID.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
void addDetector(MSMoveReminder *data)
Adds a data collector for a detector to this segment.
SVCPermissions permissions
The permissions to use.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
virtual const std::string & getID() const =0
Get the vehicle's ID.
virtual const ConstMSEdgeVector::const_iterator & getCurrentRouteEdge() const =0
Returns an iterator pointing to the current edge in this vehicles route.
SUMOTime myCurrentIntervalEnd
double getBeginLanePosition() const
Returns the begin position of this stop.
virtual SUMOTime getAccumulatedWaitingTime() const =0
const MSEdge * getLastEdge() const
returns the destination edge
double getUserProbability() const
Returns the rerouting probability given by the user.
Representation of a vehicle.
A wrapper for a Command function.
SVCPermissions myCurrentPermissions
List of permissions for closed edges.
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< MSLane * > myCurrentClosedLanes
List of closed lanes.
const ConstMSEdgeVector & getEdges() const
std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
Structure representing possible vehicle parameter.
MSParkingArea * rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval *rerouteDef, SUMOVehicle &veh, bool &newDestination, ConstMSEdgeVector &newRoute) const
SUMOTime setPermissions(const SUMOTime currentTime)
Sets the edge permission if there are any defined in the closingEdge.
const RGBColor & getColor() const
Returns the color.
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
virtual MSParkingArea * getNextParkingArea()=0
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
Something on a lane to be noticed about vehicle movement.
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
weights: time range begin
virtual const std::vector< MSTransportable * > & getPersons() const =0
retrieve riding persons
entry for an alternative parking zone
double myProbability
The probability and the user-given probability.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
const std::string & getOriginalID() const
Returns the id of the original vehicle type if this is a vehicle specific type, the id otherwise.
virtual const MSRoute & getRoute() const =0
Returns the current route.
T get(std::mt19937 *which=0) const
Draw a sample of the distribution.
probability of destiny of a reroute
int size() const
Returns the number of edges to pass.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Removes the reminder.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
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
const std::set< std::string > getVTypeDistributionMembership(const std::string &id) const
Return the distribution IDs the vehicle type is a member of.
bool computeLooped(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)
Builds the route between the given edges using the minimum effort at the given time if from == to,...
bool remove(T val)
Removes a value with an assigned probability from the distribution.
void setUserUsageProbability(double prob)
Sets the probability with which a vehicle is rerouted given by the user.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
virtual void myEndElement(int element)
Called when a closing tag occurs.
int getCapacity() const
Returns the area capacity.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary....
virtual MSVehicleDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or 0.
virtual MSLane * getLane() const =0
Returns the lane the vehicle is on.
virtual bool replaceRoute(const MSRoute *route, const std::string &info, bool onInit=false, int offset=0, bool addStops=true, bool removeStops=true)=0
Replaces the current route by the given one.
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
double arrivalPos
(optional) The position the vehicle shall arrive on
RandomDistributor< const MSRoute * > myCurrentRouteProb
new routes with probabilities
std::vector< MSLane * > closedLanes
The list of closed lanes.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
probability of route of a reroute
std::string time2string(SUMOTime t)
A road/street connecting two junctions.
void clear()
Clears the distribution.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual ~MSTriggeredRerouter()
Destructor.
const std::vector< double > & getProbs() const
Returns the probabilities assigned to the members of the distribution.
virtual double getBrakeGap() const =0
get distance for coming to a stop (used for rerouting checks)
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
An abstract device that changes the state of the micro simulation.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
SUMOTime begin
The begin time these definitions are valid.
MSEdge & getEdge() const
Returns the lane's edge.
static MSEdge mySpecialDest_terminateRoute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
int getOccupancy() const
Returns the area occupancy.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
double recomputeCosts(const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const
bool myAmInUserMode
Information whether the current rerouting probability is the user-given.
const SVCPermissions SVCAll
all VClasses are allowed
std::vector< MSEdge * > MSEdgeVector
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
const SUMOVTypeParameter & getParameter() const
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
virtual double getArrivalPos() const =0
Returns this vehicle's desired arrivalPos for its current route (may change on reroute)
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
std::vector< std::string > getVector()
return vector of strings
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
lane of a reroute of type closing
an aggreagated-output interval
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
bool containsAnyOf(const MSEdgeVector &edgelist) const
SUMOTime end
The end time these definitions are valid.
MSEdgeVector closed
The list of closed edges.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
double getDistanceBetween(double fromPos, double toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true, int routePosition=0) const
Compute the distance between 2 given edges on this route, including the length of internal lanes....
Encapsulated SAX-Attributes.
const std::string & getID() const
Returns the id.
Notification
Definition of a vehicle state.
The vehicle arrived at a junction.
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.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
bool vehicleApplies(const SUMOVehicle &veh) const
Checks whether the detector measures vehicles of the given type.
const std::vector< T > & getVals() const
Returns the members of the distribution.
bool knowsParameter(const std::string &key) const
Returns whether the parameter is known.
double getProbability() const
Returns the rerouting probability.