36 #define DEBUG_COND2(obj) (true)
52 if (stopPos.first !=
nullptr) {
54 stop.
lane = stopPos.first->getID();
56 stop.
endPos = stopPos.second + POSITION_EPS;
92 int remainingEdges = 0;
94 const int routeLength = (int)edges.size();
95 while (routePos + 1 < routeLength && (remainingEdges < 2 || remainingDist < 200)) {
96 const MSEdge* edge = edges[routePos];
100 newEdges.push_back(edge);
102 const MSEdge* lastEdge = edges.back();
103 newEdges.push_back(lastEdge);
105 while (remainingEdges < 2 || remainingDist < 200) {
109 if (successors.size() == 0) {
114 newEdges.push_back(successors[nextIndex]);
115 lastEdge = newEdges.back();
121 veh.
replaceRouteEdges(newEdges, -1, 0,
"taxi:idling:randomCircling",
false,
false,
false);
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< MSEdge * > MSEdgeVector
#define WRITE_WARNING(msg)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool replaceRouteEdges(ConstMSEdgeVector &edges, double cost, double savings, const std::string &info, bool onInit=false, bool check=false, bool removeStops=true)
Replaces the current route by the given edges.
std::mt19937 * getRNG() const
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
int getRoutePosition() const
return index of edge within route
const MSRoute & getRoute() const
Returns the current route.
double brakeGap(const double speed) const
Returns the distance the vehicle needs to halt including driver's reaction time tau (i....
A device which collects info on the vehicle trip (mainly on departure and arrival)
A road/street connecting two junctions.
double getLength() const
return the length of the edge
const MSEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
void idle(MSDevice_Taxi *taxi)
computes Idling and updates reservations
void idle(MSDevice_Taxi *taxi)
computes Idling and updates reservations
const ConstMSEdgeVector & getEdges() const
bool triggered
whether an arriving person lets the vehicle continue
bool containerTriggered
whether an arriving container lets the vehicle continue
SUMOVehicle & getHolder() const
Returns the vehicle that holds this device.
Representation of a vehicle in the micro simulation.
bool addTraciStop(SUMOVehicleParameter::Stop stop, std::string &errorMsg)
std::pair< const MSLane *, double > getLanePosAfterDist(double distance) const
return lane and position along bestlanes at the given distance
double getSpeed() const
Returns the vehicle's current speed.
double getPositionOnLane() const
Get the vehicle's position along the lane.
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
int getContainerCapacity() const
Get this vehicle type's container capacity.
const std::string & getID() const
Returns the id.
static double rand(std::mt19937 *rng=nullptr)
Returns a random real number in [0, 1)
Definition of vehicle stop (position and duration)
std::string lane
The lane to stop at.
double startPos
The stopping position start.
std::string actType
act Type (only used by Persons) (used by NETEDIT)
bool triggered
whether an arriving person lets the vehicle continue
double endPos
The stopping position end.
bool parking
whether the vehicle is removed from the net while stopping
bool containerTriggered
whether an arriving container lets the vehicle continue