Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSVehicle::State Class Reference

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

#include <MSVehicle.h>

Public Member Functions

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

Private Attributes

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

Friends

class MSLaneChanger
class MSLaneChangerSublane
class MSVehicle
 vehicle sets states directly

Detailed Description

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

Definition at line 87 of file MSVehicle.h.

Constructor & Destructor Documentation

◆ State() [1/2]

MSVehicle::State::State ( double pos,
double speed,
double posLat,
double backPos,
double previousSpeed )

Constructor.

Definition at line 174 of file MSVehicle.cpp.

References backPos(), myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, mySpeed, pos(), posLat(), speed(), and SPEED2DIST.

Referenced by MSLaneChangerSublane, operator!=(), operator=(), and State().

Here is the caller graph for this function:

◆ State() [2/2]

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

Copy constructor.

Definition at line 141 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, mySpeed, and State().

Member Function Documentation

◆ backPos()

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

back Position of this state

Definition at line 122 of file MSVehicle.h.

References myBackPos.

Referenced by MSLaneChangerSublane, and State().

Here is the caller graph for this function:

◆ lastCoveredDist()

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

previous Speed of this state

Definition at line 127 of file MSVehicle.h.

References myLastCoveredDist.

◆ operator!=()

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

Operator !=.

Definition at line 164 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, mySpeed, and State().

◆ operator=()

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

Assignment operator.

Definition at line 152 of file MSVehicle.cpp.

References myBackPos, myLastCoveredDist, myPos, myPosLat, myPreviousSpeed, mySpeed, and State().

◆ pos()

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

Position of this state.

Definition at line 107 of file MSVehicle.h.

References myPos.

Referenced by MSLaneChangerSublane, and State().

Here is the caller graph for this function:

◆ posLat()

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

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

Definition at line 117 of file MSVehicle.h.

References myPosLat.

Referenced by MSLaneChangerSublane, and State().

Here is the caller graph for this function:

◆ speed()

double MSVehicle::State::speed ( ) const
inline

Speed of this state.

Definition at line 112 of file MSVehicle.h.

References mySpeed.

Referenced by MSLaneChangerSublane, and State().

Here is the caller graph for this function:

◆ MSLaneChanger

friend class MSLaneChanger
friend

Definition at line 90 of file MSVehicle.h.

References MSLaneChanger.

Referenced by MSLaneChanger.

◆ MSLaneChangerSublane

friend class MSLaneChangerSublane
friend

Definition at line 91 of file MSVehicle.h.

References backPos(), MSLaneChangerSublane, pos(), posLat(), speed(), and State().

Referenced by MSLaneChangerSublane.

◆ MSVehicle

friend class MSVehicle
friend

vehicle sets states directly

Definition at line 89 of file MSVehicle.h.

References MSVehicle.

Referenced by MSVehicle.

Field Documentation

◆ myBackPos

double MSVehicle::State::myBackPos
private

the stored back position

Definition at line 145 of file MSVehicle.h.

Referenced by backPos(), operator!=(), operator=(), MSVehicle::Influencer::postProcessRemoteControl(), State(), and State().

◆ myLastCoveredDist

double 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 occurred within the last step.

Definition at line 154 of file MSVehicle.h.

Referenced by lastCoveredDist(), operator!=(), operator=(), State(), and State().

◆ myPos

double MSVehicle::State::myPos
private

◆ myPosLat

◆ myPreviousSpeed

double MSVehicle::State::myPreviousSpeed
private

the speed at the begin of the previous time step

Definition at line 148 of file MSVehicle.h.

Referenced by operator!=(), operator=(), MSVehicle::Influencer::postProcessRemoteControl(), State(), and State().

◆ mySpeed

double MSVehicle::State::mySpeed
private

the stored speed (should be >=0 at any time)

Definition at line 137 of file MSVehicle.h.

Referenced by operator!=(), operator=(), MSVehicle::Influencer::postProcessRemoteControl(), speed(), State(), and State().


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