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

Class representing a detector within the DFROUTER. More...

#include <RODFDetector.h>

Public Member Functions

void addFollowingDetector (RODFDetector *det)
 
void addPriorDetector (RODFDetector *det)
 
void addRoute (RODFRouteDesc &nrd)
 
void addRoutes (RODFRouteCont *routes)
 
void buildDestinationDistribution (const RODFDetectorCon &detectors, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, const RODFNet &net, std::map< size_t, RandomDistributor< size_t > * > &into) const
 
void computeSplitProbabilities (const RODFNet *net, const RODFDetectorCon &detectors, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 
const std::vector
< RODFDetector * > & 
getFollowerDetectors () const
 
const std::vector
< RODFDetector * > & 
getPriorDetectors () const
 
const std::vector
< RODFRouteDesc > & 
getRouteVector () const
 
const std::vector< std::map
< RODFEdge *, SUMOReal > > & 
getSplitProbabilities () const
 
bool hasRoutes () const
 
 RODFDetector (const std::string &id, const std::string &laneID, SUMOReal pos, const RODFDetectorType type)
 Constructor. More...
 
 RODFDetector (const std::string &id, const RODFDetector &f)
 Constructor. More...
 
void setType (RODFDetectorType type)
 
 ~RODFDetector ()
 Destructor. More...
 
Atomar getter methods
const std::string & getID () const
 Returns the ID of this detector. More...
 
const std::string & getLaneID () const
 Returns the id of the lane this detector is placed on. More...
 
std::string getEdgeID () const
 Returns the id of the edge this detector is placed on. More...
 
SUMOReal getPos () const
 Returns the position at which the detector lies. More...
 
RODFDetectorType getType () const
 Returns the type of the detector. More...
 
Writing methods
bool writeEmitterDefinition (const std::string &file, const std::map< size_t, RandomDistributor< size_t > * > &dists, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, bool includeUnusedRoutes, SUMOReal scale, bool insertionsOnly, SUMOReal defaultSpeed) const
 
bool writeRoutes (std::vector< std::string > &saved, OutputDevice &out)
 
void writeSingleSpeedTrigger (const std::string &file, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, SUMOReal defaultSpeed)
 
void writeEndRerouterDetectors (const std::string &file)
 

Protected Member Functions

SUMOReal computeDistanceFactor (const RODFRouteDesc &rd) const
 
int getFlowFor (const ROEdge *edge, SUMOTime time) const
 

Protected Attributes

std::vector< RODFDetector * > myFollowingDetectors
 
std::string myID
 
std::string myLaneID
 
SUMOReal myPosition
 
std::vector< RODFDetector * > myPriorDetectors
 
std::map< std::string, RODFEdge * > myRoute2Edge
 
RODFRouteContmyRoutes
 
std::vector< std::map
< RODFEdge *, SUMOReal > > 
mySplitProbabilities
 
RODFDetectorType myType
 

Private Member Functions

RODFDetectoroperator= (const RODFDetector &src)
 Invalidated assignment operator. More...
 
 RODFDetector (const RODFDetector &src)
 Invalidated copy constructor. More...
 

Detailed Description

Class representing a detector within the DFROUTER.

Definition at line 86 of file RODFDetector.h.

Constructor & Destructor Documentation

RODFDetector::RODFDetector ( const std::string &  id,
const std::string &  laneID,
SUMOReal  pos,
const RODFDetectorType  type 
)

Constructor.

This constructor is used when detectors are read from a file

Parameters
[in]idThe id of the detector
[in]laneIDThe id of the lane the detector is placed at
[in]posThe position of the detector at the lane
[in]typeThe df-router type of the detector
See Also
RODFDetectorType

Definition at line 63 of file RODFDetector.cpp.

RODFDetector::RODFDetector ( const std::string &  id,
const RODFDetector f 
)

Constructor.

This constructor is used when detectors shall be joined

Parameters
[in]idThe id of the detector
[in]fA detector from which routes shall be copied

Definition at line 68 of file RODFDetector.cpp.

References myRoutes.

RODFDetector::~RODFDetector ( )

Destructor.

Definition at line 77 of file RODFDetector.cpp.

References myRoutes.

RODFDetector::RODFDetector ( const RODFDetector src)
private

Invalidated copy constructor.

Member Function Documentation

void RODFDetector::addFollowingDetector ( RODFDetector det)

Definition at line 204 of file RODFDetector.cpp.

References myFollowingDetectors.

void RODFDetector::addPriorDetector ( RODFDetector det)

Definition at line 198 of file RODFDetector.cpp.

References myPriorDetectors.

void RODFDetector::addRoute ( RODFRouteDesc nrd)

Definition at line 230 of file RODFDetector.cpp.

References RODFRouteCont::addRouteDesc(), and myRoutes.

void RODFDetector::addRoutes ( RODFRouteCont routes)

Definition at line 223 of file RODFDetector.cpp.

References myRoutes.

void RODFDetector::buildDestinationDistribution ( const RODFDetectorCon detectors,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset,
const RODFNet net,
std::map< size_t, RandomDistributor< size_t > * > &  into 
) const
SUMOReal RODFDetector::computeDistanceFactor ( const RODFRouteDesc rd) const
protected

Definition at line 89 of file RODFDetector.cpp.

References RODFRouteDesc::edges2Pass, and SUMOReal.

void RODFDetector::computeSplitProbabilities ( const RODFNet net,
const RODFDetectorCon detectors,
const RODFDetectorFlows flows,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset 
)
std::string RODFDetector::getEdgeID ( ) const
inline

Returns the id of the edge this detector is placed on.

Returns
The id of the edge this detector is placed on

Definition at line 139 of file RODFDetector.h.

References myLaneID.

Referenced by RODFDetectorCon::writeEmitters(), and RODFDetectorCon::writeSpeedTrigger().

int RODFDetector::getFlowFor ( const ROEdge edge,
SUMOTime  time 
) const
protected
const std::vector< RODFDetector * > & RODFDetector::getFollowerDetectors ( ) const

Definition at line 216 of file RODFDetector.cpp.

References myFollowingDetectors.

Referenced by RODFDetectorCon::guessEmptyFlows().

const std::string& RODFDetector::getLaneID ( ) const
inline

Returns the id of the lane this detector is placed on.

Returns
The id of the lane this detector is placed on

Definition at line 131 of file RODFDetector.h.

References myLaneID.

Referenced by RODFDetectorCon::addDetector(), RODFNet::getDetectorEdge(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), RODFDetectorCon::writeSpeedTrigger(), and RODFDetectorCon::writeValidationDetectors().

SUMOReal RODFDetector::getPos ( ) const
inline

Returns the position at which the detector lies.

Returns
The position of the detector at the lane

Definition at line 147 of file RODFDetector.h.

References myPosition.

Referenced by RODFNet::buildEdgeFlowMap(), RODFNet::getAbsPos(), RODFNet::mesoJoin(), RODFDetectorCon::writeEmitters(), and RODFDetectorCon::writeValidationDetectors().

const std::vector< RODFDetector * > & RODFDetector::getPriorDetectors ( ) const

Definition at line 210 of file RODFDetector.cpp.

References myPriorDetectors.

Referenced by RODFDetectorCon::guessEmptyFlows().

const std::vector< RODFRouteDesc > & RODFDetector::getRouteVector ( ) const

Definition at line 192 of file RODFDetector.cpp.

References RODFRouteCont::get(), and myRoutes.

Referenced by RODFNet::buildDetectorDependencies().

const std::vector<std::map<RODFEdge*, SUMOReal> >& RODFDetector::getSplitProbabilities ( ) const
inline

Definition at line 200 of file RODFDetector.h.

References mySplitProbabilities.

Referenced by buildDestinationDistribution().

bool RODFDetector::hasRoutes ( ) const

Definition at line 239 of file RODFDetector.cpp.

References RODFRouteCont::get(), and myRoutes.

Referenced by RODFNet::buildDetectorDependencies().

RODFDetector& RODFDetector::operator= ( const RODFDetector src)
private

Invalidated assignment operator.

void RODFDetector::setType ( RODFDetectorType  type)

Definition at line 83 of file RODFDetector.cpp.

References myType.

void RODFDetector::writeEndRerouterDetectors ( const std::string &  file)
bool RODFDetector::writeRoutes ( std::vector< std::string > &  saved,
OutputDevice out 
)

Definition at line 346 of file RODFDetector.cpp.

References myRoutes, and RODFRouteCont::save().

void RODFDetector::writeSingleSpeedTrigger ( const std::string &  file,
const RODFDetectorFlows flows,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset,
SUMOReal  defaultSpeed 
)

Field Documentation

std::vector<RODFDetector*> RODFDetector::myFollowingDetectors
protected

Definition at line 215 of file RODFDetector.h.

Referenced by addFollowingDetector(), and getFollowerDetectors().

std::string RODFDetector::myID
protected
std::string RODFDetector::myLaneID
protected

Definition at line 211 of file RODFDetector.h.

Referenced by getEdgeID(), getLaneID(), and writeEmitterDefinition().

SUMOReal RODFDetector::myPosition
protected

Definition at line 212 of file RODFDetector.h.

Referenced by getPos(), and writeEmitterDefinition().

std::vector<RODFDetector*> RODFDetector::myPriorDetectors
protected

Definition at line 215 of file RODFDetector.h.

Referenced by addPriorDetector(), and getPriorDetectors().

std::map<std::string, RODFEdge*> RODFDetector::myRoute2Edge
protected

Definition at line 217 of file RODFDetector.h.

Referenced by computeSplitProbabilities().

std::vector<std::map<RODFEdge*, SUMOReal> > RODFDetector::mySplitProbabilities
protected

Definition at line 216 of file RODFDetector.h.

Referenced by computeSplitProbabilities(), and getSplitProbabilities().

RODFDetectorType RODFDetector::myType
protected

Definition at line 213 of file RODFDetector.h.

Referenced by buildDestinationDistribution(), getType(), and setType().


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