Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSVehicle::Influencer::GapControlState Struct Reference

Container for state and parameters of the gap control. More...

Collaboration diagram for MSVehicle::Influencer::GapControlState:
[legend]

Public Member Functions

void activate (double tauOriginal, double tauTarget, double additionalGap, double duration, double changeRate, double maxDecel, const MSVehicle *refVeh)
 Start gap control with given params.
void deactivate ()
 Stop gap control.
 GapControlState ()
virtual ~GapControlState ()

Static Public Member Functions

static void cleanup ()
 Static cleanup (removes vehicle state listener).
static void init ()
 Static initalization (adds vehicle state listener).

Data Fields

bool active
 Whether the gap control is active.
double addGapCurrent
 Current, interpolated value for the desired space headway.
double addGapTarget
 Target value for the desired space headway.
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).
bool gapAttained
 Whether the desired gap was attained during the current activity phase (induces the remaining duration to decrease).
SUMOTime lastUpdate
 Time of the last update of the gap control.
double maxDecel
 Maximal deceleration to be applied due to the adapted headway.
const MSVehicleprevLeader
 The last recognized leader.
const MSVehiclereferenceVeh
 reference vehicle for the gap - if it is null, the current leader on the ego's lane is used as a reference
double remainingDuration
 Remaining duration for keeping the target headway.
double spaceHeadwayIncrement
double tauCurrent
 Current, interpolated value for the desired time headway.
double tauOriginal
 Original value for the desired headway (will be reset after duration has expired).
double tauTarget
 Target value for the desired time headway.
double timeHeadwayIncrement
 cache storage for the headway increments of the current operation

Static Public Attributes

static std::map< const MSVehicle *, GapControlState * > refVehMap
 stores reference vehicles currently in use by a gapController

Static Private Attributes

static GapControlVehStateListenermyVehStateListener

Detailed Description

Container for state and parameters of the gap control.

Definition at line 1366 of file MSVehicle.h.

Constructor & Destructor Documentation

◆ GapControlState()

MSVehicle::Influencer::GapControlState::GapControlState ( )

◆ ~GapControlState()

MSVehicle::Influencer::GapControlState::~GapControlState ( )
virtual

Definition at line 300 of file MSVehicle.cpp.

References deactivate().

Member Function Documentation

◆ activate()

void MSVehicle::Influencer::GapControlState::activate ( double tauOriginal,
double tauTarget,
double additionalGap,
double duration,
double changeRate,
double maxDecel,
const MSVehicle * refVeh )

◆ cleanup()

void MSVehicle::Influencer::GapControlState::cleanup ( )
static

Static cleanup (removes vehicle state listener).

Definition at line 318 of file MSVehicle.cpp.

References MSNet::getInstance(), myVehStateListener, and MSNet::removeVehicleStateListener().

Referenced by MSVehicle::Influencer::cleanup().

Here is the caller graph for this function:

◆ deactivate()

void MSVehicle::Influencer::GapControlState::deactivate ( )

Stop gap control.

Definition at line 357 of file MSVehicle.cpp.

References active, referenceVeh, and refVehMap.

Referenced by ~GapControlState().

Here is the caller graph for this function:

◆ init()

void MSVehicle::Influencer::GapControlState::init ( )
static

Static initalization (adds vehicle state listener).

Definition at line 305 of file MSVehicle.cpp.

References MSNet::addVehicleStateListener(), MSNet::getInstance(), MSNet::hasInstance(), myVehStateListener, and WRITE_ERROR.

Referenced by MSVehicle::Influencer::init().

Here is the caller graph for this function:

Field Documentation

◆ active

bool MSVehicle::Influencer::GapControlState::active

Whether the gap control is active.

Definition at line 1397 of file MSVehicle.h.

Referenced by activate(), deactivate(), and GapControlState().

◆ addGapCurrent

double MSVehicle::Influencer::GapControlState::addGapCurrent

Current, interpolated value for the desired space headway.

Definition at line 1384 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ addGapTarget

double MSVehicle::Influencer::GapControlState::addGapTarget

Target value for the desired space headway.

Definition at line 1386 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ changeRate

double MSVehicle::Influencer::GapControlState::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).

Definition at line 1391 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ gapAttained

bool MSVehicle::Influencer::GapControlState::gapAttained

Whether the desired gap was attained during the current activity phase (induces the remaining duration to decrease).

Definition at line 1399 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ lastUpdate

SUMOTime MSVehicle::Influencer::GapControlState::lastUpdate

Time of the last update of the gap control.

Definition at line 1403 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ maxDecel

double MSVehicle::Influencer::GapControlState::maxDecel

Maximal deceleration to be applied due to the adapted headway.

Definition at line 1393 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ myVehStateListener

MSVehicle::Influencer::GapControlVehStateListener * MSVehicle::Influencer::GapControlState::myVehStateListener
staticprivate

Definition at line 1411 of file MSVehicle.h.

Referenced by cleanup(), and init().

◆ prevLeader

const MSVehicle* MSVehicle::Influencer::GapControlState::prevLeader

The last recognized leader.

Definition at line 1401 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ referenceVeh

const MSVehicle* MSVehicle::Influencer::GapControlState::referenceVeh

reference vehicle for the gap - if it is null, the current leader on the ego's lane is used as a reference

Definition at line 1395 of file MSVehicle.h.

Referenced by activate(), deactivate(), and GapControlState().

◆ refVehMap

std::map< const MSVehicle *, MSVehicle::Influencer::GapControlState * > MSVehicle::Influencer::GapControlState::refVehMap
static

stores reference vehicles currently in use by a gapController

Definition at line 1408 of file MSVehicle.h.

Referenced by activate(), deactivate(), and MSVehicle::Influencer::GapControlVehStateListener::vehicleStateChanged().

◆ remainingDuration

double MSVehicle::Influencer::GapControlState::remainingDuration

Remaining duration for keeping the target headway.

Definition at line 1388 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ spaceHeadwayIncrement

double MSVehicle::Influencer::GapControlState::spaceHeadwayIncrement

Definition at line 1405 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ tauCurrent

double MSVehicle::Influencer::GapControlState::tauCurrent

Current, interpolated value for the desired time headway.

Definition at line 1380 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ tauOriginal

double MSVehicle::Influencer::GapControlState::tauOriginal

Original value for the desired headway (will be reset after duration has expired).

Definition at line 1378 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ tauTarget

double MSVehicle::Influencer::GapControlState::tauTarget

Target value for the desired time headway.

Definition at line 1382 of file MSVehicle.h.

Referenced by activate(), and GapControlState().

◆ timeHeadwayIncrement

double MSVehicle::Influencer::GapControlState::timeHeadwayIncrement

cache storage for the headway increments of the current operation

Definition at line 1405 of file MSVehicle.h.

Referenced by activate(), and GapControlState().


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