SUMO - Simulation of Urban MObility
MSDevice_SSM::Encounter Class Reference

An encounter is an episode involving two vehicles, which are closer to each other than some specified distance. More...

Collaboration diagram for MSDevice_SSM::Encounter:
Collaboration graph

Data Structures

struct  compare
 Compares encounters regarding to their start time. More...
 
struct  Trajectory
 A trajectory encloses a series of positions x and speeds v for one vehicle (the times are stored only once in the enclosing encounter) More...
 

Public Member Functions

void add (double time, Position egoX, Position egoV, Position foeX, Position foeV)
 add a new data point More...
 
 Encounter (const MSVehicle *_ego, const MSVehicle *const _foe, double _begin)
 Constructor. More...
 
 ~Encounter ()
 Destructor. More...
 

Data Fields

double begin
 
std::vector< double > DRACspan
 All values for DRAC. More...
 
const MSVehicleego
 
Trajectory egoTrajectory
 Trajectory of the ego vehicle. More...
 
double end
 
const MSVehicle *const foe
 
Trajectory foeTrajectory
 Trajectory of the foe vehicle. More...
 
std::vector< double > timespan
 time points corresponding to the trajectories More...
 
std::vector< double > TTCspan
 All values for TTC. More...
 
EncounterType type
 
Extremal values for the SSMs (as <time,value>-pairs)
std::pair< double, double > maxDRAC
 
std::pair< double, double > minTTC
 
std::pair< double, double > PET
 

Private Member Functions

 Encounter (const Encounter &)
 Invalidated Constructor. More...
 
Encounteroperator= (const Encounter &)
 Invalidated assignment operator. More...
 

Detailed Description

An encounter is an episode involving two vehicles, which are closer to each other than some specified distance.

Definition at line 103 of file MSDevice_SSM.h.

Constructor & Destructor Documentation

◆ Encounter() [1/2]

MSDevice_SSM::Encounter::Encounter ( const MSVehicle _ego,
const MSVehicle *const  _foe,
double  _begin 
)

Constructor.

Definition at line 150 of file MSDevice_SSM.cpp.

References ego, foe, MSBaseVehicle::getID(), and SIMTIME.

Referenced by MSDevice_SSM::createEncounters().

◆ ~Encounter()

MSDevice_SSM::Encounter::~Encounter ( )

Destructor.

Definition at line 162 of file MSDevice_SSM.cpp.

References begin, ego, foe, MSBaseVehicle::getID(), and SIMTIME.

◆ Encounter() [2/2]

MSDevice_SSM::Encounter::Encounter ( const Encounter )
private

Invalidated Constructor.

Member Function Documentation

◆ add()

void MSDevice_SSM::Encounter::add ( double  time,
Position  egoX,
Position  egoV,
Position  foeX,
Position  foeV 
)

◆ operator=()

Encounter& MSDevice_SSM::Encounter::operator= ( const Encounter )
private

Invalidated assignment operator.

Field Documentation

◆ begin

double MSDevice_SSM::Encounter::begin

◆ DRACspan

std::vector<double> MSDevice_SSM::Encounter::DRACspan

All values for DRAC.

Definition at line 153 of file MSDevice_SSM.h.

◆ ego

◆ egoTrajectory

Trajectory MSDevice_SSM::Encounter::egoTrajectory

Trajectory of the ego vehicle.

Definition at line 146 of file MSDevice_SSM.h.

Referenced by add(), and MSDevice_SSM::writeOutConflict().

◆ end

double MSDevice_SSM::Encounter::end

Definition at line 134 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM::writeOutConflict().

◆ foe

◆ foeTrajectory

Trajectory MSDevice_SSM::Encounter::foeTrajectory

Trajectory of the foe vehicle.

Definition at line 148 of file MSDevice_SSM.h.

Referenced by add(), and MSDevice_SSM::writeOutConflict().

◆ maxDRAC

std::pair<double, double> MSDevice_SSM::Encounter::maxDRAC

Definition at line 157 of file MSDevice_SSM.h.

◆ minTTC

std::pair<double, double> MSDevice_SSM::Encounter::minTTC

Definition at line 158 of file MSDevice_SSM.h.

◆ PET

std::pair<double, double> MSDevice_SSM::Encounter::PET

Definition at line 159 of file MSDevice_SSM.h.

◆ timespan

std::vector<double> MSDevice_SSM::Encounter::timespan

time points corresponding to the trajectories

Definition at line 144 of file MSDevice_SSM.h.

Referenced by add(), and MSDevice_SSM::writeOutConflict().

◆ TTCspan

std::vector<double> MSDevice_SSM::Encounter::TTCspan

All values for TTC.

Definition at line 151 of file MSDevice_SSM.h.

◆ type

EncounterType MSDevice_SSM::Encounter::type

Definition at line 135 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM::updateEncounter().


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