SUMO - Simulation of Urban MObility
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, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, const RODFNet &net, std::map< size_t, RandomDistributor< size_t > * > &into, int maxFollower) 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.
 RODFDetector (const std::string &id, const RODFDetector &f)
 Constructor.
void setType (RODFDetectorType type)
 ~RODFDetector ()
 Destructor.
Atomar getter methods
const std::string & getID () const
 Returns the ID of this detector.
const std::string & getLaneID () const
 Returns the id of the lane this detector is placed on.
std::string getEdgeID () const
 Returns the id of the edge this detector is placed on.
SUMOReal getPos () const
 Returns the position at which the detector lies.
RODFDetectorType getType () const
 Returns the type of the detector.
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.
 RODFDetector (const RODFDetector &src)
 Invalidated copy constructor.

Detailed Description

Class representing a detector within the DFROUTER.

Definition at line 87 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 61 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 66 of file RODFDetector.cpp.

References myRoutes.

Destructor.

Definition at line 75 of file RODFDetector.cpp.

References myRoutes.

RODFDetector::RODFDetector ( const RODFDetector src) [private]

Invalidated copy constructor.


Member Function Documentation

Definition at line 208 of file RODFDetector.cpp.

References myFollowingDetectors.

Definition at line 202 of file RODFDetector.cpp.

References myPriorDetectors.

Definition at line 234 of file RODFDetector.cpp.

References RODFRouteCont::addRouteDesc(), and myRoutes.

Definition at line 227 of file RODFDetector.cpp.

References myRoutes.

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

Definition at line 87 of file RODFDetector.cpp.

References RODFRouteDesc::edges2Pass, and SUMOReal.

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 140 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 220 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 132 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 148 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 214 of file RODFDetector.cpp.

References myPriorDetectors.

Referenced by RODFDetectorCon::guessEmptyFlows().

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

Definition at line 196 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 203 of file RODFDetector.h.

References mySplitProbabilities.

Referenced by buildDestinationDistribution().

Definition at line 243 of file RODFDetector.cpp.

References RODFRouteCont::get(), and myRoutes.

Referenced by RODFNet::buildDetectorDependencies().

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

Invalidated assignment operator.

Definition at line 81 of file RODFDetector.cpp.

References myType.

bool RODFDetector::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
void RODFDetector::writeEndRerouterDetectors ( const std::string &  file)
bool RODFDetector::writeRoutes ( std::vector< std::string > &  saved,
OutputDevice out 
)

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

Definition at line 218 of file RODFDetector.h.

Referenced by addFollowingDetector(), and getFollowerDetectors().

std::string RODFDetector::myID [protected]
std::string RODFDetector::myLaneID [protected]

Definition at line 214 of file RODFDetector.h.

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

Definition at line 215 of file RODFDetector.h.

Referenced by getPos(), and writeEmitterDefinition().

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

Definition at line 218 of file RODFDetector.h.

Referenced by addPriorDetector(), and getPriorDetectors().

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

Definition at line 220 of file RODFDetector.h.

Referenced by computeSplitProbabilities().

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

Definition at line 219 of file RODFDetector.h.

Referenced by computeSplitProbabilities(), and getSplitProbabilities().

Definition at line 216 of file RODFDetector.h.

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


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines