SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSDevice_BTreceiver::BTreceiverUpdate Class Reference

A global update performer. More...

Inheritance diagram for MSDevice_BTreceiver::BTreceiverUpdate:
Command

Public Member Functions

void addRecognitionPoint (const SUMOReal tEnd, const Position &thisPos, const SUMOReal thisSpeed, const std::string &thisLaneID, const SUMOReal thisLanePos, const Position &otherPos, const SUMOReal otherSpeed, const std::string &otherLaneID, const SUMOReal otherLanePos, SeenDevice *otherDevice) const
 Adds a point of recognition. More...
 
 BTreceiverUpdate ()
 Constructor. More...
 
void enterRange (SUMOReal atOffset, const Position &thisPos, SUMOReal thisSpeed, const std::string &thisLaneID, SUMOReal thisLanePos, const std::string &otherID, const Position &otherPos, SUMOReal otherSpeed, const std::string &otherLaneID, SUMOReal otherLanePos, std::map< std::string, SeenDevice * > &currentlySeen)
 Informs the receiver about a sender entering it's radius. More...
 
SUMOTime execute (SUMOTime currentTime)
 Performs the update. More...
 
void leaveRange (std::map< std::string, SeenDevice * > &currentlySeen, std::map< std::string, std::vector< SeenDevice * > > &seen, const Position &thisPos, SUMOReal thisSpeed, const std::string &thisLaneID, SUMOReal thisLanePos, const std::string &otherID, const Position &otherPos, SUMOReal otherSpeed, const std::string &otherLaneID, SUMOReal otherLanePos, SUMOReal tOffset)
 Removes the sender from the currently seen devices to past episodes. More...
 
void updateVisibility (VehicleInformation &receiver, MSDevice_BTsender::VehicleInformation &sender, const Position &receiverPos, const Position &receiverD)
 Rechecks the visibility for a given receiver/sender pair. More...
 
void writeOutput (const std::string &id, const std::map< std::string, std::vector< SeenDevice * > > &seen, bool allRecognitions)
 Writes the output. More...
 
 ~BTreceiverUpdate ()
 Destructor. More...
 

Detailed Description

A global update performer.

Definition at line 335 of file MSDevice_BTreceiver.h.

Constructor & Destructor Documentation

MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate ( )
MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate ( )

Member Function Documentation

void MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint ( const SUMOReal  tEnd,
const Position thisPos,
const SUMOReal  thisSpeed,
const std::string &  thisLaneID,
const SUMOReal  thisLanePos,
const Position otherPos,
const SUMOReal  otherSpeed,
const std::string &  otherLaneID,
const SUMOReal  otherLanePos,
SeenDevice otherDevice 
) const

Adds a point of recognition.

Parameters
[in]tEndThe time of the recognition
[in]thisPosThe receiver's position at the time
[in]thisSpeedThe receiver's speed at the time
[in]thisLaneIDThe lane the observer was at
[in]thisLanePosThe position at the lane of the observer
[in]otherPosThe position of the entering sender
[in]otherSpeedThe speed of the entering sender
[in]otherLaneIDThe lane the sender was at
[in]otherLanePosThe position at the lane of the sender
[in]otherDeviceThe device of the entering sender

Definition at line 306 of file MSDevice_BTreceiver.cpp.

References MSNet::getInstance(), MSDevice_BTreceiver::SeenDevice::lastView, MAX2(), MTRand::rand(), MSDevice_BTreceiver::SeenDevice::recognitionPoints, MSDevice_BTreceiver::sRecognitionRNG, STEPS2TIME, SUMOReal, and TS.

void MSDevice_BTreceiver::BTreceiverUpdate::enterRange ( SUMOReal  atOffset,
const Position thisPos,
SUMOReal  thisSpeed,
const std::string &  thisLaneID,
SUMOReal  thisLanePos,
const std::string &  otherID,
const Position otherPos,
SUMOReal  otherSpeed,
const std::string &  otherLaneID,
SUMOReal  otherLanePos,
std::map< std::string, SeenDevice * > &  currentlySeen 
)

Informs the receiver about a sender entering it's radius.

Parameters
[in]atOffsetThe time offset to the current time step
[in]thisPosThe receiver's position at the time
[in]thisSpeedThe receiver's speed at the time
[in]thisLaneIDThe lane the observer was at
[in]thisLanePosThe position at the lane of the observer
[in]otherIDThe ID of the entering sender
[in]otherPosThe position of the entering sender
[in]otherSpeedThe speed of the entering sender
[in]otherLaneIDThe lane the sender was at
[in]otherLanePosThe position at the lane of the sender
[in]currentlySeenThe container storing episodes

Definition at line 273 of file MSDevice_BTreceiver.cpp.

References MSNet::getInstance(), and STEPS2TIME.

void MSDevice_BTreceiver::BTreceiverUpdate::leaveRange ( std::map< std::string, SeenDevice * > &  currentlySeen,
std::map< std::string, std::vector< SeenDevice * > > &  seen,
const Position thisPos,
SUMOReal  thisSpeed,
const std::string &  thisLaneID,
SUMOReal  thisLanePos,
const std::string &  otherID,
const Position otherPos,
SUMOReal  otherSpeed,
const std::string &  otherLaneID,
SUMOReal  otherLanePos,
SUMOReal  tOffset 
)

Removes the sender from the currently seen devices to past episodes.

Parameters
[in]currentlySeenThe currently seen devices
[in]seenThe lists of episodes to add this one to
[in]thisPosThe receiver's position at the time
[in]thisSpeedThe receiver's speed at the time
[in]thisLaneIDThe lane the observer was at
[in]thisLanePosThe position at the lane of the observer
[in]otherIDThe ID of the entering sender
[in]otherPosThe position of the entering sender
[in]otherSpeedThe speed of the entering sender
[in]otherLaneIDThe lane the sender was at
[in]otherLanePosThe position at the lane of the sender
[in]tOffsetThe time offset to the current time step
[in]removeWhether the sender shall be removed from this device's myCurrentlySeen

Definition at line 286 of file MSDevice_BTreceiver.cpp.

References MSNet::getInstance(), and STEPS2TIME.

void MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility ( MSDevice_BTreceiver::VehicleInformation receiver,
MSDevice_BTsender::VehicleInformation sender,
const Position receiverPos,
const Position receiverD 
)
void MSDevice_BTreceiver::BTreceiverUpdate::writeOutput ( const std::string &  id,
const std::map< std::string, std::vector< SeenDevice * > > &  seen,
bool  allRecognitions 
)

Writes the output.

Parameters
[in]idThe id of the receiver
[in]seenThe information about seen senders
[in]allRecognitionsWhether all recognitions shall be written

Definition at line 320 of file MSDevice_BTreceiver.cpp.

References OutputDevice::closeTag(), OutputDevice::getDeviceByOption(), OutputDevice::openTag(), and OutputDevice::writeAttr().


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