Eclipse SUMO - Simulation of Urban MObility
MSDevice_SSM Class Reference

A device which collects info on the vehicle trip (mainly on departure and arrival) More...

#include <MSDevice_SSM.h>

Inheritance diagram for MSDevice_SSM:
Collaboration diagram for MSDevice_SSM:

Data Structures

class  Encounter
 An encounter is an episode involving two vehicles, which are closer to each other than some specified distance. More...
 
struct  EncounterApproachInfo
 Structure to collect some info on the encounter needed during ssm calculation by various functions. More...
 
struct  FoeInfo
 
struct  UpstreamScanStartInfo
 Auxiliary structure used to handle upstream scanning start points Upstream scan has to be started after downstream scan is completed, see #5644. More...
 

Public Types

enum  EncounterType {
  ENCOUNTER_TYPE_NOCONFLICT_AHEAD = 0, ENCOUNTER_TYPE_FOLLOWING = 1, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER = 2, ENCOUNTER_TYPE_FOLLOWING_LEADER = 3,
  ENCOUNTER_TYPE_ON_ADJACENT_LANES = 4, ENCOUNTER_TYPE_MERGING = 5, ENCOUNTER_TYPE_MERGING_LEADER = 6, ENCOUNTER_TYPE_MERGING_FOLLOWER = 7,
  ENCOUNTER_TYPE_MERGING_ADJACENT = 8, ENCOUNTER_TYPE_CROSSING = 9, ENCOUNTER_TYPE_CROSSING_LEADER = 10, ENCOUNTER_TYPE_CROSSING_FOLLOWER = 11,
  ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA = 12, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA = 13, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA = 14, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA = 15,
  ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA = 16, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA = 17, ENCOUNTER_TYPE_FOLLOWING_PASSED = 18, ENCOUNTER_TYPE_MERGING_PASSED = 19,
  ENCOUNTER_TYPE_ONCOMING = 20, ENCOUNTER_TYPE_COLLISION = 111
}
 Different types of encounters corresponding to relative positions of the vehicles. The name describes the type from the ego perspective. More...
 
enum  Notification {
  NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE,
  NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED,
  NOTIFICATION_TELEPORT_ARRIVED, NOTIFICATION_PARKING_REROUTE
}
 Definition of a vehicle state. More...
 

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
const std::string deviceName () const
 return the name for this type of device More...
 
void generateOutput () const
 Finalizes output. Called on vehicle removal. More...
 
const std::string & getDescription () const
 
SUMOVehiclegetHolder () const
 Returns the vehicle that holds this device. More...
 
const std::string & getID () const
 Returns the id. More...
 
const MSLanegetLane () const
 Returns the lane the reminder works on. More...
 
SUMOVehicle::NumericalID getNumericalID () const
 
virtual std::string getParameter (const std::string &key) const
 try to retrieve the given parameter from this device. Throw exception for unsupported key More...
 
virtual void loadState (const SUMOSAXAttributes &attrs)
 Loads the state of the device from the given description. More...
 
virtual void notifyMoveInternal (const SUMOTrafficObject &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane)
 Internal notification about the vehicle moves. More...
 
virtual void saveState (OutputDevice &out) const
 Saves the state of the device. More...
 
void setDescription (const std::string &description)
 
void setID (const std::string &newID)
 resets the id More...
 
virtual void setParameter (const std::string &key, const std::string &value)
 try to set the given parameter for this device. Throw exception for unsupported key More...
 
void updateAndWriteOutput ()
 This is called once per time step in MSNet::writeOutput() and collects the surrounding vehicles, updates information on encounters and flushes the encounters qualified as conflicts (. More...
 
 ~MSDevice_SSM ()
 Destructor. More...
 
Methods called on vehicle movement / state change, overwriting MSDevice
bool notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
 Checks for waiting steps when the vehicle moves. More...
 
bool notifyEnter (SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Called whenever the holder enteres a lane. More...
 
bool notifyLeave (SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Called whenever the holder leaves a lane. More...
 
Interface methods, to be derived by subclasses
void updateDetector (SUMOTrafficObject &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
 

Static Public Member Functions

static void buildTransportableDevices (MSTransportable &p, std::vector< MSTransportableDevice * > &into)
 Build devices for the given person, if needed. More...
 
static void buildVehicleDevices (SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
 Build devices for the given vehicle, if needed. More...
 
static bool checkOptions (OptionsCont &oc)
 check device-specific options More...
 
static void cleanup ()
 Clean up remaining devices instances. More...
 
static void cleanupAll ()
 perform cleanup for all devices More...
 
static void findSurroundingVehicles (const MSVehicle &veh, double range, FoeInfoMap &foeCollector)
 Returns all vehicles, which are within the given range of the given vehicle. More...
 
static std::mt19937 * getEquipmentRNG ()
 
template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 
static const std::set< MSDevice_SSM *, ComparatorNumericalIdLess > & getInstances ()
 returns all currently existing SSM devices More...
 
static void getUpstreamVehicles (const UpstreamScanStartInfo &scanStart, FoeInfoMap &foeCollector, std::set< const MSJunction * > &seenJunctions)
 Collects all vehicles within range 'range' upstream of the position 'pos' on the edge 'edge' into foeCollector. More...
 
static void getVehiclesOnJunction (const MSJunction *, double egoDistToConflictLane, const MSLane *const egoConflictLane, FoeInfoMap &foeCollector)
 Collects all vehicles on the junction into foeCollector. More...
 
static void insertOptions (OptionsCont &oc)
 Inserts MSDevice_SSM-options. More...
 
static std::string toString (EncounterType type)
 

Protected Member Functions

void removeFromVehicleUpdateValues (SUMOTrafficObject &veh)
 

Static Protected Member Functions

Helper methods for device assignment
static void insertDefaultAssignmentOptions (const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
 Adds common command options that allow to assign devices to vehicles. More...
 
template<class DEVICEHOLDER >
static bool equippedByDefaultAssignmentOptions (const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
 Determines whether a vehicle should get a certain device. More...
 
Helper methods for parsing parameters
static std::string getStringParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, std::string deflt, bool required)
 
static double getFloatParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, double deflt, bool required)
 
static bool getBoolParam (const SUMOVehicle &v, const OptionsCont &oc, std::string paramName, bool deflt, bool required)
 

Protected Attributes

std::string myDescription
 a description of this moveReminder More...
 
SUMOVehiclemyHolder
 The vehicle that stores the device. More...
 
std::string myID
 The name of the object. More...
 
MSLane *const myLane
 Lane on which the reminder works. More...
 

Private Types

typedef std::priority_queue< Encounter *, std::vector< Encounter * >, Encounter::compareEncounterQueue
 
typedef std::vector< Encounter * > EncounterVector
 
typedef std::map< const MSVehicle *, FoeInfo * > FoeInfoMap
 
enum  SSMParameterWarning {
  SSM_WARN_MEASURES = 1, SSM_WARN_THRESHOLDS = 1 << 1, SSM_WARN_TRAJECTORIES = 1 << 2, SSM_WARN_RANGE = 1 << 3,
  SSM_WARN_EXTRATIME = 1 << 4, SSM_WARN_FILE = 1 << 5, SSM_WARN_GEO = 1 << 6
}
 

Private Member Functions

EncounterType classifyEncounter (const FoeInfo *foeInfo, EncounterApproachInfo &eInfo) const
 Classifies the current type of the encounter provided some information on the opponents. More...
 
void closeEncounter (Encounter *e)
 Finalizes the encounter and calculates SSM values. More...
 
void computeGlobalMeasures ()
 Stores measures, that are not associated to a specific encounter as headways and brake rates. More...
 
void computeSSMs (EncounterApproachInfo &e) const
 Compute current values of the logged SSMs (myMeasures) for the given encounter 'e' and update 'e' accordingly (add point to SSM time-series, update maximal/minimal value) This is called just after adding the current vehicle positions and velocity vectors to the encounter. More...
 
double computeTTC (double gap, double followerSpeed, double leaderSpeed) const
 Computes the time to collision (in seconds) for two vehicles with a given initial gap under the assumption that both maintain their current speeds. Returns INVALID if no collision would occur under this assumption. More...
 
void createEncounters (FoeInfoMap &foes)
 Makes new encounters for all given vehicles (these should be the ones entering the device's range in the current timestep) More...
 
void determinePET (EncounterApproachInfo &eInfo) const
 Discriminates between different encounter types and correspondingly determines the PET for those cases and writes the result to eInfo.pet (after both vehicles have left the conflict area) More...
 
void determineTTCandDRAC (EncounterApproachInfo &eInfo) const
 Discriminates between different encounter types and correspondingly determines TTC and DRAC for those cases and writes the result to eInfo.ttc and eInfo.drac. More...
 
const MSLanefindFoeConflictLane (const MSVehicle *foe, const MSLane *egoConflictLane, double &distToConflictLane) const
 Computes the conflict lane for the foe. More...
 
void flushConflicts (bool all=false)
 Writes out all past conflicts that have begun earlier than the oldest active encounter. More...
 
void flushGlobalMeasures ()
 Write out all non-encounter specific measures as headways and braking rates. More...
 
 MSDevice_SSM (const MSDevice_SSM &)
 Invalidated copy constructor. More...
 
 MSDevice_SSM (SUMOVehicle &holder, const std::string &id, std::string outputFilename, std::map< std::string, double > thresholds, bool trajectories, double range, double extraTime, bool useGeoCoords)
 Constructor. More...
 
MSDevice_SSMoperator= (const MSDevice_SSM &)
 Invalidated assignment operator. More...
 
void processEncounters (FoeInfoMap &foes, bool forceClose=false)
 Finds encounters for which the foe vehicle has disappeared from range. remainingExtraTime is decreased until it reaches zero, which triggers closing the encounter. If an ended encounter is qualified as a conflict, it is transferred to myPastConflicts All vehicles for which an encounter instance already exists (vehicle is already tracked) are removed from 'foes' during processing. More...
 
bool qualifiesAsConflict (Encounter *e)
 Tests if the SSM values exceed the threshold for qualification as conflict. More...
 
void resetEncounters ()
 Closes all current Encounters and moves conflicts to myPastConflicts,. More...
 
void storeEncountersExceedingMaxLength ()
 Closes encounters, whose duration exceeds the maximal encounter length. If it is classified as conflict, the encounter is saved. In any case, a new active encounter is created holding the trailing part (of length myOverlapTime) of the original. More...
 
void update ()
 
bool updateEncounter (Encounter *e, FoeInfo *foeInfo)
 Updates the encounter (adds a new trajectory point). More...
 
void updatePassedEncounter (Encounter *e, FoeInfo *foeInfo, EncounterApproachInfo &eInfo)
 Updates an encounter, which was classified as ENCOUNTER_TYPE_NOCONFLICT_AHEAD this may be the case because the foe is out of the detection range but the encounter is still in extra time (in this case foeInfo==0), or because the foe does not head for a lane conflicting with the route of the ego vehicle. It is also used for an ongoing crossing conflict, where only the covered distances are traced until the situation is over. (A crossing conflict is ongoing, if one vehicle entered the conflict area) Writes the type of encounter which is determined for the current state into eInfo. And if appropriate some information concerning vehicles positions in relation to a crossed crossing point (for PET calculation). More...
 
void writeOutConflict (Encounter *e)
 

Static Private Member Functions

static void checkConflictEntryAndExit (EncounterApproachInfo &eInfo)
 Checks whether ego or foe have entered or left the conflict area in the last step and eventually writes the corresponding entry or exit times to eInfo.encounter. For ongoing crossing conflicts, it also manages the evolution of the conflict type. More...
 
static double computeDRAC (const EncounterApproachInfo &eInfo)
 Computes the DRAC a crossing situation, determining the minimal constant deceleration needed for one of the vehicles to reach the conflict area after the other has left. for estimated leaving times, current deceleration is extrapolated, and acceleration is neglected. Returns 0.0 if no deceleration is required by the follower to avoid a crash, INVALID if collision is detected. More...
 
static double computeDRAC (double gap, double followerSpeed, double leaderSpeed)
 Computes the DRAC (deceleration to avoid a collision) for a lead/follow situation as defined, e.g., in Guido et al. (2011, Safety performance measures: a comparison between microsimulation and observational data) for two vehicles with a given gap. Returns 0.0 if no deceleration is required by the follower to avoid a crash, INVALID if collision is detected. More...
 
static void determineConflictPoint (EncounterApproachInfo &eInfo)
 Calculates the (x,y)-coordinate for the eventually predicted conflict point and stores the result in eInfo.conflictPoint. In case of MERGING and CROSSING, this is the entry point to conflict area for follower In case of FOLLOWING it is the position of leader's back. More...
 
static void estimateConflictTimes (EncounterApproachInfo &eInfo)
 Estimates the time until conflict for the vehicles based on the distance to the conflict entry points. For acceleration profiles, we assume that the acceleration is <= 0 (that is, braking is extrapolated, while for acceleration it is assumed that the vehicle will continue with its current speed) More...
 
static std::string makeStringWithNAs (std::vector< double > v, double NA, std::string sep=" ")
 make a string of a double vector and treat a special value as invalid ("NA") More...
 
static std::string makeStringWithNAs (std::vector< double > v, std::vector< double > NAs, std::string sep=" ")
 
static void toGeo (Position &x)
 convert SUMO-positions to geo coordinates (in place) More...
 
static void toGeo (PositionVector &x)
 convert SUMO-positions to geo coordinates (in place) More...
 
parameter load helpers (introduced for readability of buildVehicleDevices())
static std::string getOutputFilename (const SUMOVehicle &v, std::string deviceID)
 
static double getDetectionRange (const SUMOVehicle &v)
 
static double getExtraTime (const SUMOVehicle &v)
 
static bool useGeoCoords (const SUMOVehicle &v)
 
static bool requestsTrajectories (const SUMOVehicle &v)
 
static bool getMeasuresAndThresholds (const SUMOVehicle &v, std::string deviceID, std::map< std::string, double > &thresholds)
 

Private Attributes

std::map< SUMOTrafficObject *, std::pair< SUMOTime, double > > myLastVehicleUpdateValues
 
OutputDevicemyOutputFile
 Output device. More...
 
Device parameters

thresholds for the ssms, i.e., critical values above or below which a value indicates that a conflict has occurred. These are used in qualifiesAsConflict() and decide whether an encounter is saved.

std::map< std::string, double > myThresholds
 
bool mySaveTrajectories
 This determines whether the whole trajectories of the vehicles (position, speed, ssms) shall be saved in the ssm-output or only the most critical value shall be reported. More...
 
double myRange
 Detection range. For vehicles closer than this distance from the ego vehicle, SSMs are traced. More...
 
double myExtraTime
 Extra time in seconds to be logged after a conflict is over. More...
 
bool myUseGeoCoords
 Whether to use the original coordinate system for output. More...
 
bool myComputeTTC
 Flags for switching on / off comutation of different SSMs, derived from myMeasures. More...
 
bool myComputeDRAC
 
bool myComputePET
 
bool myComputeBR
 
bool myComputeSGAP
 
bool myComputeTGAP
 
MSVehiclemyHolderMS
 
Internal storage for encounters/conflicts

Currently observed encounters/conflicts

EncounterVector myActiveEncounters
 
double myOldestActiveEncounterBegin
 begin time of the oldest active encounter More...
 
EncounterQueue myPastConflicts
 Past encounters that where qualified as conflicts and are not yet flushed to the output file. More...
 
Internal storage for global measures
std::vector< double > myGlobalMeasuresTimeSpan
 
std::vector< double > myBRspan
 All values for brake rate. More...
 
std::vector< double > mySGAPspan
 All values for space gap. More...
 
std::vector< double > myTGAPspan
 All values for time gap. More...
 
std::pair< std::pair< double, Position >, double > myMaxBR
 Extremal values for the global measures (as <<<time, Position>, value>, [leaderID]>-pairs) More...
 
std::pair< std::pair< std::pair< double, Position >, double >, std::string > myMinSGAP
 
std::pair< std::pair< std::pair< double, Position >, double >, std::string > myMinTGAP
 

Static Private Attributes

static std::set< std::string > createdOutputFiles
 remember which files were created already (don't duplicate xml root-elements) More...
 
static int issuedParameterWarnFlags = 0
 bitset storing info whether warning has already been issued about unset parameter (warn only once!) More...
 
static std::mt19937 myEquipmentRNG
 A random number generator used to choose from vtype/route distributions and computing the speed factors. More...
 
static std::map< std::string, std::set< std::string > > myExplicitIDs
 vehicles which explicitly carry a device, sorted by device, first More...
 
static std::set< MSDevice_SSM *, ComparatorNumericalIdLess > * myInstances = new std::set<MSDevice_SSM*, ComparatorNumericalIdLess>()
 All currently existing SSM devices. More...
 

Detailed Description

A device which collects info on the vehicle trip (mainly on departure and arrival)

Each device collects departure time, lane and speed and the same for arrival.

See also
MSDevice

Definition at line 57 of file MSDevice_SSM.h.

Member Typedef Documentation

◆ EncounterQueue

typedef std::priority_queue<Encounter*, std::vector<Encounter*>, Encounter::compare> MSDevice_SSM::EncounterQueue
private

Definition at line 354 of file MSDevice_SSM.h.

◆ EncounterVector

typedef std::vector<Encounter*> MSDevice_SSM::EncounterVector
private

Definition at line 355 of file MSDevice_SSM.h.

◆ FoeInfoMap

typedef std::map<const MSVehicle*, FoeInfo*> MSDevice_SSM::FoeInfoMap
private

Definition at line 356 of file MSDevice_SSM.h.

Member Enumeration Documentation

◆ EncounterType

Different types of encounters corresponding to relative positions of the vehicles. The name describes the type from the ego perspective.

Enumerator
ENCOUNTER_TYPE_NOCONFLICT_AHEAD 

ENCOUNTER_TYPE_NOCONFLICT_AHEAD.

ENCOUNTER_TYPE_FOLLOWING 

ENCOUNTER_TYPE_FOLLOWING.

ENCOUNTER_TYPE_FOLLOWING_FOLLOWER 

ENCOUNTER_TYPE_FOLLOWING_FOLLOWER.

ENCOUNTER_TYPE_FOLLOWING_LEADER 

ENCOUNTER_TYPE_FOLLOWING_LEADER.

ENCOUNTER_TYPE_ON_ADJACENT_LANES 

ENCOUNTER_TYPE_ON_ADJACENT_LANES.

ENCOUNTER_TYPE_MERGING 

ENCOUNTER_TYPE_MERGING.

ENCOUNTER_TYPE_MERGING_LEADER 

ENCOUNTER_TYPE_MERGING_LEADER.

ENCOUNTER_TYPE_MERGING_FOLLOWER 

ENCOUNTER_TYPE_MERGING_FOLLOWER.

ENCOUNTER_TYPE_MERGING_ADJACENT 

ENCOUNTER_TYPE_MERGING_ADJACENT.

ENCOUNTER_TYPE_CROSSING 

ENCOUNTER_TYPE_CROSSING.

ENCOUNTER_TYPE_CROSSING_LEADER 

ENCOUNTER_TYPE_CROSSING_LEADER.

ENCOUNTER_TYPE_CROSSING_FOLLOWER 

ENCOUNTER_TYPE_CROSSING_FOLLOWER.

ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA 

ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA.

ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA 

ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA.

ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA 

ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA.

ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA 

ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA.

ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA 

ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA.

ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA 

ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA.

ENCOUNTER_TYPE_FOLLOWING_PASSED 

ENCOUNTER_TYPE_FOLLOWING_PASSED.

ENCOUNTER_TYPE_MERGING_PASSED 

ENCOUNTER_TYPE_FOLLOWING_PASSED.

ENCOUNTER_TYPE_ONCOMING 
ENCOUNTER_TYPE_COLLISION 

ENCOUNTER_TYPE_COLLISION.

Definition at line 66 of file MSDevice_SSM.h.

◆ Notification

Definition of a vehicle state.

Enumerator
NOTIFICATION_DEPARTED 

The vehicle has departed (was inserted into the network)

NOTIFICATION_JUNCTION 

The vehicle arrived at a junction.

NOTIFICATION_SEGMENT 

The vehicle changes the segment (meso only)

NOTIFICATION_LANE_CHANGE 

The vehicle changes lanes (micro only)

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_ARRIVED 

The vehicle arrived at its destination (is deleted)

NOTIFICATION_VAPORIZED 

The vehicle got vaporized.

NOTIFICATION_TELEPORT_ARRIVED 

The vehicle was teleported out of the net.

NOTIFICATION_PARKING_REROUTE 

The vehicle needs another parking area.

Definition at line 89 of file MSMoveReminder.h.

◆ SSMParameterWarning

Enumerator
SSM_WARN_MEASURES 
SSM_WARN_THRESHOLDS 
SSM_WARN_TRAJECTORIES 
SSM_WARN_RANGE 
SSM_WARN_EXTRATIME 
SSM_WARN_FILE 
SSM_WARN_GEO 

Definition at line 748 of file MSDevice_SSM.h.

Constructor & Destructor Documentation

◆ ~MSDevice_SSM()

MSDevice_SSM::~MSDevice_SSM ( )

Destructor.

Definition at line 2774 of file MSDevice_SSM.cpp.

References flushConflicts(), flushGlobalMeasures(), myInstances, and resetEncounters().

◆ MSDevice_SSM() [1/2]

MSDevice_SSM::MSDevice_SSM ( SUMOVehicle holder,
const std::string &  id,
std::string  outputFilename,
std::map< std::string, double >  thresholds,
bool  trajectories,
double  range,
double  extraTime,
bool  useGeoCoords 
)
private

Constructor.

Parameters
[in]holderThe vehicle that holds this device
[in]idThe ID of the device
measuresVector of Surrogate Safety Measure IDs
thresholdsVector of corresponding thresholds
trajectoriesFlag indicating whether complete trajectories should be saved for an encounter (if false only extremal values are logged)
rangeDetection range. For vehicles closer than this distance from the ego vehicle, SSMs are traced
extraTimeExtra time in seconds to be logged after a conflict is over
useGeoCoordsWhether coordinates should be written out in the original coordinate reference system or as sumo's x,y values

Definition at line 2719 of file MSDevice_SSM.cpp.

References createdOutputFiles, DEBUG_COND, OutputDevice::getDevice(), joinToString(), myActiveEncounters, myComputeBR, myComputeDRAC, myComputePET, myComputeSGAP, myComputeTGAP, myComputeTTC, myExtraTime, myHolderMS, myInstances, myOutputFile, myPastConflicts, myRange, mySaveTrajectories, myThresholds, myUseGeoCoords, and OutputDevice::writeXMLHeader().

Referenced by buildVehicleDevices().

◆ MSDevice_SSM() [2/2]

MSDevice_SSM::MSDevice_SSM ( const MSDevice_SSM )
private

Invalidated copy constructor.

Member Function Documentation

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
[in,filled]cont The container to add this item to

Definition at line 127 of file Named.h.

References Named::StoringVisitor::add().

◆ buildTransportableDevices()

void MSDevice::buildTransportableDevices ( MSTransportable p,
std::vector< MSTransportableDevice * > &  into 
)
staticinherited

Build devices for the given person, if needed.

Parameters
[in]pThe person for which a device may be built
[filled]into The vector to store the built device in

Definition at line 112 of file MSDevice.cpp.

References MSTransportableDevice_FCD::buildDevices(), and MSTransportableDevice_Routing::buildDevices().

Referenced by MSTransportable::MSTransportable().

◆ buildVehicleDevices()

void MSDevice_SSM::buildVehicleDevices ( SUMOVehicle v,
std::vector< MSVehicleDevice * > &  into 
)
static

Build devices for the given vehicle, if needed.

The options are read and evaluated whether a example-device shall be built for the given vehicle.

The built device is stored in the given vector.

Parameters
[in]vThe vehicle for which a device may be built
[filled]into The vector to store the built device in

Definition at line 230 of file MSDevice_SSM.cpp.

References MSDevice::equippedByDefaultAssignmentOptions(), getDetectionRange(), getExtraTime(), SUMOTrafficObject::getID(), getMeasuresAndThresholds(), OptionsCont::getOptions(), getOutputFilename(), MSGlobals::gUseMesoSim, MSDevice_SSM(), requestsTrajectories(), useGeoCoords(), and WRITE_WARNING.

Referenced by MSDevice::buildVehicleDevices().

◆ checkConflictEntryAndExit()

void MSDevice_SSM::checkConflictEntryAndExit ( EncounterApproachInfo eInfo)
staticprivate

Checks whether ego or foe have entered or left the conflict area in the last step and eventually writes the corresponding entry or exit times to eInfo.encounter. For ongoing crossing conflicts, it also manages the evolution of the conflict type.

Parameters
[in/out]eInfo Info structure for the current state of the encounter.
Note
The times are to be used for SSM computation in computeSSMs(), e.g. in determinePET()

Definition at line 1492 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::currentType, DEBUG_COND_ENCOUNTER, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::Encounter::egoConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::Encounter::egoConflictExitTime, MSDevice_SSM::Encounter::egoID, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_COLLISION, ENCOUNTER_TYPE_CROSSING_FOLLOWER, ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::Encounter::foeConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSDevice_SSM::Encounter::foeConflictExitTime, MSDevice_SSM::Encounter::foeID, MSVehicle::getLastStepDist(), MSBaseVehicle::getLength(), MSVehicle::getPreviousSpeed(), MSVehicle::getSpeed(), INVALID, MSCFModel::passingTime(), SIMTIME, MSDevice_SSM::Encounter::size(), TS, and MSDevice_SSM::EncounterApproachInfo::type.

Referenced by updateEncounter().

◆ checkOptions()

bool MSDevice::checkOptions ( OptionsCont oc)
staticinherited

check device-specific options

Parameters
[filled]oc The options container with the user-defined options

Definition at line 86 of file MSDevice.cpp.

References MSDevice_Routing::checkOptions().

Referenced by MSFrame::checkOptions().

◆ classifyEncounter()

MSDevice_SSM::EncounterType MSDevice_SSM::classifyEncounter ( const FoeInfo foeInfo,
EncounterApproachInfo eInfo 
) const
private

Classifies the current type of the encounter provided some information on the opponents.

Parameters
[in]foeInfoInfo on distance to conflict point for the device holder.
[in/out]eInfo Info structure for the current state of the encounter (provides a pointer to the encounter).
Returns
Returns an encounter type and writes a value to the relevant distances (egoEncounterDist, foeEncounterDist members of eInfo), i.e. the distances to the entry points to the potential conflict.
Note
: The encounter distance has a different meaning for different types of encounters: 1) For rear-end conflicts (lead/follow situations) the follower's encounter distance is the distance to the actual back position of the leader. The leaders's distance is undefined. 2) For merging encounters the encounter distance is the distance until the begin of the common target edge/lane. 3) For crossing encounters the encounter distance is the distance until crossing point of the conflicting lanes.

Definition at line 1798 of file MSDevice_SSM.cpp.

References DEBUG_COND_ENCOUNTER, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::FoeInfo::egoConflictLane, MSDevice_SSM::FoeInfo::egoDistToConflictLane, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_CROSSING, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER, ENCOUNTER_TYPE_MERGING, ENCOUNTER_TYPE_MERGING_ADJACENT, ENCOUNTER_TYPE_NOCONFLICT_AHEAD, ENCOUNTER_TYPE_ON_ADJACENT_LANES, ENCOUNTER_TYPE_ONCOMING, findFoeConflictLane(), MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSVehicle::getBackPositionOnLane(), MSLane::getCanonicalSuccessorLane(), MSLink::getCorrespondingExitLink(), MSLane::getEdge(), MSLane::getEntryLink(), MSLane::getFirstInternalInConnection(), MSLink::getFoeLinks(), Named::getID(), MSBaseVehicle::getID(), MSLane::getIncomingLanes(), MSLink::getInternalLaneBefore(), MSLink::getInternalLengthsAfter(), MSLink::getLane(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicle::getLateralPositionOnLane(), MSBaseVehicle::getLength(), MSLane::getLength(), MSLink::getLengthsBeforeCrossing(), MSLane::getLinkCont(), MSVehicle::getPositionOnLane(), MSLane::getShape(), MSEdge::getToJunction(), MSBaseVehicle::getVehicleType(), MSLink::getViaLane(), MSVehicleType::getWidth(), MSBaseVehicle::getWidth(), MSLane::getWidth(), INVALID, MSLane::isInternal(), MSLink::isInternalJunctionLink(), MSAbstractLaneChangeModel::isOpposite(), M_PI, PositionVector::rotationAtOffset(), and MSDevice_SSM::Encounter::typeSpan.

Referenced by updateEncounter().

◆ cleanup()

void MSDevice_SSM::cleanup ( )
static

Clean up remaining devices instances.

Definition at line 191 of file MSDevice_SSM.cpp.

References OutputDevice::closeTag(), createdOutputFiles, fn, OutputDevice::getDevice(), and myInstances.

Referenced by MSNet::clearAll().

◆ cleanupAll()

void MSDevice::cleanupAll ( )
staticinherited

perform cleanup for all devices

Definition at line 119 of file MSDevice.cpp.

References MSDevice_FCD::cleanup(), MSRoutingEngine::cleanup(), and MSDevice_Tripinfo::cleanup().

Referenced by MSNet::clearAll().

◆ closeEncounter()

◆ computeDRAC() [1/2]

double MSDevice_SSM::computeDRAC ( const EncounterApproachInfo eInfo)
staticprivate

Computes the DRAC a crossing situation, determining the minimal constant deceleration needed for one of the vehicles to reach the conflict area after the other has left. for estimated leaving times, current deceleration is extrapolated, and acceleration is neglected. Returns 0.0 if no deceleration is required by the follower to avoid a crash, INVALID if collision is detected.

Parameters
[in]eInfoinfos on the encounter. Used variables: dEntry1,dEntry2 The distances to the conflict area entry dExit1,dExit2 The distances to the conflict area exit v1,v2 The current speeds tEntry1,tEntry2 The estimated conflict entry times (including extrapolation of current acceleration) tExit1,tExit2 The estimated conflict exit times (including extrapolation of current acceleration)

Definition at line 1374 of file MSDevice_SSM.cpp.

References computeDRAC(), DEBUG_COND, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictExitTime, MSDevice_SSM::EncounterApproachInfo::encounter, MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictExitTime, MSVehicle::getSpeed(), INVALID, MIN2(), SIMTIME, and toString().

◆ computeDRAC() [2/2]

double MSDevice_SSM::computeDRAC ( double  gap,
double  followerSpeed,
double  leaderSpeed 
)
staticprivate

Computes the DRAC (deceleration to avoid a collision) for a lead/follow situation as defined, e.g., in Guido et al. (2011, Safety performance measures: a comparison between microsimulation and observational data) for two vehicles with a given gap. Returns 0.0 if no deceleration is required by the follower to avoid a crash, INVALID if collision is detected.

Definition at line 1356 of file MSDevice_SSM.cpp.

References INVALID.

Referenced by computeDRAC(), and determineTTCandDRAC().

◆ computeGlobalMeasures()

void MSDevice_SSM::computeGlobalMeasures ( )
private

Stores measures, that are not associated to a specific encounter as headways and brake rates.

Todo:
Manage as episodes (BR -> braking episode, SGAP/TGAP -> car-following episode) with invariant leader, and filtering applying the corresponding thresholds.

Definition at line 453 of file MSDevice_SSM.cpp.

References MSVehicle::getAcceleration(), MSVehicle::getLeader(), MSVehicle::getPosition(), MSVehicle::getSpeed(), INVALID, MAX2(), myBRspan, myComputeBR, myComputeSGAP, myComputeTGAP, myGlobalMeasuresTimeSpan, myHolderMS, myMaxBR, myMinSGAP, myMinTGAP, mySGAPspan, myTGAPspan, myThresholds, and SIMTIME.

Referenced by update().

◆ computeSSMs()

void MSDevice_SSM::computeSSMs ( EncounterApproachInfo e) const
private

Compute current values of the logged SSMs (myMeasures) for the given encounter 'e' and update 'e' accordingly (add point to SSM time-series, update maximal/minimal value) This is called just after adding the current vehicle positions and velocity vectors to the encounter.

Definition at line 990 of file MSDevice_SSM.cpp.

References DEBUG_COND, determinePET(), determineTTCandDRAC(), MSDevice_SSM::EncounterApproachInfo::drac, MSDevice_SSM::Encounter::ego, MSDevice_SSM::Encounter::egoID, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_COLLISION, ENCOUNTER_TYPE_CROSSING_FOLLOWER, ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER, ENCOUNTER_TYPE_FOLLOWING_PASSED, ENCOUNTER_TYPE_MERGING_ADJACENT, ENCOUNTER_TYPE_MERGING_FOLLOWER, ENCOUNTER_TYPE_MERGING_LEADER, ENCOUNTER_TYPE_MERGING_PASSED, ENCOUNTER_TYPE_NOCONFLICT_AHEAD, ENCOUNTER_TYPE_ON_ADJACENT_LANES, ENCOUNTER_TYPE_ONCOMING, MSDevice_SSM::Encounter::foe, MSDevice_SSM::Encounter::foeID, MSBaseVehicle::getID(), INVALID, myComputeDRAC, myComputeTTC, myHolderMS, MSDevice_SSM::EncounterApproachInfo::pet, SIMTIME, toString(), MSDevice_SSM::EncounterApproachInfo::ttc, MSDevice_SSM::EncounterApproachInfo::type, and WRITE_WARNING.

Referenced by updateEncounter().

◆ computeTTC()

double MSDevice_SSM::computeTTC ( double  gap,
double  followerSpeed,
double  leaderSpeed 
) const
private

Computes the time to collision (in seconds) for two vehicles with a given initial gap under the assumption that both maintain their current speeds. Returns INVALID if no collision would occur under this assumption.

Definition at line 1334 of file MSDevice_SSM.cpp.

References DEBUG_COND, INVALID, and myHolderMS.

Referenced by determineTTCandDRAC().

◆ createEncounters()

void MSDevice_SSM::createEncounters ( FoeInfoMap foes)
private

Makes new encounters for all given vehicles (these should be the ones entering the device's range in the current timestep)

Definition at line 506 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::begin, DEBUG_COND, Named::getID(), INVALID, myActiveEncounters, myExtraTime, myHolderMS, myOldestActiveEncounterBegin, SIMTIME, and updateEncounter().

Referenced by update().

◆ determineConflictPoint()

void MSDevice_SSM::determineConflictPoint ( EncounterApproachInfo eInfo)
staticprivate

◆ determinePET()

◆ determineTTCandDRAC()

void MSDevice_SSM::determineTTCandDRAC ( EncounterApproachInfo eInfo) const
private

Discriminates between different encounter types and correspondingly determines TTC and DRAC for those cases and writes the result to eInfo.ttc and eInfo.drac.

Definition at line 1147 of file MSDevice_SSM.cpp.

References computeDRAC(), computeTTC(), DEBUG_COND, MSDevice_SSM::EncounterApproachInfo::drac, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictExitTime, MSDevice_SSM::Encounter::egoID, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_CROSSING_FOLLOWER, ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER, ENCOUNTER_TYPE_MERGING_FOLLOWER, ENCOUNTER_TYPE_MERGING_LEADER, ENCOUNTER_TYPE_ONCOMING, MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictExitTime, MSDevice_SSM::Encounter::foeID, MSBaseVehicle::getLength(), MSVehicle::getSpeed(), INVALID, MAX2(), MIN2(), myComputeDRAC, myComputeTTC, myHolderMS, SIMTIME, toString(), MSDevice_SSM::EncounterApproachInfo::ttc, MSDevice_SSM::EncounterApproachInfo::type, and WRITE_WARNING.

Referenced by computeSSMs().

◆ deviceName()

const std::string MSDevice_SSM::deviceName ( ) const
inlinevirtual

return the name for this type of device

Implements MSDevice.

Definition at line 473 of file MSDevice_SSM.h.

◆ equippedByDefaultAssignmentOptions()

template<class DEVICEHOLDER >
bool MSDevice::equippedByDefaultAssignmentOptions ( const OptionsCont oc,
const std::string &  deviceName,
DEVICEHOLDER &  v,
bool  outputOptionSet,
const bool  isPerson = false 
)
staticprotectedinherited

◆ estimateConflictTimes()

void MSDevice_SSM::estimateConflictTimes ( EncounterApproachInfo eInfo)
staticprivate

Estimates the time until conflict for the vehicles based on the distance to the conflict entry points. For acceleration profiles, we assume that the acceleration is <= 0 (that is, braking is extrapolated, while for acceleration it is assumed that the vehicle will continue with its current speed)

Parameters
[in/out]eInfo Info structure for the current state of the encounter.
Note
The '[in]'-part for eInfo are its members e->ego, e->foe (to access the vehicle parameters), egoConflictEntryDist, foeConflictEntryDist, i.e., distances to the conflict entry points. The '[out]'-part for eInfo are its members type (type information may be refined) egoConflictEntryTime, foeConflictEntryTime (estimated times until the conflict entry point is reached) and egoConflictExitTime, foeConflictExitTime (estimated time until the conflict exit point is reached). Further the type of the encounter as determined by classifyEncounter(), is refined for the cases CROSSING and MERGING here.

Definition at line 857 of file MSDevice_SSM.cpp.

References DEBUG_COND, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::egoEstimatedConflictExitTime, MSDevice_SSM::Encounter::egoID, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_COLLISION, ENCOUNTER_TYPE_CROSSING, ENCOUNTER_TYPE_CROSSING_FOLLOWER, ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER, ENCOUNTER_TYPE_MERGING, ENCOUNTER_TYPE_MERGING_ADJACENT, ENCOUNTER_TYPE_MERGING_FOLLOWER, ENCOUNTER_TYPE_MERGING_LEADER, ENCOUNTER_TYPE_NOCONFLICT_AHEAD, ENCOUNTER_TYPE_ON_ADJACENT_LANES, ENCOUNTER_TYPE_ONCOMING, MSCFModel::estimateArrivalTime(), MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictEntryTime, MSDevice_SSM::EncounterApproachInfo::foeEstimatedConflictExitTime, MSDevice_SSM::Encounter::foeID, MSVehicle::getAcceleration(), MSVehicle::getCarFollowModel(), MSVehicleType::getLength(), MSVehicle::getMaxSpeedOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), INVALID, MIN2(), SIMTIME, toString(), MSDevice_SSM::EncounterApproachInfo::type, and WRITE_WARNING.

Referenced by updateEncounter().

◆ findFoeConflictLane()

const MSLane * MSDevice_SSM::findFoeConflictLane ( const MSVehicle foe,
const MSLane egoConflictLane,
double &  distToConflictLane 
) const
private

Computes the conflict lane for the foe.

Parameters
foeFoe vehicle
egoConflictLaneLane, on which the ego would enter the possible conflict
routeToConflict,Seriesof edges, that were traced back from egoConflictLane during findSurrounding Vehicles, when collecting the foe vehicle
[out]distToConflictLane,distanceto conflictlane entry link (may be negative if foe is already on the conflict lane)
Returns
Lane, on which the foe would enter the possible conflict, if foe is not on conflict course, Null-pointer is returned.

Definition at line 2393 of file MSDevice_SSM.cpp.

References DEBUG_COND, MSRoute::end(), MSVehicle::getBestLanesContinuation(), SUMOVehicle::getCurrentRouteEdge(), MSBaseVehicle::getCurrentRouteEdge(), SUMOTrafficObject::getEdge(), MSBaseVehicle::getEdge(), MSLane::getEdge(), Named::getID(), MSBaseVehicle::getID(), MSLink::getInternalLengthsAfter(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLane::getLength(), MSLane::getLinkCont(), MSLane::getLinkTo(), MSEdge::getOppositeEdge(), MSVehicle::getPositionOnLane(), SUMOVehicle::getRoute(), MSBaseVehicle::getRoute(), MSEdge::getToJunction(), MSLink::getViaLane(), MSLane::isInternal(), MSAbstractLaneChangeModel::isOpposite(), MSVehicleDevice::myHolder, myHolderMS, myRange, SIMTIME, and toString().

Referenced by classifyEncounter().

◆ findSurroundingVehicles()

void MSDevice_SSM::findSurroundingVehicles ( const MSVehicle veh,
double  range,
FoeInfoMap foeCollector 
)
static

Returns all vehicles, which are within the given range of the given vehicle.

Note
all vehicles behind and in front are collected, including vehicles on confluent edges. For instance, if the range is 20 m. and a junction lies 10 m. ahead, an upstream scan of 20 m. is performed for all incoming edges.
Parameters
vehThe ego vehicle, that forms the origin for the scan
rangeThe range to be scanned.
[in/out]foeCollector container for all collected vehicles
Returns
All vehicles within range from veh

Definition at line 2824 of file MSDevice_SSM.cpp.

References DEBUG_COND, gDebugFlag3, MSVehicle::getBestLanesContinuation(), MSLane::getEdge(), MSEdge::getFromJunction(), Named::getID(), MSBaseVehicle::getID(), MSJunction::getIncoming(), MSLink::getInternalLengthsAfter(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSLink::getLength(), MSBaseVehicle::getLength(), MSLane::getLength(), MSEdge::getLength(), MSLane::getLinkCont(), MSLane::getLinkTo(), MSLane::getOpposite(), MSVehicle::getPositionOnLane(), MSEdge::getToJunction(), getUpstreamVehicles(), getVehiclesOnJunction(), MSLink::getViaLane(), MSEdge::isInternal(), MSLane::isInternal(), MSVehicle::isOnRoad(), MSAbstractLaneChangeModel::isOpposite(), SIMTIME, and toString().

Referenced by update().

◆ flushConflicts()

void MSDevice_SSM::flushConflicts ( bool  all = false)
private

Writes out all past conflicts that have begun earlier than the oldest active encounter.

Parameters
[in]allWhether all conflicts should be flushed or only those for which no active encounters with earlier begin can exist

Definition at line 2527 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::begin, DEBUG_COND, Named::getID(), INVALID, myHolderMS, myOldestActiveEncounterBegin, myPastConflicts, SIMTIME, and writeOutConflict().

Referenced by updateAndWriteOutput(), and ~MSDevice_SSM().

◆ flushGlobalMeasures()

void MSDevice_SSM::flushGlobalMeasures ( )
private

Write out all non-encounter specific measures as headways and braking rates.

Todo:
Adapt accordingly if episode structure is implemented,
See also
computeGlobalMeasures()

Definition at line 2549 of file MSDevice_SSM.cpp.

References OutputDevice::closeTag(), DEBUG_COND, MSBaseVehicle::getID(), INVALID, makeStringWithNAs(), myBRspan, myComputeBR, myComputeSGAP, myComputeTGAP, myGlobalMeasuresTimeSpan, myHolderMS, myMaxBR, myMinSGAP, myMinTGAP, myOutputFile, mySGAPspan, myTGAPspan, myUseGeoCoords, OutputDevice::openTag(), SIMTIME, toGeo(), toString(), and OutputDevice::writeAttr().

Referenced by ~MSDevice_SSM().

◆ generateOutput()

void MSDevice_SSM::generateOutput ( ) const
virtual

Finalizes output. Called on vehicle removal.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented
See also
MSDevice::generateOutput

Reimplemented from MSDevice.

Definition at line 3217 of file MSDevice_SSM.cpp.

◆ getBoolParam()

◆ getDescription()

const std::string& MSMoveReminder::getDescription ( ) const
inlineinherited

Definition at line 228 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

◆ getDetectionRange()

◆ getEquipmentRNG()

static std::mt19937* MSDevice::getEquipmentRNG ( )
inlinestaticinherited

◆ getExtraTime()

◆ getFloatParam()

◆ getHolder()

SUMOVehicle& MSVehicleDevice::getHolder ( ) const
inlineinherited

Returns the vehicle that holds this device.

Returns
The vehicle that holds this device

Definition at line 75 of file MSVehicleDevice.h.

References MSVehicleDevice::myHolder.

Referenced by MSChargingStation::addChargeValueForOutput().

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 77 of file Named.h.

References Named::myID.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSPModel_Remote::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSLane::addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), MSRailSignal::LinkInfo::buildDriveWay(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSRailSignal::DriveWay::checkCrossingFlanks(), MSLane::checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSSwarmTrafficLightLogic::choosePolicy(), classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), IntermodalRouter< E, L, N, V >::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), libsumo::Helper::findCloserLane(), MSRailSignal::DriveWay::findFlankProtection(), findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), findSurroundingVehicles(), flushConflicts(), NBTrafficLightDefinition::forbids(), NBNodeCont::generateNodeClusters(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), GUILane::getColorValue(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), GUIMEVehicle::getEdgeID(), GUIPerson::getEdgeID(), MSMeanData::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), MSLane::getLinkTo(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), libsumo::Simulation::getParameter(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParameterWindow(), GUILane::getParentName(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), PolygonDynamics::getPolygonID(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), libsumo::Vehicle::getRouteID(), MSVehicle::getSafeFollowSpeed(), libsumo::Person::getStage(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSNet::getStoppingPlaceID(), MSLane::getSurroundingVehicles(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), getVehiclesOnJunction(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicles(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MESegment::isOpen(), RODFNet::isSource(), NIImporter_VISUM::isSplitEdge(), MSSOTLTrafficLightLogic::isThresholdPassed(), MESegment::jamThresholdForSpeed(), NBNodeShapeComputer::joinSameDirectionEdges(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), MSSOTLE2Sensors::meanVehiclesSpeed(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIImporter_SUMO::myEndElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSE2Collector::notifyLeave(), notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_Bluelight::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSE2Collector::notifyMove(), notifyMove(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Turns(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), processEncounters(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), NIXMLNodesHandler::processNodeType(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDelayBasedTrafficLightLogic::proposeProlongation(), NBNodeCont::pruneClusterFringe(), MSPModel_Striping::PState::PState(), MSOffTrafficLightLogic::rebuildPhase(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), MSLink::removeApproaching(), MSVehicle::removePassedDriveItems(), GNEJunction::removeTLSConnections(), NBNodeCont::rename(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), GNEJunction::replaceIncomingConnections(), MSVehicle::replaceParkingArea(), MSVehicle::replaceRoute(), MSBaseVehicle::replaceRouteEdges(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), MSTransportableDevice_Routing::saveState(), MSDevice_Routing::saveState(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NLEdgeControlBuilder::setDefaultStopOffsets(), MSChargingStation::setEfficency(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), MSLane::sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), MSSOTLTrafficLightLogic::trySwitch(), PolygonDynamics::update(), update(), updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMOPolygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 70 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V, BASE >::compute(), AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), MSCFModel_W99::followSpeed(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestCombination(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), NBEdge::Connection::getDescription(), MSLane::getFollowersOnConsecutive(), GUIVehicle::getLaneID(), MSVehicle::getLatOffset(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), GUIVehicle::getShadowLaneID(), GUIVehicle::getTargetLaneID(), NBEdge::init(), MSLane::isInsertionSuccess(), MESegment::isOpen(), joinNamedToString(), joinNamedToStringSorting(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), operator<<(), NBEdge::recheckLanes(), MSTriggeredRerouter::rerouteParkingArea(), MSLCM_LC2013::saveBlockerLength(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getInstances()

const std::set< MSDevice_SSM *, ComparatorNumericalIdLess > & MSDevice_SSM::getInstances ( )
static

returns all currently existing SSM devices

Definition at line 186 of file MSDevice_SSM.cpp.

References myInstances.

Referenced by MSNet::writeOutput().

◆ getLane()

const MSLane* MSMoveReminder::getLane ( ) const
inlineinherited

◆ getMeasuresAndThresholds()

◆ getNumericalID()

SUMOVehicle::NumericalID MSVehicleDevice::getNumericalID ( ) const
inlineinherited

Definition at line 79 of file MSVehicleDevice.h.

References SUMOVehicle::getNumericalID(), and MSVehicleDevice::myHolder.

◆ getOutputFilename()

◆ getParameter()

virtual std::string MSDevice::getParameter ( const std::string &  key) const
inlinevirtualinherited

try to retrieve the given parameter from this device. Throw exception for unsupported key

Reimplemented in MSDevice_ToC, MSDevice_Routing, MSDevice_Bluelight, MSDevice_Example, MSDevice_DriverState, MSDevice_Transportable, MSTransportableDevice_Routing, and MSDevice_Battery.

Definition at line 144 of file MSDevice.h.

References MSDevice::deviceName().

◆ getStringParam()

std::string MSDevice::getStringParam ( const SUMOVehicle v,
const OptionsCont oc,
std::string  paramName,
std::string  deflt,
bool  required 
)
staticprotectedinherited

◆ getUpstreamVehicles()

◆ getVehiclesOnJunction()

void MSDevice_SSM::getVehiclesOnJunction ( const MSJunction junction,
double  egoDistToConflictLane,
const MSLane *const  egoConflictLane,
FoeInfoMap foeCollector 
)
static

◆ insertDefaultAssignmentOptions()

void MSDevice::insertDefaultAssignmentOptions ( const std::string &  deviceName,
const std::string &  optionsTopic,
OptionsCont oc,
const bool  isPerson = false 
)
staticprotectedinherited

◆ insertOptions()

void MSDevice_SSM::insertOptions ( OptionsCont oc)
static

Inserts MSDevice_SSM-options.

Parameters
[filled]oc The options container to add the options to

Definition at line 208 of file MSDevice_SSM.cpp.

References OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), DEFAULT_EXTRA_TIME, DEFAULT_RANGE, OptionsCont::doRegister(), MSDevice::insertDefaultAssignmentOptions(), and toString().

Referenced by MSDevice::insertOptions().

◆ loadState()

void MSDevice::loadState ( const SUMOSAXAttributes attrs)
virtualinherited

Loads the state of the device from the given description.

The default implementation does nothing.

Parameters
[in]attrsXML attributes describing the current state

Reimplemented in MSDevice_Tripinfo, MSDevice_Vehroutes, MSDevice_Routing, and MSTransportableDevice_Routing.

Definition at line 148 of file MSDevice.cpp.

◆ makeStringWithNAs() [1/2]

std::string MSDevice_SSM::makeStringWithNAs ( std::vector< double >  v,
double  NA,
std::string  sep = " " 
)
staticprivate

make a string of a double vector and treat a special value as invalid ("NA")

Parameters
vvector to be converted to string
NAvalue to be treated as NA
sepseparator for values in string
Returns
String concatenation of the vector entries

Definition at line 2698 of file MSDevice_SSM.cpp.

References toString().

Referenced by flushGlobalMeasures(), and writeOutConflict().

◆ makeStringWithNAs() [2/2]

std::string MSDevice_SSM::makeStringWithNAs ( std::vector< double >  v,
std::vector< double >  NAs,
std::string  sep = " " 
)
staticprivate

Definition at line 2707 of file MSDevice_SSM.cpp.

References toString().

◆ notifyEnter()

bool MSDevice_SSM::notifyEnter ( SUMOTrafficObject veh,
MSMoveReminder::Notification  reason,
const MSLane enteredLane = 0 
)
virtual

Called whenever the holder enteres a lane.

Parameters
[in]vehThe entering vehicle.
[in]reasonReason for leaving the lane
[in]enteredLaneThe lane entered.
Returns
Always true to keep the device as it cannot be thrown away
See also
MSMoveReminder::notifyEnter
MSMoveReminder::Notification

Reimplemented from MSMoveReminder.

Definition at line 2785 of file MSDevice_SSM.cpp.

References Named::getID(), SUMOTrafficObject::isVehicle(), and UNUSED_PARAMETER.

◆ notifyLeave()

bool MSDevice_SSM::notifyLeave ( SUMOTrafficObject veh,
double  lastPos,
MSMoveReminder::Notification  reason,
const MSLane enteredLane = 0 
)
virtual

Called whenever the holder leaves a lane.

Parameters
[in]vehThe leaving vehicle.
[in]lastPosPosition on the lane when leaving.
[in]reasonReason for leaving the lane
[in]enteredLaneThe lane entered.
Returns
True if it did not leave the net.

Reimplemented from MSMoveReminder.

Definition at line 2798 of file MSDevice_SSM.cpp.

References Named::getID(), SUMOTrafficObject::isVehicle(), and UNUSED_PARAMETER.

◆ notifyMove()

bool MSDevice_SSM::notifyMove ( SUMOTrafficObject veh,
double  oldPos,
double  newPos,
double  newSpeed 
)
virtual

Checks for waiting steps when the vehicle moves.

Parameters
[in]vehVehicle that notifies.
[in]oldPosPosition before move.
[in]newPosPosition after move with newSpeed.
[in]newSpeedMoving speed.
Returns
Always true to keep the device as it cannot be thrown away

Reimplemented from MSMoveReminder.

Definition at line 2812 of file MSDevice_SSM.cpp.

References Named::getID(), and UNUSED_PARAMETER.

◆ notifyMoveInternal()

virtual void MSMoveReminder::notifyMoveInternal ( const SUMOTrafficObject veh,
const double  frontOnLane,
const double  timeOnLane,
const double  meanSpeedFrontOnLane,
const double  meanSpeedVehicleOnLane,
const double  travelledDistanceFrontOnLane,
const double  travelledDistanceVehicleOnLane,
const double  meanLengthOnLane 
)
inlinevirtualinherited

Internal notification about the vehicle moves.

Note
meso uses this though it never calls notifyMove()

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters
[in]vehVehicle that asks this reminder.
[in]frontOnLanetime the front of the vehicle spent on the lane.
[in]timeOnLanetime some part of the vehicle spent on the lane.
[in]meanSpeedFrontOnLaneAverage speed for the time that the front is on the lane.
[in]meanSpeedVehicleOnLaneAverage speed for the time that the vehicle is on the lane (with front or back).
[in]travelledDistanceFrontOnLanedistance travelled while overlapping with the lane.
[in]travelledDistanceVehicleOnLanedistance travelled while front was on the lane.
[in]meanLengthOnLanethe average length of the vehicle's part on the lane during the last step (==complete length in meso case)

Reimplemented in MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Emissions::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSDevice_Tripinfo, MSDevice_Transportable, and MSMeanData::MeanDataValueTracker.

Definition at line 206 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMoveReminder::updateDetector().

◆ operator=()

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

Invalidated assignment operator.

◆ processEncounters()

void MSDevice_SSM::processEncounters ( FoeInfoMap foes,
bool  forceClose = false 
)
private

Finds encounters for which the foe vehicle has disappeared from range. remainingExtraTime is decreased until it reaches zero, which triggers closing the encounter. If an ended encounter is qualified as a conflict, it is transferred to myPastConflicts All vehicles for which an encounter instance already exists (vehicle is already tracked) are removed from 'foes' during processing.

Parameters
[in]foesFoe vehicles that have been found by findSurroundingVehicles()
[in]forceClosewhether encounters for which the foe is not in range shall be closed immediately, disregarding the remaining extra time (is requested by resetEncounters()).

Definition at line 545 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::begin, closeEncounter(), MSDevice_SSM::Encounter::closingRequested, MSDevice_SSM::Encounter::currentType, DEBUG_COND, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, MSDevice_SSM::Encounter::foe, MSDevice_SSM::Encounter::foeID, Named::getID(), MSNet::getInstance(), MSDevice_SSM::Encounter::getRemainingExtraTime(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), INVALID, MIN2(), myActiveEncounters, myHolderMS, myOldestActiveEncounterBegin, SIMTIME, and updateEncounter().

Referenced by resetEncounters(), and update().

◆ qualifiesAsConflict()

bool MSDevice_SSM::qualifiesAsConflict ( Encounter e)
private

◆ removeFromVehicleUpdateValues()

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOTrafficObject veh)
protectedinherited

◆ requestsTrajectories()

◆ resetEncounters()

void MSDevice_SSM::resetEncounters ( )
private

Closes all current Encounters and moves conflicts to myPastConflicts,.

See also
processEncounters

Definition at line 537 of file MSDevice_SSM.cpp.

References processEncounters().

Referenced by updateAndWriteOutput(), and ~MSDevice_SSM().

◆ saveState()

void MSDevice::saveState ( OutputDevice out) const
virtualinherited

Saves the state of the device.

The default implementation writes a warning and does nothing.

Parameters
[in]outThe OutputDevice to write the information into

Reimplemented in MSDevice_Tripinfo, MSDevice_Vehroutes, MSDevice_Routing, MSTransportableDevice_Routing, MSDevice_FCD, and MSTransportableDevice_FCD.

Definition at line 142 of file MSDevice.cpp.

References Named::getID(), and WRITE_WARNING.

◆ setDescription()

void MSMoveReminder::setDescription ( const std::string &  description)
inlineinherited

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ setParameter()

virtual void MSDevice::setParameter ( const std::string &  key,
const std::string &  value 
)
inlinevirtualinherited

try to set the given parameter for this device. Throw exception for unsupported key

Reimplemented in MSDevice_ToC, MSDevice_Routing, MSDevice_Bluelight, MSDevice_Example, MSDevice_DriverState, MSTransportableDevice_Routing, and MSDevice_Battery.

Definition at line 149 of file MSDevice.h.

References MSDevice::deviceName(), and UNUSED_PARAMETER.

◆ storeEncountersExceedingMaxLength()

void MSDevice_SSM::storeEncountersExceedingMaxLength ( )
private

Closes encounters, whose duration exceeds the maximal encounter length. If it is classified as conflict, the encounter is saved. In any case, a new active encounter is created holding the trailing part (of length myOverlapTime) of the original.

◆ toGeo() [1/2]

void MSDevice_SSM::toGeo ( Position x)
staticprivate

convert SUMO-positions to geo coordinates (in place)

Definition at line 2603 of file MSDevice_SSM.cpp.

References GeoConvHelper::cartesian2geo(), and GeoConvHelper::getFinal().

Referenced by flushGlobalMeasures(), toGeo(), and writeOutConflict().

◆ toGeo() [2/2]

void MSDevice_SSM::toGeo ( PositionVector x)
staticprivate

convert SUMO-positions to geo coordinates (in place)

Definition at line 2608 of file MSDevice_SSM.cpp.

References toGeo().

◆ toString()

◆ update()

◆ updateAndWriteOutput()

void MSDevice_SSM::updateAndWriteOutput ( )

This is called once per time step in MSNet::writeOutput() and collects the surrounding vehicles, updates information on encounters and flushes the encounters qualified as conflicts (.

See also
thresholds) to the output file.

Definition at line 394 of file MSDevice_SSM.cpp.

References DEBUG_COND, flushConflicts(), Named::getID(), SUMOVehicle::isOnRoad(), MSVehicleDevice::myHolder, myHolderMS, resetEncounters(), SIMTIME, and update().

Referenced by MSNet::writeOutput().

◆ updateDetector()

void MSMoveReminder::updateDetector ( SUMOTrafficObject veh,
double  entryPos,
double  leavePos,
SUMOTime  entryTime,
SUMOTime  currentTime,
SUMOTime  leaveTime,
bool  cleanUp 
)
inherited

◆ updateEncounter()

bool MSDevice_SSM::updateEncounter ( Encounter e,
FoeInfo foeInfo 
)
private

Updates the encounter (adds a new trajectory point).

Returns
Returns false for new encounters, which should not be kept (if one vehicle has already left the conflict zone at encounter creation). True, otherwise.

Definition at line 703 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::add(), checkConflictEntryAndExit(), classifyEncounter(), computeSSMs(), MSDevice_SSM::EncounterApproachInfo::conflictPoint, MSDevice_SSM::Encounter::currentType, DEBUG_COND_ENCOUNTER, determineConflictPoint(), MSDevice_SSM::EncounterApproachInfo::drac, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::Encounter::egoID, MSDevice_SSM::EncounterApproachInfo::encounter, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_NOCONFLICT_AHEAD, estimateConflictTimes(), MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::Encounter::foeID, MSVehicle::getPosition(), MSVehicle::getVelocityVector(), myExtraTime, MSDevice_SSM::EncounterApproachInfo::pet, MSDevice_SSM::Encounter::resetExtraTime(), SIMTIME, MSDevice_SSM::Encounter::size(), MSDevice_SSM::EncounterApproachInfo::ttc, MSDevice_SSM::EncounterApproachInfo::type, and updatePassedEncounter().

Referenced by createEncounters(), and processEncounters().

◆ updatePassedEncounter()

void MSDevice_SSM::updatePassedEncounter ( Encounter e,
FoeInfo foeInfo,
EncounterApproachInfo eInfo 
)
private

Updates an encounter, which was classified as ENCOUNTER_TYPE_NOCONFLICT_AHEAD this may be the case because the foe is out of the detection range but the encounter is still in extra time (in this case foeInfo==0), or because the foe does not head for a lane conflicting with the route of the ego vehicle. It is also used for an ongoing crossing conflict, where only the covered distances are traced until the situation is over. (A crossing conflict is ongoing, if one vehicle entered the conflict area) Writes the type of encounter which is determined for the current state into eInfo. And if appropriate some information concerning vehicles positions in relation to a crossed crossing point (for PET calculation).

Definition at line 1635 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::closingRequested, MSDevice_SSM::Encounter::countDownExtraTime(), DEBUG_COND, DEBUG_COND_ENCOUNTER, MSDevice_SSM::Encounter::ego, MSDevice_SSM::EncounterApproachInfo::egoConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::egoConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::egoConflictExitDist, MSDevice_SSM::Encounter::egoDistsToConflict, MSDevice_SSM::Encounter::egoID, ENCOUNTER_TYPE_BOTH_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_BOTH_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_COLLISION, ENCOUNTER_TYPE_CROSSING_FOLLOWER, ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_EGO_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_EGO_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_ENTERED_CONFLICT_AREA, ENCOUNTER_TYPE_FOE_LEFT_CONFLICT_AREA, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER, ENCOUNTER_TYPE_FOLLOWING_PASSED, ENCOUNTER_TYPE_MERGING_FOLLOWER, ENCOUNTER_TYPE_MERGING_LEADER, ENCOUNTER_TYPE_MERGING_PASSED, ENCOUNTER_TYPE_NOCONFLICT_AHEAD, MSDevice_SSM::Encounter::foe, MSDevice_SSM::EncounterApproachInfo::foeConflictAreaLength, MSDevice_SSM::EncounterApproachInfo::foeConflictEntryDist, MSDevice_SSM::EncounterApproachInfo::foeConflictExitDist, MSDevice_SSM::Encounter::foeDistsToConflict, MSDevice_SSM::Encounter::foeID, MSVehicle::getLastStepDist(), MSBaseVehicle::getLength(), MSDevice_SSM::Encounter::getRemainingExtraTime(), MSBaseVehicle::getWidth(), INVALID, myExtraTime, myHolderMS, MSDevice_SSM::Encounter::resetExtraTime(), SIMTIME, TS, MSDevice_SSM::EncounterApproachInfo::type, and MSDevice_SSM::Encounter::typeSpan.

Referenced by updateEncounter().

◆ useGeoCoords()

◆ writeOutConflict()

Field Documentation

◆ createdOutputFiles

std::set< std::string > MSDevice_SSM::createdOutputFiles
staticprivate

remember which files were created already (don't duplicate xml root-elements)

Definition at line 743 of file MSDevice_SSM.h.

Referenced by cleanup(), and MSDevice_SSM().

◆ issuedParameterWarnFlags

int MSDevice_SSM::issuedParameterWarnFlags = 0
staticprivate

bitset storing info whether warning has already been issued about unset parameter (warn only once!)

Definition at line 747 of file MSDevice_SSM.h.

Referenced by getDetectionRange(), getExtraTime(), getMeasuresAndThresholds(), getOutputFilename(), requestsTrajectories(), and useGeoCoords().

◆ myActiveEncounters

EncounterVector MSDevice_SSM::myActiveEncounters
private

Definition at line 713 of file MSDevice_SSM.h.

Referenced by createEncounters(), MSDevice_SSM(), processEncounters(), and update().

◆ myBRspan

std::vector<double> MSDevice_SSM::myBRspan
private

All values for brake rate.

Definition at line 726 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myComputeBR

bool MSDevice_SSM::myComputeBR
private

Definition at line 705 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), flushGlobalMeasures(), and MSDevice_SSM().

◆ myComputeDRAC

bool MSDevice_SSM::myComputeDRAC
private

◆ myComputePET

bool MSDevice_SSM::myComputePET
private

Definition at line 705 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM(), qualifiesAsConflict(), and writeOutConflict().

◆ myComputeSGAP

bool MSDevice_SSM::myComputeSGAP
private

Definition at line 705 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), flushGlobalMeasures(), and MSDevice_SSM().

◆ myComputeTGAP

bool MSDevice_SSM::myComputeTGAP
private

Definition at line 705 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), flushGlobalMeasures(), and MSDevice_SSM().

◆ myComputeTTC

bool MSDevice_SSM::myComputeTTC
private

Flags for switching on / off comutation of different SSMs, derived from myMeasures.

Definition at line 705 of file MSDevice_SSM.h.

Referenced by computeSSMs(), determineTTCandDRAC(), MSDevice_SSM(), qualifiesAsConflict(), and writeOutConflict().

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 240 of file MSMoveReminder.h.

Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().

◆ myEquipmentRNG

std::mt19937 MSDevice::myEquipmentRNG
staticprivateinherited

A random number generator used to choose from vtype/route distributions and computing the speed factors.

Definition at line 190 of file MSDevice.h.

Referenced by MSDevice::equippedByDefaultAssignmentOptions(), and MSDevice::getEquipmentRNG().

◆ myExplicitIDs

std::map< std::string, std::set< std::string > > MSDevice::myExplicitIDs
staticprivateinherited

vehicles which explicitly carry a device, sorted by device, first

Definition at line 187 of file MSDevice.h.

Referenced by MSDevice::equippedByDefaultAssignmentOptions().

◆ myExtraTime

double MSDevice_SSM::myExtraTime
private

Extra time in seconds to be logged after a conflict is over.

Definition at line 701 of file MSDevice_SSM.h.

Referenced by createEncounters(), MSDevice_SSM(), updateEncounter(), and updatePassedEncounter().

◆ myGlobalMeasuresTimeSpan

std::vector<double> MSDevice_SSM::myGlobalMeasuresTimeSpan
private

Definition at line 724 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myHolder

◆ myHolderMS

◆ myID

◆ myInstances

std::set< MSDevice_SSM *, ComparatorNumericalIdLess > * MSDevice_SSM::myInstances = new std::set<MSDevice_SSM*, ComparatorNumericalIdLess>()
staticprivate

All currently existing SSM devices.

Definition at line 61 of file MSDevice_SSM.h.

Referenced by cleanup(), getInstances(), MSDevice_SSM(), and ~MSDevice_SSM().

◆ myLane

◆ myLastVehicleUpdateValues

std::map<SUMOTrafficObject*, std::pair<SUMOTime, double> > MSMoveReminder::myLastVehicleUpdateValues
privateinherited

◆ myMaxBR

std::pair<std::pair<double, Position>, double> MSDevice_SSM::myMaxBR
private

Extremal values for the global measures (as <<<time, Position>, value>, [leaderID]>-pairs)

Definition at line 733 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myMinSGAP

std::pair<std::pair<std::pair<double, Position>, double>, std::string> MSDevice_SSM::myMinSGAP
private

Definition at line 734 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myMinTGAP

std::pair<std::pair<std::pair<double, Position>, double>, std::string> MSDevice_SSM::myMinTGAP
private

Definition at line 735 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myOldestActiveEncounterBegin

double MSDevice_SSM::myOldestActiveEncounterBegin
private

begin time of the oldest active encounter

Definition at line 715 of file MSDevice_SSM.h.

Referenced by createEncounters(), flushConflicts(), and processEncounters().

◆ myOutputFile

OutputDevice* MSDevice_SSM::myOutputFile
private

Output device.

Definition at line 740 of file MSDevice_SSM.h.

Referenced by flushGlobalMeasures(), MSDevice_SSM(), and writeOutConflict().

◆ myPastConflicts

EncounterQueue MSDevice_SSM::myPastConflicts
private

Past encounters that where qualified as conflicts and are not yet flushed to the output file.

Definition at line 717 of file MSDevice_SSM.h.

Referenced by closeEncounter(), flushConflicts(), MSDevice_SSM(), and update().

◆ myRange

double MSDevice_SSM::myRange
private

Detection range. For vehicles closer than this distance from the ego vehicle, SSMs are traced.

Definition at line 699 of file MSDevice_SSM.h.

Referenced by findFoeConflictLane(), MSDevice_SSM(), and update().

◆ mySaveTrajectories

bool MSDevice_SSM::mySaveTrajectories
private

This determines whether the whole trajectories of the vehicles (position, speed, ssms) shall be saved in the ssm-output or only the most critical value shall be reported.

Definition at line 697 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM(), and writeOutConflict().

◆ mySGAPspan

std::vector<double> MSDevice_SSM::mySGAPspan
private

All values for space gap.

Definition at line 728 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myTGAPspan

std::vector<double> MSDevice_SSM::myTGAPspan
private

All values for time gap.

Definition at line 730 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), and flushGlobalMeasures().

◆ myThresholds

std::map<std::string, double> MSDevice_SSM::myThresholds
private

Definition at line 694 of file MSDevice_SSM.h.

Referenced by computeGlobalMeasures(), MSDevice_SSM(), and qualifiesAsConflict().

◆ myUseGeoCoords

bool MSDevice_SSM::myUseGeoCoords
private

Whether to use the original coordinate system for output.

Definition at line 703 of file MSDevice_SSM.h.

Referenced by flushGlobalMeasures(), MSDevice_SSM(), and writeOutConflict().


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