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:
Inheritance graph
Collaboration diagram for MSDevice_SSM:
Collaboration graph

Data Structures

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

Public Types

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...
 
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 SUMOVehicle &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane)
 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 (SUMOVehicle &veh, double oldPos, double newPos, double newSpeed)
 Checks for waiting steps when the vehicle moves. More...
 
bool notifyEnter (SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Called whenever the holder enteres a lane. More...
 
bool notifyLeave (SUMOVehicle &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 (SUMOVehicle &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
 

Static Public Member Functions

static void buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice *> &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 findSurroundingVehicles (const MSVehicle &veh, double range, FoeInfoMap &foeCollector)
 Returns all vehicles, which are within the given range of the given vehicle. More...
 
static MTRandgetEquipmentRNG ()
 
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 * > & getInstances ()
 returns all currently existing SSM devices More...
 
static void getUpstreamVehicles (const MSEdge *edge, double pos, double range, double egoDistToConflictLane, const MSLane *const egoConflictLane, FoeInfoMap &foeCollector)
 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...
 

Protected Member Functions

void removeFromVehicleUpdateValues (SUMOVehicle &veh)
 

Static Protected Member Functions

Helper methods for device assignment
static void insertDefaultAssignmentOptions (const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc)
 Adds common command options that allow to assign devices to vehicles. More...
 
static bool equippedByDefaultAssignmentOptions (const OptionsCont &oc, const std::string &deviceName, SUMOVehicle &v)
 Determines whether a vehicle should get a certain device. More...
 

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
 
enum  EncounterType {
  ENCOUNTER_TYPE_NOCONFLICT, ENCOUNTER_TYPE_FOLLOWING, ENCOUNTER_TYPE_FOLLOWING_FOLLOWER, ENCOUNTER_TYPE_FOLLOWING_LEADER,
  ENCOUNTER_TYPE_MERGING, ENCOUNTER_TYPE_MERGING_LEADER, ENCOUNTER_TYPE_MERGING_FOLLOWER, ENCOUNTER_TYPE_CROSSING,
  ENCOUNTER_TYPE_CROSSING_LEADER, ENCOUNTER_TYPE_CROSSING_FOLLOWER
}
 Different types of encounters corresponding to relative positions of the vehicles. The name describes the type from the ego perspective. More...
 
typedef std::vector< Encounter * > EncounterVector
 
typedef std::map< const MSVehicle *, FoeInfo * > FoeInfoMap
 

Private Member Functions

void closeEncounter (Encounter *e)
 Finalizes the encounter and calculates SSM values. More...
 
void computeSSMs (Encounter *e)
 
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...
 
const MSLanefindFoeConflictLane (const MSVehicle *foe, const MSLane *egoConflictLane, double &distToConflictLane)
 Computes the conflict lane for the foe. More...
 
void flushConflicts (bool all=false)
 Writes out all past conflicts that have begun earlier than time t-myFrequency (i.e. no active encounter can have an earlier begin) More...
 
 MSDevice_SSM (SUMOVehicle &holder, const std::string &id, std::string outputFilename, std::vector< std::string > measures, std::vector< double > thresholds, bool trajectories, double frequency, double range)
 Constructor. More...
 
 MSDevice_SSM (const MSDevice_SSM &)
 Invalidated copy constructor. More...
 
MSDevice_SSMoperator= (const MSDevice_SSM &)
 Invalidated assignment operator. More...
 
void processEncounters (FoeInfoMap &foes)
 Finds encounters for which the foe vehicle has disappeared from range and 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 update ()
 
void updateEncounter (Encounter *e, FoeInfo *foeInfo)
 Updates the encounter (adds a new trajectory point) and deletes the foeInfo. More...
 
void writeOutConflict (Encounter *e)
 

Static Private Member Functions

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 getLoggingFrequency (const SUMOVehicle &v)
 
static bool requestsTrajectories (const SUMOVehicle &v)
 
static bool getMeasuresAndThresholds (const SUMOVehicle &v, std::string deviceID, std::vector< double > &thresholds, std::vector< std::string > &measures)
 

Private Attributes

OutputDevicemyOutputFile
 Output device. More...
 
Device parameters
std::vector< std::string > myMeasures
 
std::vector< double > myThresholds
 
bool mySaveTrajectories
 
double myFrequency
 Maximal timespan duration for a single encounter. More...
 
double myRange
 
int maxTrajectorySize
 Corresponding maximal trajectory size in points, derived from myFrequency. More...
 
bool myComputeTTC
 Flags for switching on / off comutation of different SSMs, derived from myMeasures. More...
 
bool myComputeDRAC
 
bool myComputePET
 
MSVehiclemyHolderMS
 
Internal storage for encounters/conflicts

Currently observed encounters/conflicts

EncounterVector myActiveEncounters
 
EncounterQueue myPastConflicts
 Past encounters that where qualified as conflicts and are not yet flushed to the output file. More...
 

Static Private Attributes

static std::set< MSDevice * > * instances = new std::set<MSDevice*>()
 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 60 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 183 of file MSDevice_SSM.h.

◆ EncounterVector

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

Definition at line 184 of file MSDevice_SSM.h.

◆ FoeInfoMap

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

Definition at line 185 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 

ENCOUNTER_TYPE_NOCONFLICT.

ENCOUNTER_TYPE_FOLLOWING 

ENCOUNTER_TYPE_FOLLOWING.

ENCOUNTER_TYPE_FOLLOWING_FOLLOWER 

ENCOUNTER_TYPE_FOLLOWING_FOLLOWER.

ENCOUNTER_TYPE_FOLLOWING_LEADER 

ENCOUNTER_TYPE_FOLLOWING_LEADER.

ENCOUNTER_TYPE_MERGING 

ENCOUNTER_TYPE_MERGING.

ENCOUNTER_TYPE_MERGING_LEADER 

ENCOUNTER_TYPE_MERGING_LEADER.

ENCOUNTER_TYPE_MERGING_FOLLOWER 

ENCOUNTER_TYPE_MERGING_FOLLOWER.

ENCOUNTER_TYPE_CROSSING 

ENCOUNTER_TYPE_CROSSING.

ENCOUNTER_TYPE_CROSSING_LEADER 

ENCOUNTER_TYPE_CROSSING_LEADER.

ENCOUNTER_TYPE_CROSSING_FOLLOWER 

ENCOUNTER_TYPE_CROSSING_FOLLOWER.

Definition at line 68 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 96 of file MSMoveReminder.h.

Constructor & Destructor Documentation

◆ ~MSDevice_SSM()

MSDevice_SSM::~MSDevice_SSM ( )

Destructor.

Definition at line 690 of file MSDevice_SSM.cpp.

References flushConflicts(), instances, and resetEncounters().

◆ MSDevice_SSM() [1/2]

MSDevice_SSM::MSDevice_SSM ( SUMOVehicle holder,
const std::string &  id,
std::string  outputFilename,
std::vector< std::string >  measures,
std::vector< double >  thresholds,
bool  trajectories,
double  frequency,
double  range 
)
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)
frequencyMaximal length of a single encounter.
rangeDetection range. For vehicles closer than this distance from the ego vehicle, SSMs are traced

Definition at line 652 of file MSDevice_SSM.cpp.

References OutputDevice::getDevice(), instances, joinToString(), maxTrajectorySize, myActiveEncounters, myComputeDRAC, myComputePET, myComputeTTC, myFrequency, myHolderMS, myMeasures, myOutputFile, myPastConflicts, myRange, mySaveTrajectories, myThresholds, OutputDevice::openTag(), and TS.

Referenced by buildVehicleDevices(), and deviceName().

◆ 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

Definition at line 129 of file Named.h.

References Named::StoringVisitor::add().

◆ buildVehicleDevices()

void MSDevice_SSM::buildVehicleDevices ( SUMOVehicle v,
std::vector< MSDevice *> &  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

Definition at line 112 of file MSDevice_SSM.cpp.

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

Referenced by MSDevice::buildVehicleDevices().

◆ checkOptions()

bool MSDevice::checkOptions ( OptionsCont oc)
staticinherited

check device-specific options

Parameters

Definition at line 71 of file MSDevice.cpp.

References MSDevice_Routing::checkOptions().

Referenced by MSFrame::checkOptions().

◆ cleanup()

void MSDevice_SSM::cleanup ( )
static

Clean up remaining devices instances.

Definition at line 82 of file MSDevice_SSM.cpp.

References flushConflicts(), instances, and resetEncounters().

Referenced by MSNet::clearAll().

◆ closeEncounter()

void MSDevice_SSM::closeEncounter ( Encounter e)
private

Finalizes the encounter and calculates SSM values.

Definition at line 295 of file MSDevice_SSM.cpp.

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

Referenced by deviceName(), and processEncounters().

◆ computeSSMs()

void MSDevice_SSM::computeSSMs ( Encounter e)
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 578 of file MSDevice_SSM.cpp.

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

Referenced by deviceName(), and updateEncounter().

◆ 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 215 of file MSDevice_SSM.cpp.

References MSDevice_SSM::Encounter::Encounter(), MSDevice_SSM::Encounter::foe, Named::getID(), myActiveEncounters, myHolderMS, SIMTIME, and updateEncounter().

Referenced by deviceName(), and update().

◆ deviceName()

◆ equippedByDefaultAssignmentOptions()

◆ findFoeConflictLane()

const MSLane * MSDevice_SSM::findFoeConflictLane ( const MSVehicle foe,
const MSLane egoConflictLane,
double &  distToConflictLane 
)
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 500 of file MSDevice_SSM.cpp.

References MSVehicle::getBestLanesContinuation(), MSLane::getEdge(), Named::getID(), MSBaseVehicle::getID(), MSLink::getInternalLengthsAfter(), MSVehicle::getLane(), MSLane::getLength(), MSLane::getLinkCont(), MSLane::getLinkTo(), MSVehicle::getPositionOnLane(), MSEdge::getToJunction(), MSLink::getViaLane(), MSLane::isInternal(), myRange, and SIMTIME.

Referenced by deviceName(), and updateEncounter().

◆ 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. 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.

Definition at line 727 of file MSDevice_SSM.cpp.

References MSVehicle::getBestLanesContinuation(), MSBaseVehicle::getCurrentRouteEdge(), MSLane::getEdge(), MSEdge::getFromJunction(), Named::getID(), MSBaseVehicle::getID(), MSJunction::getIncoming(), MSLink::getInternalLengthsAfter(), MSVehicle::getLane(), MSLane::getLength(), MSEdge::getLength(), MSLane::getLinkCont(), MSVehicle::getPositionOnLane(), MSEdge::getToJunction(), getUpstreamVehicles(), getVehiclesOnJunction(), MSLink::getViaLane(), MSEdge::isInternal(), MSLane::isInternal(), MSVehicle::isOnRoad(), 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 time t-myFrequency (i.e. no active encounter can have an earlier begin)

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

Definition at line 600 of file MSDevice_SSM.cpp.

References Named::getID(), myFrequency, myPastConflicts, SIMTIME, and writeOutConflict().

Referenced by cleanup(), deviceName(), update(), updateAndWriteOutput(), and ~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 1016 of file MSDevice_SSM.cpp.

References OutputDevice::closeTag(), and myOutputFile.

Referenced by deviceName().

◆ getDescription()

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

◆ getDetectionRange()

◆ getEquipmentRNG()

static MTRand* MSDevice::getEquipmentRNG ( )
inlinestaticinherited

Definition at line 91 of file MSDevice.h.

References MSDevice::deviceName(), and MSDevice::myEquipmentRNG.

Referenced by NLBuilder::loadAndRun(), and GUILoadThread::run().

◆ getHolder()

SUMOVehicle& MSDevice::getHolder ( ) const
inlineinherited

Returns the vehicle that holds this device.

Returns
The vehicle that holds this device

Definition at line 118 of file MSDevice.h.

References MSDevice::myHolder.

Referenced by MSChargingStation::addChargeValueForOutput().

◆ getID()

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

Returns the id.

Returns
The stored id

Definition at line 66 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), PCPolyContainer::add(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), MSNet::addChargingStation(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), MSNet::addParkingArea(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), ROVehicle::addStop(), MSVehicle::addStop(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NLDetectorBuilder::buildE2Detector(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), NBEdgeCont::checkGrade(), MSVehicleTransfer::checkInsertions(), NBEdgeCont::checkOverlap(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBEdge::computeAngle(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), TraCIServerAPI_Vehicle::findCloserLane(), findFoeConflictLane(), findSurroundingVehicles(), flushConflicts(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), TraCI_Vehicle::getBestLanes(), MSNet::getBusStopID(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSNet::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), TraCI_Lane::getEdgeID(), MSMeanData::getEdgeID(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), TraCI_InductionLoop::getLaneID(), TraCI_LaneArea::getLaneID(), TraCI_Vehicle::getLaneID(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), TraCI_Lane::getLinks(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSNet::getParkingAreaID(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), TraCI_Vehicle::getRoadID(), TraCI_Vehicle::getRouteID(), getUpstreamVehicles(), getVehiclesOnJunction(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), notifyMove(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::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_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), MSAbstractLaneChangeModel::primaryLaneChanged(), AGStreet::print(), processEncounters(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Person::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSDelayBasedTrafficLightLogic::proposeProlongation(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckLanes(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNodeCont::removeIsolatedRoads(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSVehicle::replaceParkingArea(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingZone(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), RONet::saveAndRemoveRoutesUntil(), MSDevice_Vehroutes::saveState(), MSDevice::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), GNEJunction::setLogicValid(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), MSStopOut::stopEnded(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), toString(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), update(), MSVehicle::updateBestLanes(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), updateEncounter(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

◆ getInstances()

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

returns all currently existing SSM devices

Definition at line 77 of file MSDevice_SSM.cpp.

References instances.

Referenced by MSNet::writeOutput().

◆ getLane()

◆ getLoggingFrequency()

◆ getMeasuresAndThresholds()

◆ getOutputFilename()

std::string MSDevice_SSM::getOutputFilename ( const SUMOVehicle v,
std::string  deviceID 
)
staticprivate

◆ 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_Example, MSDevice_Transportable, and MSDevice_Battery.

Definition at line 153 of file MSDevice.h.

References MSDevice::deviceName().

◆ getUpstreamVehicles()

void MSDevice_SSM::getUpstreamVehicles ( const MSEdge edge,
double  pos,
double  range,
double  egoDistToConflictLane,
const MSLane *const  egoConflictLane,
FoeInfoMap foeCollector 
)
static

◆ 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 
)
staticprotectedinherited

Adds common command options that allow to assign devices to vehicles.

Parameters
[in]deviceNameThe name of the device type
[in]optionsTopicThe options topic into which the options shall be added

!! describe

!! describe

!! describe

Definition at line 93 of file MSDevice.cpp.

References OptionsCont::addDescription(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().

Referenced by MSDevice_Battery::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_BTreceiver::insertOptions(), MSDevice_BTsender::insertOptions(), MSDevice_Emissions::insertOptions(), MSDevice_Routing::insertOptions(), insertOptions(), and MSDevice::setParameter().

◆ insertOptions()

void MSDevice_SSM::insertOptions ( OptionsCont oc)
static

◆ 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, and MSDevice_Vehroutes.

Definition at line 149 of file MSDevice.cpp.

Referenced by MSDevice::generateOutput().

◆ notifyEnter()

bool MSDevice_SSM::notifyEnter ( SUMOVehicle 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 700 of file MSDevice_SSM.cpp.

References MSLane::getEdge(), Named::getID(), and SUMOVehicle::getLane().

◆ notifyLeave()

bool MSDevice_SSM::notifyLeave ( SUMOVehicle 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 708 of file MSDevice_SSM.cpp.

References MSLane::getEdge(), Named::getID(), and SUMOVehicle::getLane().

◆ notifyMove()

bool MSDevice_SSM::notifyMove ( SUMOVehicle 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 717 of file MSDevice_SSM.cpp.

References Named::getID().

◆ notifyMoveInternal()

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

Internal notification about the vehicle moves.

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.

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

Definition at line 211 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMeanData::MeanDataValues::notifyMove(), and MSMoveReminder::updateDetector().

◆ operator=()

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

Invalidated assignment operator.

◆ processEncounters()

void MSDevice_SSM::processEncounters ( FoeInfoMap foes)
private

Finds encounters for which the foe vehicle has disappeared from range and 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.

Definition at line 242 of file MSDevice_SSM.cpp.

References closeEncounter(), MSDevice_SSM::Encounter::foe, Named::getID(), myActiveEncounters, myPastConflicts, qualifiesAsConflict(), SIMTIME, and updateEncounter().

Referenced by deviceName(), resetEncounters(), and update().

◆ qualifiesAsConflict()

bool MSDevice_SSM::qualifiesAsConflict ( Encounter e)
private

Tests if the SSM values exceed the threshold for qualification as conflict.

Definition at line 283 of file MSDevice_SSM.cpp.

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

Referenced by deviceName(), and processEncounters().

◆ removeFromVehicleUpdateValues()

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOVehicle veh)
protectedinherited

◆ requestsTrajectories()

◆ resetEncounters()

void MSDevice_SSM::resetEncounters ( )
private

Closes all current Encounters and moves conflicts to myPastConflicts,.

See also
processEncounters

Definition at line 234 of file MSDevice_SSM.cpp.

References processEncounters().

Referenced by cleanup(), deviceName(), 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, and MSDevice_Vehroutes.

Definition at line 143 of file MSDevice.cpp.

References Named::getID(), and WRITE_WARNING.

Referenced by MSDevice::generateOutput().

◆ setDescription()

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

◆ setID()

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 74 of file Named.h.

References Named::myID.

Referenced by Distribution_Parameterized::Distribution_Parameterized(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBNodeCont::rename(), and NBEdgeCont::rename().

◆ 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_Example, and MSDevice_Battery.

Definition at line 158 of file MSDevice.h.

References MSDevice::deviceName(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice::insertDefaultAssignmentOptions(), and UNUSED_PARAMETER.

◆ 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 180 of file MSDevice_SSM.cpp.

References flushConflicts(), SUMOVehicle::isOnRoad(), MSDevice::myHolder, resetEncounters(), and update().

Referenced by MSNet::writeOutput().

◆ updateDetector()

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

◆ updateEncounter()

◆ writeOutConflict()

Field Documentation

◆ instances

std::set< MSDevice * > * MSDevice_SSM::instances = new std::set<MSDevice*>()
staticprivate

All currently existing SSM devices.

Definition at line 64 of file MSDevice_SSM.h.

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

◆ maxTrajectorySize

int MSDevice_SSM::maxTrajectorySize
private

Corresponding maximal trajectory size in points, derived from myFrequency.

Definition at line 397 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myActiveEncounters

EncounterVector MSDevice_SSM::myActiveEncounters
private

Definition at line 407 of file MSDevice_SSM.h.

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

◆ myComputeDRAC

bool MSDevice_SSM::myComputeDRAC
private

Definition at line 399 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myComputePET

bool MSDevice_SSM::myComputePET
private

Definition at line 399 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myComputeTTC

bool MSDevice_SSM::myComputeTTC
private

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

Definition at line 399 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 243 of file MSMoveReminder.h.

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

◆ myFrequency

double MSDevice_SSM::myFrequency
private

Maximal timespan duration for a single encounter.

Todo:
rename to maxEncounterLength

Definition at line 394 of file MSDevice_SSM.h.

Referenced by flushConflicts(), and MSDevice_SSM().

◆ myHolder

◆ myHolderMS

MSVehicle* MSDevice_SSM::myHolderMS
private

Definition at line 400 of file MSDevice_SSM.h.

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

◆ myID

◆ myLane

◆ myMeasures

std::vector<std::string> MSDevice_SSM::myMeasures
private

Definition at line 389 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myOutputFile

OutputDevice* MSDevice_SSM::myOutputFile
private

Output device.

Definition at line 413 of file MSDevice_SSM.h.

Referenced by generateOutput(), 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 409 of file MSDevice_SSM.h.

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

◆ myRange

double MSDevice_SSM::myRange
private

Definition at line 395 of file MSDevice_SSM.h.

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

◆ mySaveTrajectories

bool MSDevice_SSM::mySaveTrajectories
private

Definition at line 391 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().

◆ myThresholds

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

Definition at line 390 of file MSDevice_SSM.h.

Referenced by MSDevice_SSM().


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