SUMO - Simulation of Urban MObility
MSVehicle::State Class Reference

Container that holds the vehicles driving state (position+speed). More...

#include <MSVehicle.h>

Collaboration diagram for MSVehicle::State:
Collaboration graph

Public Member Functions

SUMOReal backPos () const
 back Position of this state More...
 
SUMOReal lastCoveredDist () const
 previous Speed of this state More...
 
bool operator!= (const State &state)
 Operator !=. More...
 
State & operator= (const State &state)
 Assignment operator. More...
 
SUMOReal pos () const
 Position of this state. More...
 
SUMOReal posLat () const
 Lateral Position of this state (m relative to the centerline of the lane). More...
 
SUMOReal speed () const
 Speed of this state. More...
 
 State (SUMOReal pos, SUMOReal speed, SUMOReal posLat, SUMOReal backPos)
 Constructor. More...
 
 State (const State &state)
 Copy constructor. More...
 

Private Attributes

SUMOReal myBackPos
 the stored back position More...
 
SUMOReal myLastCoveredDist
 
SUMOReal myPos
 the stored position More...
 
SUMOReal myPosLat
 the stored lateral position More...
 
SUMOReal myPreviousSpeed
 the speed at the begin of the previous time step More...
 
SUMOReal mySpeed
 the stored speed (should be >=0 at any time) More...
 

Friends

class MSLaneChanger
 
class MSLaneChangerSublane
 
class MSVehicle
 vehicle sets states directly More...
 

Detailed Description

Container that holds the vehicles driving state (position+speed).

Definition at line 93 of file MSVehicle.h.

Constructor & Destructor Documentation

MSVehicle::State::State ( SUMOReal  pos,
SUMOReal  speed,
SUMOReal  posLat,
SUMOReal  backPos 
)

Constructor.

Definition at line 150 of file MSVehicle.cpp.

MSVehicle::State::State ( const State &  state)

Copy constructor.

Definition at line 117 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.

Member Function Documentation

SUMOReal MSVehicle::State::backPos ( ) const
inline

back Position of this state

Definition at line 128 of file MSVehicle.h.

References myBackPos.

SUMOReal MSVehicle::State::lastCoveredDist ( ) const
inline

previous Speed of this state

Definition at line 133 of file MSVehicle.h.

References myLastCoveredDist.

Referenced by MSVehicle::getLastStepDist().

bool MSVehicle::State::operator!= ( const State &  state)

Operator !=.

Definition at line 140 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.

MSVehicle::State & MSVehicle::State::operator= ( const State &  state)

Assignment operator.

Definition at line 128 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, and mySpeed.

SUMOReal MSVehicle::State::pos ( ) const
inline

Position of this state.

Definition at line 113 of file MSVehicle.h.

References myPos.

Referenced by MSVehicle::congested(), GUIVehicle::drawAction_drawRailCarriages(), and MSVehicle::processNextStop().

SUMOReal MSVehicle::State::posLat ( ) const
inline

Lateral Position of this state (m relative to the centerline of the lane).

Definition at line 123 of file MSVehicle.h.

References myPosLat.

Referenced by MSVehicle::congested().

Friends And Related Function Documentation

friend class MSLaneChanger
friend

Definition at line 96 of file MSVehicle.h.

friend class MSLaneChangerSublane
friend

Definition at line 97 of file MSVehicle.h.

friend class MSVehicle
friend

vehicle sets states directly

Definition at line 95 of file MSVehicle.h.

Field Documentation

SUMOReal MSVehicle::State::myLastCoveredDist
private

the distance covered in the last timestep NOTE: In case of ballistic positional update, this is not necessarily given by myPos - SPEED2DIST(mySpeed + myPreviousSpeed)/2, because a stop may have occured within the last step.

Definition at line 160 of file MSVehicle.h.

Referenced by MSVehicle::executeMove(), lastCoveredDist(), operator!=(), operator=(), State(), and MSVehicle::updateState().

SUMOReal MSVehicle::State::myPreviousSpeed
private

the speed at the begin of the previous time step

Definition at line 154 of file MSVehicle.h.

Referenced by MSVehicle::getPreviousSpeed(), operator!=(), operator=(), State(), and MSVehicle::updateState().


The documentation for this class was generated from the following files: