53 #define INVALID_SPEED 299792458 + 1 // nothing can go faster than the speed of light! Refs. #2577 193 void passTime(
SUMOTime dt,
bool waiting);
202 return myWaitingIntervals;
215 void appendWaitingTime(
SUMOTime dt);
969 std::pair<const MSVehicle* const, double>
getLeader(
double dist = 0)
const;
1053 const std::vector<MSTransportable*>&
getPersons()
const;
1189 const bool parking,
const bool triggered,
const bool containerTriggered, std::string& errorMsg);
1203 const bool triggered,
const bool containerTriggered,
const SumoXMLTag stoppingPlaceType, std::string& errorMsg);
1220 std::vector<double>& furtherLanesPosLat,
1221 const std::vector<MSLane*>& passedLanes);
1254 void setSpeedTimeLine(
const std::vector<std::pair<SUMOTime, double> >& speedTimeLine);
1260 void setLaneTimeLine(
const std::vector<std::pair<SUMOTime, int> >& laneTimeLine);
1265 void setSublaneChange(
double latDist);
1268 int getSpeedMode()
const;
1271 int getLanechangeMode()
const;
1275 return myRoutingMode;
1289 double influenceSpeed(
SUMOTime currentTime,
double speed,
double vSafe,
double vMin,
double vMax);
1306 double changeRequestRemainingSeconds(
const SUMOTime currentTime)
const;
1312 return myRespectJunctionPriority;
1320 return myEmergencyBrakeRedLight;
1326 void setSpeedMode(
int speedMode);
1331 void setLaneChangeMode(
int value);
1337 myRoutingMode = value;
1343 double getOriginalSpeed()
const;
1348 return myLastVTDAccess;
1354 double implicitSpeedVTD(
const MSVehicle* veh,
double oldSpeed);
1357 double implicitDeltaPosVTD(
const MSVehicle* veh);
1359 bool isVTDControlled()
const;
1361 bool isVTDAffected(
SUMOTime t)
const;
1364 myTraCISignals = signals;
1368 return myTraCISignals;
1463 const double seen,
const MSLane*
const lane,
double distToCrossing)
const;
1617 SUMOTime arrivalTime,
double arrivalSpeed,
1618 SUMOTime arrivalTimeBraking,
double arrivalSpeedBraking,
1620 double leaveSpeed = -1.) :
1621 myLink(link), myVLinkPass(vPass), myVLinkWait(vWait), mySetRequest(setRequest),
1622 myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed),
1623 myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking),
1624 myDistance(distance),
1625 accelV(leaveSpeed), hadVehicle(false), availableSpace(0) {
1633 myLink(0), myVLinkPass(vWait), myVLinkWait(vWait), mySetRequest(false),
1634 myArrivalTime(0), myArrivalSpeed(0),
1635 myArrivalTimeBraking(0), myArrivalSpeedBraking(0),
1636 myDistance(distance),
1637 accelV(-1), hadVehicle(false), availableSpace(_availableSpace) {
1646 accelV =
MIN2(accelV, v);
1650 return accelV < 0 ? myVLinkPass : accelV;
1689 void adaptToLeader(
const std::pair<const MSVehicle*, double> leaderInfo,
1691 const MSLane*
const lane,
double& v,
double& vLinkPass,
1692 double distToCrossing = -1)
const;
1706 const MSLane*
const lane,
double& v,
double& vLinkPass)
const;
1710 DriveProcessItem*
const lastLink,
double& v,
double& vLinkPass,
double& vLinkWait,
bool& setRequest,
1711 bool isShadowLink =
false)
const;
double myPos
the stored position
double myLatDist
The requested lateral change.
A lane area vehicles can halt at.
void setAngle(double angle)
Set a custom vehicle angle in rad.
bool signalSet(int which) const
Returns whether the given signal is on.
const MSLane * myLastBestLanesInternalLane
bool isRemoteControlled() const
Returns the information whether the vehicle is fully controlled via TraCI.
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
static int nextLinkPriority(const std::vector< MSLane * > &conts)
get a numerical value for the priority of the upcoming link
std::list< std::pair< SUMOTime, SUMOTime > > waitingIntervalList
double posLat() const
Lateral Position of this state (m relative to the centerline of the lane).
double myAngle
the angle in radians (
Representation of a vehicle in the micro simulation.
const std::vector< double > & getFurtherLanesPosLat() const
SUMOTime timeToBoardNextPerson
The time at which the vehicle is able to board another person.
MSEdgeWeightsStorage * myEdgeWeights
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) ...
LaneChangeMode myRightDriveLC
changing to the rightmost lane
std::vector< std::vector< LaneQ > > myBestLanes
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
std::vector< MSLane * > myFurtherLanes
The information into which lanes the vehicle laps into.
double getTimeLossSeconds() const
Returns the time loss in seconds.
State myState
This Vehicles driving state (pos and speed)
Position getVelocityVector() const
Returns the vehicle's direction in radians.
void adaptToLeaders(const MSLeaderInfo &ahead, double latOffset, const double seen, DriveProcessItem *const lastLink, const MSLane *const lane, double &v, double &vLinkPass) const
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
bool resumeFromStopping()
bool myAmRegisteredAsWaitingForPerson
Whether this vehicle is registered as waiting for a person (for deadlock-recognition) ...
bool hasInfluencer() const
int bestLaneOffset
The (signed) number of lanes to be crossed to get to the lane which allows to continue the drive...
double getTimeGapOnLane() const
Returns the time gap in seconds to the leader of the vehicle on the same lane.
void setBlinkerInformation()
double getLatOffset(const MSLane *lane) const
Get the offset that that must be added to interpret myState.myPosLat for the given lane...
bool isStoppedOnLane() const
void addContainer(MSTransportable *container)
Adds a container.
bool unsafeLinkAhead(const MSLane *lane) const
whether the vehicle may safely move to the given lane with regard to upcoming links ...
virtual bool isSelected() const
whether this vehicle is selected in the GUI
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
double getLength() const
Returns the length of this link.
int myRoutingMode
routing mode (see TraCIConstants.h)
The front lights are on (no visualisation)
Signalling
Some boolean values which describe the state of some vehicle parts.
The base class for an intersection.
bool hasArrived() const
Returns whether this vehicle has already arived (reached the arrivalPosition on its final edge) ...
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.
bool myConsiderMaxAcceleration
Whether the maximum acceleration shall be regarded.
double myPosLat
the stored lateral position
The high beam lights are on (no visualisation)
Notification
Definition of a vehicle state.
MSDevice_Transportable * myPersonDevice
The passengers this vehicle may have.
Changes the wished vehicle speed / lanes.
double getCO2Emissions() const
Returns CO2 emission of the current state.
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 reached
Information whether the stop has been reached.
const MSLane * getBackLane() const
State & operator=(const State &state)
Assignment operator.
bool replaceRoute(const MSRoute *route, bool onInit=false, int offset=0, bool addStops=true)
Replaces the current route by the given one.
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
The backwards driving lights are on (no visualisation)
vehicle doesn't want to change
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
TraciLaneChangePriority
modes for prioritizing traci lane change requests
double getSpaceTillLastStanding(const MSLane *l, bool &foundStopped) const
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
double getHCEmissions() const
Returns HC emission of the current state.
double getPositionOnLane() const
Get the vehicle's position along the lane.
bool addStop(const SUMOVehicleParameter::Stop &stopPar, std::string &errorMsg, SUMOTime untilOffset=0, bool collision=false, MSRouteIterator *searchStart=0)
Adds a stop.
void adaptBestLanesOccupation(int laneIndex, double density)
update occupation from MSLaneChanger
WaitingTimeCollector myWaitingTimeCollector
void checkRewindLinkLanes(const double lengthsInFront, DriveItemVector &lfLinks) const
Definition of vehicle stop (position and duration)
bool executeMove()
Executes planned vehicle movements with regards to right-of-way.
double getAngle() const
Returns the vehicle's direction in radians.
std::vector< const MSEdge * > ConstMSEdgeVector
SUMOTime myMemorySize
the maximal memory to store
The base class for microscopic and mesoscopic vehicles.
double computeAngle() const
compute the current vehicle angle
bool myHaveToWaitOnNextLink
A storage for edge travel times and efforts.
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 hasStops() const
Returns whether the vehicle has to stop somewhere.
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
bool collision
Whether this stop was triggered by a collision.
The car-following model and parameter.
bool triggered
whether an arriving person lets the vehicle continue
MSAbstractLaneChangeModel & getLaneChangeModel()
MSCFModel::VehicleVariables * myCFVariables
The per vehicle variables of the car following model.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
Performs lane changing of vehicles.
double backPos() const
back Position of this state
Right blinker lights are switched on.
MSChargingStation * chargingStation
(Optional) charging station if one is assigned to the stop
double getSpeedWithoutTraciInfluence() const
Returns the uninfluenced velocity.
double getSlope() const
Returns the slope of the road at vehicle's position.
double myArrivalSpeedBraking
SUMOTime getMemorySize() const
std::vector< std::pair< SUMOTime, int > > myLaneTimeLine
The lane usage time line to apply.
int getContainerNumber() const
Returns the number of containers.
std::vector< double > myFurtherLanesPosLat
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
bool operator!=(const State &state)
Operator !=.
static std::vector< MSTransportable * > myEmptyTransportableVector
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
Performs lane changing of vehicles.
A road/street connecting two junctions.
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 getElectricityConsumption() const
Returns electricity consumption of the current state.
double getLeaveSpeed() const
MSLane * lane
The described lane.
Left blinker lights are switched on.
double getBackPositionOnLane() const
Get the vehicle's position relative to its current lane.
double getLatDist() const
double getDistanceToPosition(double destPos, const MSEdge *destEdge) const
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...
void removeApproachingInformation(DriveItemVector &lfLinks) const
unregister approach from all upcoming links
Position getPositionAlongBestLanes(double offset) const
Return the (x,y)-position, which the vehicle would reach if it continued along its best continuation ...
Representation of a vehicle.
MSStoppingPlace * containerstop
(Optional) container stop if one is assigned to the stop
Stores the waiting intervals over the previous seconds (memory is to be specified in ms...
PositionVector getBoundingBox() const
get bounding rectangle
Encapsulated SAX-Attributes.
SUMOTime myCollisionImmunity
amount of time for which the vehicle is immune from collisions
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
void adaptLeaveSpeed(const double v)
ChangeRequest
Requests set via TraCI.
const std::vector< MSLane * > & getBestLanesContinuation() const
Returns the best sequence of lanes to continue the route starting at myLane.
A point in 2D or 3D with translation and scaling methods.
bool willPass(const MSEdge *const edge) const
Returns whether the vehicle wil pass the given edge.
void updateBestLanes(bool forceRebuild=false, const MSLane *startLane=0)
computes the best lanes to use in order to continue the route
SUMOTime timeToLoadNextContainer
The time at which the vehicle is able to load another container.
Position myCachedPosition
const MSLane * lane
The lane to stop at.
double currentLength
The length which may be driven on this lane.
std::list< Stop > myStops
The vehicle's list of stops.
ConstMSEdgeVector::const_iterator MSRouteIterator
SUMOTime myTimeLoss
the time loss due to writing with less than maximum speed
PositionVector getBoundingPoly() const
get bounding polygon
bool isStopped() const
Returns whether the vehicle is at a stop.
SUMOTime collisionStopTime() const
Returns the remaining time a vehicle needs to stop due to a collision. A negative value indicates tha...
bool myConsiderMaxDeceleration
Whether the maximum deceleration shall be regarded.
MSLane * myLane
The lane the vehicle is on.
bool getRespectJunctionPriority() const
Returns whether junction priority rules shall be respected.
bool myAmRegisteredAsWaitingForContainer
Whether this vehicle is registered as waiting for a container (for deadlock-recognition) ...
Blinker lights on both sides are switched on.
Influencer * myInfluencer
An instance of a velocity/lane influencing instance; built in "getInfluencer".
void resetRoutePosition(int index)
std::vector< LaneQ >::iterator myCurrentLaneInBestLanes
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
double getDeltaPos(double accel)
calculates the distance covered in the next integration step given an acceleration and assuming the c...
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
SUMOTime duration
The stopping duration.
double getPMxEmissions() const
Returns PMx emission of the current state.
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
A blue emergency light is on.
double speed() const
Speed of this state.
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
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) ...
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
bool keepClear(const MSLink *link) const
decide whether the given link must be kept clear
Something on a lane to be noticed about vehicle movement.
int getRoutingMode() const
return the current routing mode
double myAcceleration
The current acceleration after dawdling in m/s.
void fixPosition()
repair errors in vehicle position after changing between internal edges
double getRightSideOnLane() const
Get the vehicle's lateral position on the lane:
double myPreviousSpeed
the speed at the begin of the previous time step
MSParkingArea * parkingarea
(Optional) parkingArea if one is assigned to the stop
SUMOTime myWaitingTime
The time the vehicle waits (is not faster than 0.1m/s) in seconds.
One of the left doors is opened.
LaneChangeMode mySpeedGainLC
lane changing to travel with higher speed
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
bool isParking() const
Returns whether the vehicle is parking.
LaneChangeMode myCooperativeLC
lane changing with the intent to help other vehicles
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
int getRoutePosition() const
bool knowsEdgeTest(MSEdge &edge) const
double nextStopDist() const
return the distance to the next stop or doubleMax if there is none.
int getPersonNumber() const
Returns the number of persons.
bool allowsContinuation
Whether this lane allows to continue the drive.
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
Container that holds the vehicles driving state (position+speed).
double getNOxEmissions() const
Returns NOx emission of the current state.
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.)
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
void planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVector &lfLinks, double &myStopDist) const
void setRoutingMode(int value)
Sets routing behavior.
bool myEmergencyBrakeRedLight
Whether red lights are a reason to brake.
MSEdgeWeightsStorage & _getWeightsStorage() const
ConstMSEdgeVector myVTDRoute
virtual void drawOutsideNetwork(bool)
register vehicle for drawing while outside the network
bool wasRemoteControlled(SUMOTime lookBack=DELTA_T) const
Returns the information whether the vehicle is fully controlled via TraCI within the lookBack time...
Abstract in-vehicle device.
void updateOccupancyAndCurrentBestLane(const MSLane *startLane)
updates LaneQ::nextOccupation and myCurrentLaneInBestLanes
void setEmergencyBlueLight(SUMOTime currentTime)
sets the blue flashing light for emergency vehicles
double getMaxSpeedOnLane() const
Returns the maximal speed for the vehicle on its current lane (including speed factor and deviation...
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)
double getPreviousSpeed() const
Returns the vehicle's speed before the previous time step.
vehicle want's to change to left lane
const std::vector< MSLane * > & getFurtherLanes() const
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Structure representing possible vehicle parameter.
bool getEmergencyBrakeRedLight() const
Returns whether red lights shall be a reason to brake.
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.
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
SUMOTime getAccumulatedWaitingTime(SUMOTime t=MSGlobals::gWaitingTimeMemory) const
Returns the SUMOTime waited (speed was lesser than 0.1m/s) within the last t millisecs.
bool containerTriggered
whether an arriving container lets the vehicle continue
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...
void setVTDState(Position xyPos)
sets position outside the road network
std::vector< std::pair< SUMOTime, double > > mySpeedTimeLine
The velocity time line to apply.
SUMOTime getTimeLoss() const
Returns the SUMOTime lost (speed was lesser maximum speed)
SUMOTime getLastAccessTimeStep() const
MSVehicleType * myType
This vehicle's type.
void workOnMoveReminders(double oldPos, double newPos, double newSpeed)
Processes active move reminder.
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
int mySignals
State of things of the vehicle that can be on or off.
std::vector< MSLane * > bestContinuations
std::pair< const MSVehicle *const, double > getLeader(double dist=0) const
Returns the leader of the vehicle looking for a fixed distance.
Definition of vehicle stop (position and duration)
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
bool isStoppedInRange(double pos) const
return whether the given position is within range of the current stop
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
SUMOTime until
The time at which the vehicle may continue its journey.
double estimateSpeedAfterDistance(const double dist, const double v, const double accel) const
double lastCoveredDist() const
previous Speed of this state
const ConstMSEdgeVector getStopEdges() const
Returns the list of still pending stop edges.
friend class MSVehicle
vehicle sets states directly
MSRouteIterator edge
The edge in the route to stop at.
const waitingIntervalList & getWaitingIntervals() const
void activateReminders(const MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
"Activates" all current move reminder
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
DriveProcessItem(double vWait, double distance, double _availableSpace=0)
constructor if the link shall not be passed
bool isFrontOnLane(const MSLane *lane) const
Returns the information whether the front of the vehicle is on the given lane.
double getAccumulatedWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s) within the last millisecs...
bool isStoppedTriggered() const
Returns whether the vehicle is on a triggered stop.
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
waitingIntervalList myWaitingIntervals
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
std::vector< DriveProcessItem > DriveItemVector
Container for used Links/visited Lanes during lookForward.
void setSignals(int signals)
double getLastStepDist() const
Get the distance the vehicle covered in the previous timestep.
double pos() const
Position of this state.
const MSEdge * getRerouteOrigin() const
Returns the starting point for reroutes (usually the current edge)
vehicle want's to keep the current lane
int getSignals() const
Returns the signals.
Static storage of an output device and its base (abstract) implementation.
void switchOffSignal(int signal)
Switches the given signal off.
static bool gSemiImplicitEulerUpdate
void switchOnSignal(int signal)
Switches the given signal on.
double getFuelConsumption() const
Returns fuel consumption of the current state.
void addPerson(MSTransportable *person)
Adds a passenger.
double getCOEmissions() const
Returns CO emission of the current state.
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) ...
static std::vector< MSLane * > myEmptyLaneVector
double estimateLeaveSpeed(const MSLink *const link, const double vLinkPass) const
estimate leaving speed when accelerating across a link
static bool overlap(const MSVehicle *veh1, const MSVehicle *veh2)
SUMOTime cumulatedWaitingTime(SUMOTime memory=-1) const
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it's primary lane ...
virtual ~MSVehicle()
Destructor.
MSParkingArea * getNextParkingArea()
get the current parking area stop
double getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
double endPos
The stopping position end.
State(double pos, double speed, double posLat, double backPos)
Constructor.
bool mySpeedAdaptationStarted
Whether influencing the speed has already started.
Position validatePosition(Position result, double offset=0) const
ensure that a vehicle-relative position is not invalid
MSLane * getLane() const
Returns the lane the vehicle is on.
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
A red emergency light is on.
MSStoppingPlace * busstop
(Optional) bus stop if one is assigned to the stop
Representation of a lane in the micro simulation.
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle's internal edge travel times/efforts container.
double myBackPos
the stored back position
bool onFurtherEdge(const MSEdge *edge) const
whether this vehicle has its back (and no its front) on the given edge
void adaptLaneEntering2MoveReminder(const MSLane &enteredLane)
Adapts the vehicle's entering of a new lane.
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)
int getBestLaneOffset() const
bool myConsiderSafeVelocity
Whether the safe velocity shall be regarded.
void removeTransportable(MSTransportable *t)
removes a person or container
MSDevice_Transportable * myContainerDevice
The containers this vehicle may have.
The fog lights are on (no visualisation)
double startPos
The stopping position start.
bool parking
whether the vehicle is removed from the net while stopping
A yellow emergency light is on.
double getSpeed() const
Returns the vehicle's current speed.
const Position getBackPosition() const
bool ignoreRed(const MSLink *link, bool canBrake) const
decide whether a red (or yellow light) may be ignore