48 #define INVALID_SPEED 299792458 + 1 // nothing can go faster than the speed of light! Refs. #2577 189 void passTime(
SUMOTime dt,
bool waiting);
198 return myWaitingIntervals;
211 void appendWaitingTime(
SUMOTime dt);
276 bool replaceRoute(
const MSRoute* route,
const std::string& info,
bool onInit =
false,
int offset = 0,
bool addStops =
true,
bool removeStops =
true);
702 void setAngle(
double angle,
bool straightenFurther =
false);
962 std::string getDescription()
const;
1087 std::pair<const MSVehicle* const, double>
getLeader(
double dist = 0)
const;
1297 const bool parking,
const bool triggered,
const bool containerTriggered, std::string& errorMsg);
1311 const bool triggered,
const bool containerTriggered,
const SumoXMLTag stoppingPlaceType, std::string& errorMsg);
1334 std::vector<double>& furtherLanesPosLat,
1335 const std::vector<MSLane*>& passedLanes);
1360 void activate(
double tauOriginal,
double tauTarget,
double additionalGap,
double duration,
double changeRate,
double maxDecel);
1402 void setSpeedTimeLine(
const std::vector<std::pair<SUMOTime, double> >& speedTimeLine);
1406 void activateGapController(
double originalTau,
double newTimeHeadway,
double newSpaceHeadway,
double duration,
double changeRate,
double maxDecel);
1410 void deactivateGapController();
1415 void setLaneTimeLine(
const std::vector<std::pair<SUMOTime, int> >& laneTimeLine);
1420 void setSublaneChange(
double latDist);
1423 int getSpeedMode()
const;
1426 int getLaneChangeMode()
const;
1430 return myRoutingMode;
1432 SUMOTime getLaneTimeLineDuration();
1447 double influenceSpeed(
SUMOTime currentTime,
double speed,
double vSafe,
double vMin,
double vMax);
1461 double gapControlSpeed(
SUMOTime currentTime,
const SUMOVehicle* veh,
double speed,
double vSafe,
double vMin,
double vMax);
1478 double changeRequestRemainingSeconds(
const SUMOTime currentTime)
const;
1484 return myRespectJunctionPriority;
1492 return myEmergencyBrakeRedLight;
1498 return myConsiderSafeVelocity;
1504 void setSpeedMode(
int speedMode);
1509 void setLaneChangeMode(
int value);
1515 myRoutingMode = value;
1521 double getOriginalSpeed()
const;
1526 return myLastRemoteAccess;
1529 void postProcessRemoteControl(
MSVehicle* v);
1532 double implicitSpeedRemote(
const MSVehicle* veh,
double oldSpeed);
1535 double implicitDeltaPosRemote(
const MSVehicle* veh);
1539 bool isRemoteAffected(
SUMOTime t)
const;
1542 myTraCISignals = signals;
1546 return myTraCISignals;
1558 return myTraciLaneChangePriority ==
LCP_ALWAYS;
1655 const double seen,
const MSLane*
const lane,
double distToCrossing)
const;
1718 void processLaneAdvances(std::vector<MSLane*>& passedLanes,
bool& moved, std::string& emergencyReason);
1887 SUMOTime arrivalTime,
double arrivalSpeed,
1888 SUMOTime arrivalTimeBraking,
double arrivalSpeedBraking,
1890 double leaveSpeed = -1.) :
1891 myLink(link), myVLinkPass(vPass), myVLinkWait(vWait), mySetRequest(setRequest),
1892 myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed),
1893 myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking),
1894 myDistance(distance),
1895 accelV(leaveSpeed), hadStoppedVehicle(false), availableSpace(0) {
1903 myLink(0), myVLinkPass(vWait), myVLinkWait(vWait), mySetRequest(false),
1904 myArrivalTime(0), myArrivalSpeed(0),
1905 myArrivalTimeBraking(0), myArrivalSpeedBraking(0),
1906 myDistance(distance),
1907 accelV(-1), hadStoppedVehicle(false), availableSpace(_availableSpace) {
1916 accelV =
MIN2(accelV, v);
1920 return accelV < 0 ? myVLinkPass : accelV;
1972 void adaptToLeader(
const std::pair<const MSVehicle*, double> leaderInfo,
1974 const MSLane*
const lane,
double& v,
double& vLinkPass,
1975 double distToCrossing = -1)
const;
1989 const MSLane*
const lane,
double& v,
double& vLinkPass)
const;
1993 DriveProcessItem*
const lastLink,
double& v,
double& vLinkPass,
double& vLinkWait,
bool& setRequest,
1994 bool isShadowLink =
false)
const;
1998 DriveProcessItem*
const lastLink,
double& v,
double& vLinkPass,
double& vLinkWait,
bool& setRequest)
const;
double myPos
the stored position
int getRoutePosition() const
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
void adaptToLeader(const std::pair< const MSVehicle *, double > leaderInfo, const double seen, DriveProcessItem *const lastLink, const MSLane *const lane, double &v, double &vLinkPass, double distToCrossing=-1) const
double myLatDist
The requested lateral change.
A lane area vehicles can halt at.
SUMOTime myJunctionConflictEntryTime
void adaptToLeaders(const MSLeaderInfo &ahead, double latOffset, const double seen, DriveProcessItem *const lastLink, const MSLane *const lane, double &v, double &vLinkPass) const
const MSLane * myLastBestLanesInternalLane
Drive process items represent bounds on the safe velocity corresponding to the upcoming links...
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
double computeAngle() const
compute the current vehicle angle
DriveItemVector myLFLinkLanesPrev
planned speeds from the previous step for un-registering from junctions after the new container is fi...
double getFuelConsumption() const
Returns fuel consumption of the current state.
double getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs...
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
SumoXMLTag
Numbers representing SUMO-XML - element names.
double getNOxEmissions() const
Returns NOx emission of the current state.
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
bool ignoreRed(const MSLink *link, bool canBrake) const
decide whether a red (or yellow light) may be ignore
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
double myAngle
the angle in radians (
double maxDecel
Maximal deceleration to be applied due to the adapted headway.
Representation of a vehicle in the micro simulation.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
double getElectricityConsumption() const
Returns electricity consumption of the current state.
double getPreviousSpeed() const
Returns the vehicle's speed before the previous time step.
double backPos() const
back Position of this state
double getAngle() const
Returns the vehicle's direction in radians.
MSEdgeWeightsStorage * myEdgeWeights
PositionVector getBoundingPoly() const
get bounding polygon
static int nextLinkPriority(const std::vector< MSLane *> &conts)
get a numerical value for the priority of the upcoming link
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
const MSEdge * myLastBestLanesEdge
LaneChangeMode
modes for resolving conflicts between external control (traci) and vehicle control over lane changing...
void enterLaneAtInsertion(MSLane *enteredLane, double pos, double speed, double posLat, MSMoveReminder::Notification notification)
Update when the vehicle enters a new lane in the emit step.
MSAbstractLaneChangeModel * myLaneChangeModel
bool myAmOnNet
Whether the vehicle is on the network (not parking, teleported, vaporized, or arrived) ...
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
LaneChangeMode myRightDriveLC
changing to the rightmost lane
std::vector< std::vector< LaneQ > > myBestLanes
std::vector< MSLane * > myFurtherLanes
The information into which lanes the vehicle laps into.
Position getVelocityVector() const
Returns the vehicle's direction in radians.
State myState
This Vehicles driving state (pos and speed)
double myOriginalSpeed
The velocity before influence.
A lane area vehicles can halt at.
bool replaceParkingArea(MSParkingArea *parkingArea, std::string &errorMsg)
replace the current parking area stop with a new stop with merge duration
DriveItemVector myLFLinkLanes
container for the planned speeds in the current step
bool resumeFromStopping()
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition) ...
MSLane * getLane() const
Returns the lane the vehicle is on.
int bestLaneOffset
The (signed) number of lanes to be crossed to get to the lane which allows to continue the drive...
double myTimeLoss
the time loss in seconds due to driving with less than maximum speed
void setBlinkerInformation()
sets the blue flashing light for emergency vehicles
SUMOTime myLastActionTime
Action offset (actions are taken at time myActionOffset + N*getActionStepLength()) Initialized to 0...
void addContainer(MSTransportable *container)
Adds a container.
SUMOTime getMemorySize() const
SUMOTime remainingStopDuration() const
Returns the remaining stop duration for a stopped vehicle or 0.
SUMOTime myJunctionEntryTimeNeverYield
std::pair< const MSVehicle *const, double > getLeader(double dist=0) const
Returns the leader of the vehicle looking for a fixed distance.
const SUMOVehicleParameter::Stop pars
The stop parameter.
int myRoutingMode
routing mode (see TraCIConstants.h)
SUMOTime duration
The stopping duration.
The front lights are on (no visualisation)
Signalling
Some boolean values which describe the state of some vehicle parts.
void updateTimeLoss(double vNext)
Updates the vehicle's time loss.
bool onFurtherEdge(const MSEdge *edge) const
whether this vehicle has its back (and no its front) on the given edge
std::list< Stop > getMyStops()
The base class for an intersection.
void planMove(const SUMOTime t, const MSLeaderInfo &ahead, const double lengthsInFront)
Compute safe velocities for the upcoming lanes based on positions and speeds from the last time step...
The car-following model abstraction.
MSParkingArea * parkingarea
(Optional) parkingArea if one is assigned to the stop
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
double getPositionOnLane() const
Get the vehicle's position along the lane.
bool triggered
whether an arriving person lets the vehicle continue
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
double myPosLat
the stored lateral position
int getBestLaneOffset() const
bool canReverse() const
whether the vehicle is a train that can reverse its direction at the current point in its route ...
bool reached
Information whether the stop has been reached.
The high beam lights are on (no visualisation)
Notification
Definition of a vehicle state.
Changes the wished vehicle speed / lanes.
double lateralDistanceToLane(const int offset) const
Get the minimal lateral distance required to move fully onto the lane at given offset.
bool addTraciStopAtStoppingPlace(const std::string &stopId, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, const SumoXMLTag stoppingPlaceType, std::string &errorMsg)
bool myRespectJunctionPriority
Whether the junction priority rules are respected.
bool gapAttained
Whether the desired gap was attained during the current activity phase (induces the remaining duratio...
double getLeaveSpeed() const
State & operator=(const State &state)
Assignment operator.
The backwards driving lights are on (no visualisation)
vehicle doesn't want to change
void createDriverState()
Create a DriverState for the vehicle.
TraciLaneChangePriority
modes for prioritizing traci lane change requests
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, double &myStopDist, std::pair< double, LinkDirection > &myNextTurn) const
SUMOTime getLastActionTime() const
Returns the time of the vehicle's last action point.
double tauCurrent
Current, interpolated value for the desired time headway.
PositionVector getBoundingBox() const
get bounding rectangle
bool isStoppedOnLane() const
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
bool addStop(const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0, bool collision=false, MSRouteIterator *searchStart=0)
Adds a stop.
bool checkActionStep(const SUMOTime t)
Returns whether the vehicle is supposed to take action in the current simulation step Updates myActio...
double getRightSideOnLane() const
Get the vehicle's lateral position on the lane:
void adaptBestLanesOccupation(int laneIndex, double density)
update occupation from MSLaneChanger
WaitingTimeCollector myWaitingTimeCollector
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
double getSafeFollowSpeed(const std::pair< const MSVehicle *, double > leaderInfo, const double seen, const MSLane *const lane, double distToCrossing) const
compute safe speed for following the given leader
std::vector< const MSEdge * > ConstMSEdgeVector
SUMOTime myMemorySize
the maximal memory to store
Container for state and parameters of the gap control.
int getSignals() const
Returns the signals.
double lastCoveredDist() const
previous Speed of this state
The base class for microscopic and mesoscopic vehicles.
bool myHaveToWaitOnNextLink
A storage for edge travel times and efforts.
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
double addGapCurrent
Current, interpolated value for the desired space headway.
double nextOccupation
As occupation, but without the first lane.
double length
The overall length which may be driven when using this lane without a lane change.
bool rerouteParkingArea(const std::string &parkingAreaID, std::string &errorMsg)
bool wasRemoteControlled(SUMOTime lookBack=DELTA_T) const
Returns the information whether the vehicle is fully controlled via TraCI within the lookBack time...
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge) ...
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
double tauOriginal
Original value for the desired headway (will be reset after duration has expired) ...
Position getPositionAlongBestLanes(double offset) const
Return the (x,y)-position, which the vehicle would reach if it continued along its best continuation ...
double getBrakeGap() const
get distance for coming to a stop (used for rerouting checks)
The car-following model and parameter.
void checkLinkLeader(const MSLink *link, const MSLane *lane, double seen, DriveProcessItem *const lastLink, double &v, double &vLinkPass, double &vLinkWait, bool &setRequest, bool isShadowLink=false) const
checks for link leaders on the given link
bool containerTriggered
whether an arriving container lets the vehicle continue
MSAbstractLaneChangeModel & getLaneChangeModel()
bool isStoppedInRange(double pos) const
return whether the given position is within range of the current stop
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
Performs lane changing of vehicles.
bool isFrontOnLane(const MSLane *lane) const
Returns the information whether the front of the vehicle is on the given lane.
double getBackPositionOnLane() const
Get the vehicle's position relative to its current lane.
bool isLeader(const MSLink *link, const MSVehicle *veh) const
whether the given vehicle must be followed at the given junction
Right blinker lights are switched on.
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation...
const ConstMSEdgeVector getStopEdges() const
Returns the list of still pending stop edges.
bool replaceRoute(const MSRoute *route, const std::string &info, bool onInit=false, int offset=0, bool addStops=true, bool removeStops=true)
Replaces the current route by the given one.
double myArrivalSpeedBraking
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
bool willStop() const
Returns whether the vehicle will stop on the current edge.
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
std::vector< double > myFurtherLanesPosLat
lateral positions on further lanes
bool signalSet(int which) const
Returns whether the given signal is on.
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
bool operator!=(const State &state)
Operator !=.
Performs lane changing of vehicles.
double getDistanceToPosition(double destPos, const MSEdge *destEdge) const
A road/street connecting two junctions.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
void leaveLane(const MSMoveReminder::Notification reason, const MSLane *approachedLane=0)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
double getLatOffset(const MSLane *lane) const
Get the offset that that must be added to interpret myState.myPosLat for the given lane...
bool hasDriverState() const
Whether this vehicle is equipped with a MSDriverState.
MSLane * lane
The described lane.
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
double getCO2Emissions() const
Returns CO2 emission of the current state.
SUMOTime getAccumulatedWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
Left blinker lights are switched on.
double getActionStepLengthSecs() const
Returns the vehicle's action step length in secs, i.e. the interval between two action points...
void setAngle(double angle, bool straightenFurther=false)
Set a custom vehicle angle in rad, optionally updates furtherLanePosLat.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
Position validatePosition(Position result, double offset=0) const
ensure that a vehicle-relative position is not invalid
vehicle want's to change to right lane
void updateState(double vNext)
updates the vehicles state, given a next value for its speed. This value can be negative in case of t...
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it's primary lane ...
double updateFurtherLanes(std::vector< MSLane *> &furtherLanes, std::vector< double > &furtherLanesPosLat, const std::vector< MSLane *> &passedLanes)
update a vector of further lanes and return the new backPos
SUMOTime lastUpdate
Time of the last update of the gap control.
Representation of a vehicle.
SUMOTime myLastRemoteAccess
Stores the waiting intervals over the previous seconds (memory is to be specified in ms...
Encapsulated SAX-Attributes.
SUMOTime myCollisionImmunity
amount of time for which the vehicle is immune from collisions
void adaptLeaveSpeed(const double v)
ChangeRequest
Requests set via TraCI.
A point in 2D or 3D with translation and scaling methods.
SUMOTime getActionStepLength() const
Returns the vehicle's action step length in millisecs, i.e. the interval between two action points...
MSRouteIterator edge
The edge in the route to stop at.
double posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
double getTimeLossSeconds() const
Returns the time loss in seconds.
void updateBestLanes(bool forceRebuild=false, const MSLane *startLane=0)
computes the best lanes to use in order to continue the route
int getRoutingMode() const
return the current routing mode
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
Position myCachedPosition
bool active
Whether the gap control is active.
double getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
double getCenterOnEdge(const MSLane *lane=0) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0) ...
double currentLength
The length which may be driven on this lane.
const std::pair< double, LinkDirection > & getNextTurn()
Get the distance and direction of the next upcoming turn for the vehicle (within its look-ahead range...
std::shared_ptr< GapControlState > myGapControlState
The gap control state.
const std::vector< MSLane * > & getFurtherLanes() const
std::list< Stop > myStops
The vehicle's list of stops.
ConstMSEdgeVector::const_iterator MSRouteIterator
bool collision
Whether this stop was triggered by a collision.
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
MSLane * myLane
The lane the vehicle is on.
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition) ...
Blinker lights on both sides are switched on.
bool hasStops() const
Returns whether the vehicle has to stop somewhere.
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
void resetRoutePosition(int index)
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
double getDeltaPos(double accel)
calculates the distance covered in the next integration step given an acceleration and assuming the c...
bool keepClear(const MSLink *link) const
decide whether the given link must be kept clear
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
bool considerSafeVelocity() const
Returns whether safe velocities shall be considered.
void resetActionOffset(const SUMOTime timeUntilNextAction=0)
Resets the action offset for the vehicle.
double timeHeadwayIncrement
cache storage for the headway increments of the current operation
SUMOTime getActionStepLength() const
Returns this type's default action step length.
A blue emergency light is on.
A structure representing the best lanes for continuing the current route starting at 'lane'...
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)
Loads the state of this vehicle from the given description.
Everything is switched off.
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
double myStopDist
distance to the next stop or -1 if there is none
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
bool hasInfluencer() const
SUMOTime collisionStopTime() const
Returns the remaining time a vehicle needs to stop due to a collision. A negative value indicates tha...
Something on a lane to be noticed about vehicle movement.
double basePos(const MSEdge *edge) const
departure position where the vehicle fits fully onto the edge (if possible)
double myAcceleration
The current acceleration after dawdling in m/s.
void fixPosition()
repair errors in vehicle position after changing between internal edges
bool myActionStep
The flag myActionStep indicates whether the current time step is an action point for the vehicle...
double myPreviousSpeed
the speed at the begin of the previous time step
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
One of the left doors is opened.
double changeRate
Rate by which the current time and space headways are changed towards the target value. (A rate of one corresponds to reaching the target value within one second)
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
const MSLane * lane
The lane to stop at.
double getLength() const
Returns the length of this link.
void setApproachingForAllLinks(const SUMOTime t)
Register junction approaches for all link items in the current plan.
bool allowsContinuation
Whether this lane allows to continue the drive.
const waitingIntervalList & getWaitingIntervals() const
Container that holds the vehicles driving state (position+speed).
void saveState(OutputDevice &out)
Saves the states of a vehicle.
DriveProcessItem(MSLink *link, double vPass, double vWait, bool setRequest, SUMOTime arrivalTime, double arrivalSpeed, SUMOTime arrivalTimeBraking, double arrivalSpeedBraking, double distance, double leaveSpeed=-1.)
void processLaneAdvances(std::vector< MSLane *> &passedLanes, bool &moved, std::string &emergencyReason)
This method checks if the vehicle has advanced over one or several lanes along its route and triggers...
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
void setRoutingMode(int value)
Sets routing behavior.
void setBrakingSignals(double vNext)
sets the braking lights on/off
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
double getCOEmissions() const
Returns CO emission of the current state.
void removePassedDriveItems()
Erase passed drive items from myLFLinkLanes (and unregister approaching information for corresponding...
virtual void drawOutsideNetwork(bool)
register vehicle for drawing while outside the network
int numExpectedContainer
The number of still expected containers.
const std::vector< double > & getFurtherLanesPosLat() const
Abstract in-vehicle / in-person device.
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
double remainingDuration
Remaining duration for keeping the target headway.
bool addTraciStop(MSLane *const lane, const double startPos, const double endPos, const SUMOTime duration, const SUMOTime until, const bool parking, const bool triggered, const bool containerTriggered, std::string &errorMsg)
vehicle want's to change to left lane
int numExpectedPerson
The number of still expected persons.
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Structure representing possible vehicle parameter.
DriveItemVector::iterator myNextDriveItem
iterator pointing to the next item in myLFLinkLanes
LaneChangeMode mySublaneLC
changing to the prefered lateral alignment
double occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
std::pair< double, LinkDirection > myNextTurn
the upcoming turn for the vehicle
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
void removeApproachingInformation(DriveItemVector &lfLinks) const
unregister approach from all upcoming links
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
void setTentativeLaneAndPosition(MSLane *lane, double pos, double posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
bool isActive() const
Returns whether the current simulation step is an action point for the vehicle.
void processLinkAproaches(double &vSafe, double &vSafeMin, double &vSafeMinDist)
This method iterates through the driveprocess items for the vehicle and adapts the given in/out param...
std::vector< std::pair< SUMOTime, double > > mySpeedTimeLine
The velocity time line to apply.
MSVehicleType * myType
This vehicle's type.
void workOnMoveReminders(double oldPos, double newPos, double newSpeed)
Processes active move reminder.
void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector &lfLinks) const
runs heuristic for keeping the intersection clear in case of downstream jamming
int mySignals
State of things of the vehicle that can be on or off.
double addGapTarget
Target value for the desired space headway.
ConstMSEdgeVector myRemoteRoute
std::vector< MSLane * > bestContinuations
MSStoppingPlace * chargingStation
(Optional) charging station if one is assigned to the stop
std::shared_ptr< MSSimpleDriverState > myDriverState
This vehicle's driver state.
Definition of vehicle stop (position and duration)
void setRemoteState(Position xyPos)
sets position outside the road network
void checkLinkLeaderCurrentAndParallel(const MSLink *link, const MSLane *lane, double seen, DriveProcessItem *const lastLink, double &v, double &vLinkPass, double &vLinkWait, bool &setRequest) const
checks for link leaders of the current link as well as the parallel link (if there is one) ...
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
double getPMxEmissions() const
Returns PMx emission of the current state.
friend class MSVehicle
vehicle sets states directly
double getActionStepLengthSecs() const
Returns this type's default action step length in seconds.
double tauTarget
Target value for the desired time headway.
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
void activateReminders(const MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
"Activates" all current move reminder
void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength)
Process an updated action step length value (only affects the vehicle's action offset, The actionStepLength is stored in the (singular) vtype)
DriveProcessItem(double vWait, double distance, double _availableSpace=0)
constructor if the link shall not be passed
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
Stop(const SUMOVehicleParameter::Stop &par)
const MSLane * getBackLane() const
double processTraCISpeedControl(double vSafe, double vNext)
Check for speed advices from the traci client and adjust the speed vNext in the current (euler) / aft...
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
waitingIntervalList myWaitingIntervals
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during planMove() and executeMove.
void updateWaitingTime(double vNext)
Updates the vehicle's waiting time counters (accumulated and consecutive)
void setSignals(int signals)
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle's internal edge travel times/efforts container.
double estimateSpeedAfterDistance(const double dist, const double v, const double accel) const
vehicle want's to keep the current lane
double getLastStepDist() const
Get the distance the vehicle covered in the previous timestep.
Static storage of an output device and its base (abstract) implementation.
double speed() const
Speed of this state.
void switchOffSignal(int signal)
Switches the given signal off.
static bool gSemiImplicitEulerUpdate
void switchOnSignal(int signal)
Switches the given signal on.
double getSlope() const
Returns the slope of the road at vehicle's position.
bool passingMinor() const
decide whether the vehicle is passing a minor link or has comitted to do so
void addPerson(MSTransportable *person)
Adds a passenger.
static std::vector< MSLane * > myEmptyLaneVector
std::shared_ptr< MSSimpleDriverState > getDriverState() const
Returns the vehicle driver's state.
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
bool isActionStep(SUMOTime t) const
Returns whether the next simulation step will be an action point for the vehicle. ...
bool unsafeLinkAhead(const MSLane *lane) const
whether the vehicle may safely move to the given lane with regard to upcoming links ...
MSEdgeWeightsStorage & _getWeightsStorage() const
double getHCEmissions() const
Returns HC emission of the current state.
const MSVehicle * prevLeader
The last recognized leader.
virtual ~MSVehicle()
Destructor.
bool isStopped() const
Returns whether the vehicle is at a stop.
bool ignoreOverlap() const
bool willPass(const MSEdge *const edge) const
Returns whether the vehicle wil pass the given edge.
MSParkingArea * getNextParkingArea()
get the current parking area stop
const Position getBackPosition() const
double getRightSideOnEdge(const MSLane *lane=0) const
Get the vehicle's lateral position on the edge of the given lane (or its current edge if lane == 0) ...
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
SUMOTime getTimeLoss() const
Returns the SUMOTime lost (speed was lesser maximum speed)
bool isParking() const
Returns whether the vehicle is parking.
double getSpeed() const
Returns the vehicle's current speed.
State(double pos, double speed, double posLat, double backPos)
Constructor.
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
double estimateLeaveSpeed(const MSLink *const link, const double vLinkPass) const
estimate leaving speed when accelerating across a link
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
double getLatDist() const
SUMOTime getLastAccessTimeStep() const
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Provides an interface to an error whose fluctuation is controlled via the driver's 'awareness'...
A red emergency light is on.
Representation of a lane in the micro simulation.
double myBackPos
the stored back position
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle's entering of a new lane.
SUMOTime myJunctionEntryTime
time at which the current junction was entered
SUMOTime myArrivalTimeBraking
One of the right doors is opened.
Interface for lane-change models.
double mySpeed
the stored speed (should be >=0 at any time)
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
The fog lights are on (no visualisation)
double nextStopDist() const
return the distance to the next stop or doubleMax if there is none.
double getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
Definition of vehicle stop (position and duration)
A yellow emergency light is on.
double pos() const
Position of this state.
void updateDriveItems()
Check whether the drive items (myLFLinkLanes) are up to date, and update them if required.