316 bool replaceRoute(
ConstMSRoutePtr route,
const std::string& info,
bool onInit =
false,
int offset = 0,
bool addRouteStops =
true,
bool removeStops =
true, std::string* msgReturn =
nullptr);
std::shared_ptr< const MSRoute > ConstMSRoutePtr
#define UNUSED_PARAMETER(x)
A single mesoscopic segment (cell)
static const int PARKING_QUEUE
double getLength() const
Returns the length of the segment in meters.
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
A vehicle from the mesoscopic point of view.
double getConservativeSpeed(SUMOTime &earliestArrival) const
Returns the vehicle's estimated speed taking into account delays.
double getLastEntryTimeSeconds() const
Returns the entry time for the current segment.
double getBlockTimeSeconds() const
Returns the time at which the vehicle was blocked on the current segment.
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
bool hasInfluencer() const
whether the vehicle is individually influenced (via TraCI or special parameters)
double getAverageSpeed() const
Returns the vehicle's estimated average speed on the segment assuming no further delays.
SUMOTime getLastActionTime() const
Returns the time of the vehicle's last action point.
double getAngle() const
Returns the vehicle's direction in degrees.
double getBackPositionOnLane(const MSLane *lane) const
Get the vehicle's position relative to the given lane.
bool replaceRoute(ConstMSRoutePtr route, const std::string &info, bool onInit=false, int offset=0, bool addRouteStops=true, bool removeStops=true, std::string *msgReturn=nullptr)
Replaces the current route by the given one.
SUMOTime myEventTime
The (planned) time of leaving the segment (cell)
const MSLane * getBackLane() const
Returns the lane the where the rear of the object is currently at.
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
void updateDetectorForWriting(MSMoveReminder *rem, SUMOTime currentTime, SUMOTime exitTime)
Updates a single vehicle detector if present.
BaseInfluencer & getBaseInfluencer()
Returns the velocity/lane influencer.
double getCurrentStoppingTimeSeconds() const
Returns the delay that is accrued due to option –meso-tls-penalty or –meso-minor-penalty.
double getBrakeGap(bool delayed=false) const
get distance for coming to a stop (used for rerouting checks)
bool mayProceed()
Returns whether the vehicle is allowed to pass the next junction, checks also for triggered stops.
double estimateLeaveSpeed(const MSLink *link) const
Returns the vehicle's estimated speed after driving across the link.
void processStop()
ends the current stop and performs loading/unloading
SUMOTime getWaitingTime(const bool accumulated=false) const
Returns the duration for which the vehicle was blocked.
bool hasArrived() const
Returns whether this vehicle has already arrived (reached the arrivalPosition on its final edge)
bool moveRoutePointer()
Update when the vehicle enters a new edge in the move step.
int myQueIndex
Index of the que the vehicle is in (important for multiqueue extension)
SUMOTime checkStop(SUMOTime time)
Returns until when to stop at the current segment and sets the information that the stop has been rea...
void updateDetectors(SUMOTime currentTime, const bool isLeave, const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_JUNCTION)
Updates all vehicle detectors.
virtual bool isIdling() const
Returns whether the vehicle is trying to re-enter the net.
SUMOTime getLastEntryTime() const
Returns the time the vehicle entered the current segment.
double getPositionOnLane() const
Get the vehicle's position along the lane.
SUMOTime myLastEntryTime
The time the vehicle entered its current segment.
void setEventTime(SUMOTime t, bool hasDelay=true)
Sets the (planned) time at which the vehicle leaves its current segment.
BaseInfluencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
void setApproaching(MSLink *link)
registers vehicle with the given link
void saveState(OutputDevice &out)
Saves the states of a vehicle.
SUMOTime getTimeLoss() const
MESegment * getSegment() const
Returns the current segment the vehicle is on.
void setLastEntryTime(SUMOTime t)
Sets the entry time for the current segment.
MESegment * mySegment
The segment the vehicle is at.
int getQueIndex() const
Returns the index of the que the vehicle is in.
int getSegmentIndex() const
const MSLane * getLane() const
Returns the lane the vehicle is on.
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
virtual void setSegment(MESegment *s, int idx=0)
Sets the current segment the vehicle is at together with its que.
SUMOTime remainingStopDuration() const
Returns the remaining stop duration for a stopped vehicle or 0.
double getCurrentLinkPenaltySeconds() const
Returns the delay that is accrued due to option –meso-tls-penalty or –meso-minor-penalty.
SUMOTime getEventTime() const
Returns the (planned) time at which the vehicle leaves its current segment.
void setBlockTime(const SUMOTime t)
Sets the time at which the vehicle was blocked.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
bool resumeFromStopping()
double getSpeed() const
Returns the vehicle's estimated speed assuming no delays.
PositionVector getBoundingBox(double offset=0) const
get bounding rectangle
double getSlope() const
Returns the slope of the road at vehicle's position in degrees.
double getEventTimeSeconds() const
Returns the earliest leave time for the current segment.
SUMOTime myBlockTime
The time at which the vehicle was blocked on its current segment.
double getRightSideOnEdge(const MSLane *) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0)
SUMOTime getBlockTime() const
Returns the time at which the vehicle was blocked.
The base class for microscopic and mesoscopic vehicles.
Representation of a lane in the micro simulation.
Something on a lane to be noticed about vehicle movement.
Notification
Definition of a vehicle state.
@ NOTIFICATION_JUNCTION
The vehicle arrived at a junction.
The car-following model and parameter.
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.
Encapsulated SAX-Attributes.
Structure representing possible vehicle parameter.