Eclipse SUMO - Simulation of Urban MObility
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. More...
 
void deactivate ()
 Stop gap control. More...
 
 GapControlState ()
 
virtual ~GapControlState ()
 

Static Public Member Functions

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

Data Fields

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

Static Public Attributes

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

Static Private Attributes

static GapControlVehStateListener vehStateListener
 

Detailed Description

Container for state and parameters of the gap control.

Definition at line 1373 of file MSVehicle.h.

Constructor & Destructor Documentation

◆ GapControlState()

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

Definition at line 292 of file MSVehicle.cpp.

◆ ~GapControlState()

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

Definition at line 298 of file MSVehicle.cpp.

Member Function Documentation

◆ activate()

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

Start gap control with given params.

Definition at line 320 of file MSVehicle.cpp.

References DELTA_T, MSGlobals::gUseMesoSim, refVehMap, SIMSTEP, TL, TS, and WRITE_ERROR.

◆ cleanup()

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

Static cleanup (removes vehicle state listener)

Definition at line 314 of file MSVehicle.cpp.

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

◆ deactivate()

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

Stop gap control.

Definition at line 350 of file MSVehicle.cpp.

References refVehMap.

◆ init()

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

Static initalization (adds vehicle state listener)

Definition at line 303 of file MSVehicle.cpp.

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

Field Documentation

◆ active

bool MSVehicle::Influencer::GapControlState::active

Whether the gap control is active.

Definition at line 1404 of file MSVehicle.h.

◆ addGapCurrent

double MSVehicle::Influencer::GapControlState::addGapCurrent

Current, interpolated value for the desired space headway.

Definition at line 1391 of file MSVehicle.h.

◆ addGapTarget

double MSVehicle::Influencer::GapControlState::addGapTarget

Target value for the desired space headway.

Definition at line 1393 of file MSVehicle.h.

◆ 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 1398 of file MSVehicle.h.

◆ 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 1406 of file MSVehicle.h.

◆ lastUpdate

SUMOTime MSVehicle::Influencer::GapControlState::lastUpdate

Time of the last update of the gap control.

Definition at line 1410 of file MSVehicle.h.

◆ maxDecel

double MSVehicle::Influencer::GapControlState::maxDecel

Maximal deceleration to be applied due to the adapted headway.

Definition at line 1400 of file MSVehicle.h.

◆ prevLeader

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

The last recognized leader.

Definition at line 1408 of file MSVehicle.h.

◆ 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 1402 of file MSVehicle.h.

◆ 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 1415 of file MSVehicle.h.

Referenced by activate(), and deactivate().

◆ remainingDuration

double MSVehicle::Influencer::GapControlState::remainingDuration

Remaining duration for keeping the target headway.

Definition at line 1395 of file MSVehicle.h.

◆ spaceHeadwayIncrement

double MSVehicle::Influencer::GapControlState::spaceHeadwayIncrement

Definition at line 1412 of file MSVehicle.h.

◆ tauCurrent

double MSVehicle::Influencer::GapControlState::tauCurrent

Current, interpolated value for the desired time headway.

Definition at line 1387 of file MSVehicle.h.

◆ tauOriginal

double MSVehicle::Influencer::GapControlState::tauOriginal

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

Definition at line 1385 of file MSVehicle.h.

◆ tauTarget

double MSVehicle::Influencer::GapControlState::tauTarget

Target value for the desired time headway.

Definition at line 1389 of file MSVehicle.h.

◆ timeHeadwayIncrement

double MSVehicle::Influencer::GapControlState::timeHeadwayIncrement

cache storage for the headway increments of the current operation

Definition at line 1412 of file MSVehicle.h.

◆ vehStateListener

MSVehicle::Influencer::GapControlVehStateListener MSVehicle::Influencer::GapControlState::vehStateListener
staticprivate

Definition at line 1418 of file MSVehicle.h.


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