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()) {
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) {
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. ...
MSEdge & getEdge() const
Returns the lane's edge.
const std::string & getOriginalID() const
Returns the id of the original vehicle type if this is a vehicle specific type, the id otherwise...
virtual double getArrivalPos() const =0
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) ...
double getBeginLanePosition() const
Returns the begin position of this stop.
double getUserProbability() const
Returns the rerouting probability given by the user.
virtual MSParkingArea * getNextParkingArea()=0
const ConstMSEdgeVector & getEdges() const
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
virtual const std::vector< MSTransportable * > & getPersons() const =0
retrieve riding persons
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
SUMOTime myCurrentIntervalEnd
virtual const std::string & getID() const =0
Get the vehicle's ID.
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
virtual MSVehicleDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or 0.
virtual const MSRoute & getRoute() const =0
Returns the current route.
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.
The vehicle arrived at a junction.
lane of a reroute of type closing
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
std::vector< MSLane * > myCurrentClosedLanes
List of closed lanes.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
virtual bool isVehicle() const =0
Get the vehicle's ID.
Notification
Definition of a vehicle state.
std::string time2string(SUMOTime t)
A device that performs vehicle rerouting based on current edge speeds.
const std::set< std::string > getVTypeDistributionMembership(const std::string &id) const
Return the distribution IDs the vehicle type is a member of.
virtual MSLane * getLane() const =0
Returns the lane the vehicle is on.
const RGBColor & getColor() const
Returns the color.
weights: time range begin
virtual double getBrakeGap() const =0
get distance for coming to a stop (used for rerouting checks)
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.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSTriggeredRerouter(const std::string &id, const MSEdgeVector &edges, double prob, const std::string &file, bool off, SUMOTime timeThreshold, const std::string &vTypes)
Constructor.
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
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...
const std::vector< T > & getVals() const
Returns the members of the distribution.
const MSEdge * getLastEdge() const
returns the destination edge
void setUserUsageProbability(double prob)
Sets the probability with which a vehicle is rerouted given by the user.
std::vector< const MSEdge * > ConstMSEdgeVector
const std::string & getID() const
Returns the id.
The arrival position is given.
const SVCPermissions SVCAll
all VClasses are allowed
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
SAX-handler base for SUMO-files.
int size() const
Returns the number of edges to pass.
std::set< std::string > myVehicleTypes
The vehicle types to look for (empty means all)
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
double myProbability
The probability and the user-given probability.
#define WRITE_WARNING(msg)
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Removes the reminder.
bool remove(T val)
Removes a value with an assigned probability from the distribution.
RandomDistributor< ParkingAreaVisible > myCurrentParkProb
new destinations with probabilities
A road/street connecting two junctions.
virtual void myEndElement(int element)
Called when a closing tag occurs.
double getEndLanePosition() const
Returns the end position of this stop.
The vehicle changes lanes (micro only)
MSParkingArea * rerouteParkingArea(const MSTriggeredRerouter::RerouteInterval *rerouteDef, SUMOVehicle &veh, bool &newDestination, ConstMSEdgeVector &newRoute) const
virtual void replaceParameter(const SUMOVehicleParameter *newParameter)=0
Replaces the vehicle's parameter.
bool knowsParameter(const std::string &key) const
Returns whether the parameter is known.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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.
An abstract device that changes the state of the micro simulation.
const std::vector< double > & getProbs() const
Returns the probabilities assigned to the members of the distribution.
double getWeight(SUMOVehicle &veh, const std::string param, const double defaultWeight) const
Representation of a vehicle.
Encapsulated SAX-Attributes.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
double recomputeCosts(const std::vector< const E *> &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const
T get(std::mt19937 *which=0) const
Draw a sample of the distribution.
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
virtual ~MSTriggeredRerouter()
Destructor.
SUMOTime begin
The begin time these definitions are valid.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
A wrapper for a Command function.
int getCapacity() const
Returns the area capacity.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
virtual SUMOTime getAccumulatedWaitingTime() const =0
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
RandomDistributor< const MSRoute * > myCurrentRouteProb
new routes with probabilities
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...
static MSEdge mySpecialDest_keepDestination
special destination values
void addDetector(MSMoveReminder *data)
Adds a data collector for a detector to this segment.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Tries to reroute the vehicle.
bool hasInternalLinks() const
return whether the network contains internal links
probability of route of a reroute
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
probability of destiny of a reroute
Something on a lane to be noticed about vehicle movement.
static MSEdge mySpecialDest_terminateRoute
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...
const SUMOVTypeParameter & getParameter() const
int getOccupancy() const
Returns the area occupancy.
double arrivalPos
(optional) The position the vehicle shall arrive on
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
std::vector< std::string > getVector()
return vector of strings
void clear()
Clears the distribution.
entry for an alternative parking zone
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
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.
Structure representing possible vehicle parameter.
Representation of a vehicle or person.
SUMOTime end
The end time these definitions are valid.
bool containsAnyOf(const MSEdgeVector &edgelist) const
std::vector< MSLane * > closedLanes
The list of closed lanes.
RandomDistributor< const MSRoute * > routeProbs
The distributions of new routes to use.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
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.
A single mesoscopic segment (cell)
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
MSEdgeVector myCurrentClosed
List of closed edges.
bool myAmInUserMode
Information whether the current rerouting probability is the user-given.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
an aggreagated-output interval
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
virtual bool replaceParkingArea(MSParkingArea *parkingArea, std::string &errorMsg)=0
Replaces a stop.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
std::vector< MSEdge * > MSEdgeVector
const MSLane & getLane() const
Returns the lane this stop is located at.
virtual const ConstMSEdgeVector::const_iterator & getCurrentRouteEdge() const =0
Returns an iterator pointing to the current edge in this vehicles route.
bool vehicleApplies(const SUMOVehicle &veh) const
Checks whether the detector measures vehicles of the given type.
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
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.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
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...
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
MSEdgeVector closedLanesAffected
The list of edges that are affect by closed lanes.
virtual SUMOTime getWaitingTime() const =0
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
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...