Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RODFDetectorCon Class Reference

A container for RODFDetectors. More...

#include <RODFDetector.h>

Public Member Functions

bool addDetector (RODFDetector *dfd)
 
bool detectorsHaveCompleteTypes () const
 
bool detectorsHaveRoutes () const
 
int getAggFlowFor (const ROEdge *edge, SUMOTime time, SUMOTime period, const RODFDetectorFlows &flows) const
 
const RODFDetectorgetAnyDetectorForEdge (const RODFEdge *const edge) const
 
const RODFDetectorgetDetector (const std::string &id) const
 
const std::vector< RODFDetector * > & getDetectors () const
 
RODFDetectorgetModifiableDetector (const std::string &id) const
 
void guessEmptyFlows (RODFDetectorFlows &flows)
 
bool knows (const std::string &id) const
 
void mesoJoin (const std::string &nid, const std::vector< std::string > &oldids)
 
void removeDetector (const std::string &id)
 
 RODFDetectorCon ()
 
void save (const std::string &file) const
 
void saveAsPOIs (const std::string &file) const
 
void saveRoutes (const std::string &file) const
 
void setSpeedFactorAndDev (SUMOVTypeParameter &type, double maxFactor, double avgFactor, double dev, bool forceDev)
 
void writeEmitterPOIs (const std::string &file, const RODFDetectorFlows &flows)
 
void writeEmitters (const std::string &file, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, const RODFNet &net, bool writeCalibrators, bool includeUnusedRoutes, double scale, bool insertionsOnly)
 
void writeEndRerouterDetectors (const std::string &file)
 
void writeSpeedTrigger (const RODFNet *const net, const std::string &file, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 
void writeValidationDetectors (const std::string &file, bool includeSources, bool singleFile, bool friendly)
 
 ~RODFDetectorCon ()
 

Protected Member Functions

void clearDists (std::map< SUMOTime, RandomDistributor< int > * > &dists) const
 Clears the given distributions map, deleting the timed distributions.
 

Protected Attributes

std::map< std::string, std::vector< RODFDetector * > > myDetectorEdgeMap
 
std::map< std::string, RODFDetector * > myDetectorMap
 
std::vector< RODFDetector * > myDetectors
 

Private Member Functions

RODFDetectorConoperator= (const RODFDetectorCon &src)
 Invalidated assignment operator.
 
 RODFDetectorCon (const RODFDetectorCon &src)
 Invalidated copy constructor.
 

Detailed Description

A container for RODFDetectors.

Definition at line 216 of file RODFDetector.h.

Constructor & Destructor Documentation

◆ RODFDetectorCon() [1/2]

RODFDetectorCon::RODFDetectorCon ( )

Definition at line 473 of file RODFDetector.cpp.

◆ ~RODFDetectorCon()

RODFDetectorCon::~RODFDetectorCon ( )

Definition at line 476 of file RODFDetector.cpp.

References myDetectors.

◆ RODFDetectorCon() [2/2]

RODFDetectorCon::RODFDetectorCon ( const RODFDetectorCon src)
private

Invalidated copy constructor.

Member Function Documentation

◆ addDetector()

bool RODFDetectorCon::addDetector ( RODFDetector dfd)

Definition at line 484 of file RODFDetector.cpp.

References SUMOXMLDefinitions::getEdgeIDFromLane(), Named::getID(), RODFDetector::getLaneID(), myDetectorEdgeMap, myDetectorMap, and myDetectors.

Referenced by mesoJoin(), and RODFDetectorHandler::myStartElement().

Here is the caller graph for this function:

◆ clearDists()

void RODFDetectorCon::clearDists ( std::map< SUMOTime, RandomDistributor< int > * > &  dists) const
protected

Clears the given distributions map, deleting the timed distributions.

Parameters
[in]distsThe distribution map to clear

Definition at line 954 of file RODFDetector.cpp.

Referenced by writeEmitters().

Here is the caller graph for this function:

◆ detectorsHaveCompleteTypes()

bool RODFDetectorCon::detectorsHaveCompleteTypes ( ) const

Definition at line 500 of file RODFDetector.cpp.

References myDetectors, and TYPE_NOT_DEFINED.

Referenced by startComputation().

Here is the caller graph for this function:

◆ detectorsHaveRoutes()

bool RODFDetectorCon::detectorsHaveRoutes ( ) const

Definition at line 511 of file RODFDetector.cpp.

References myDetectors.

Referenced by startComputation().

Here is the caller graph for this function:

◆ getAggFlowFor()

int RODFDetectorCon::getAggFlowFor ( const ROEdge edge,
SUMOTime  time,
SUMOTime  period,
const RODFDetectorFlows flows 
) const

Definition at line 758 of file RODFDetector.cpp.

References Named::getID(), myDetectorEdgeMap, FlowDef::qLKW, FlowDef::qPKW, and UNUSED_PARAMETER.

Referenced by RODFDetector::computeSplitProbabilities().

Here is the caller graph for this function:

◆ getAnyDetectorForEdge()

const RODFDetector & RODFDetectorCon::getAnyDetectorForEdge ( const RODFEdge *const  edge) const

Definition at line 943 of file RODFDetector.cpp.

References Named::getID(), and myDetectors.

Referenced by RODFDetector::buildDestinationDistribution().

Here is the caller graph for this function:

◆ getDetector()

const RODFDetector & RODFDetectorCon::getDetector ( const std::string &  id) const

Definition at line 606 of file RODFDetector.cpp.

References myDetectorMap.

Referenced by RODFNet::buildDetectorDependencies(), RODFNet::buildEdgeFlowMap(), RODFNet::buildRoutes(), RODFNet::hasInBetweenDetectorsOnly(), RODFNet::hasSourceDetector(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), mesoJoin(), and RODFNet::mesoJoin().

Here is the caller graph for this function:

◆ getDetectors()

const std::vector< RODFDetector * > & RODFDetectorCon::getDetectors ( ) const

Definition at line 522 of file RODFDetector.cpp.

References myDetectors.

Referenced by RODFNet::buildDetectorEdgeDependencies(), RODFNet::buildRoutes(), RODFNet::computeTypes(), readDetectors(), RODFNet::removeEmptyDetectors(), RODFNet::reportEmptyDetectors(), RODFNet::revalidateFlows(), and startComputation().

Here is the caller graph for this function:

◆ getModifiableDetector()

RODFDetector & RODFDetectorCon::getModifiableDetector ( const std::string &  id) const

Definition at line 612 of file RODFDetector.cpp.

References myDetectorMap.

Referenced by RODFNet::buildDetectorDependencies().

Here is the caller graph for this function:

◆ guessEmptyFlows()

void RODFDetectorCon::guessEmptyFlows ( RODFDetectorFlows flows)

Definition at line 898 of file RODFDetector.cpp.

References RODFDetector::getFollowerDetectors(), Named::getID(), RODFDetector::getPriorDetectors(), RODFDetectorFlows::knows(), and myDetectors.

Referenced by startComputation().

Here is the caller graph for this function:

◆ knows()

bool RODFDetectorCon::knows ( const std::string &  id) const

Definition at line 618 of file RODFDetector.cpp.

References myDetectorMap.

Referenced by RODFDetFlowLoader::read().

Here is the caller graph for this function:

◆ mesoJoin()

void RODFDetectorCon::mesoJoin ( const std::string &  nid,
const std::vector< std::string > &  oldids 
)

Definition at line 962 of file RODFDetector.cpp.

References addDetector(), getDetector(), and removeDetector().

Referenced by RODFNet::mesoJoin().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ removeDetector()

void RODFDetectorCon::removeDetector ( const std::string &  id)

Definition at line 871 of file RODFDetector.cpp.

References myDetectorEdgeMap, myDetectorMap, and myDetectors.

Referenced by mesoJoin(), and RODFNet::removeEmptyDetectors().

Here is the caller graph for this function:

◆ save()

void RODFDetectorCon::save ( const std::string &  file) const

◆ saveAsPOIs()

void RODFDetectorCon::saveAsPOIs ( const std::string &  file) const

◆ saveRoutes()

void RODFDetectorCon::saveRoutes ( const std::string &  file) const

Definition at line 584 of file RODFDetector.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), myDetectors, SOURCE_DETECTOR, and OutputDevice::writeXMLHeader().

Referenced by startComputation().

Here is the caller graph for this function:

◆ setSpeedFactorAndDev()

void RODFDetectorCon::setSpeedFactorAndDev ( SUMOVTypeParameter type,
double  maxFactor,
double  avgFactor,
double  dev,
bool  forceDev 
)

Definition at line 707 of file RODFDetector.cpp.

References Distribution_Parameterized::getParameter(), SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::speedFactor, and VTYPEPARS_SPEEDFACTOR_SET.

Referenced by writeEmitters().

Here is the caller graph for this function:

◆ writeEmitterPOIs()

void RODFDetectorCon::writeEmitterPOIs ( const std::string &  file,
const RODFDetectorFlows flows 
)

◆ writeEmitters()

void RODFDetectorCon::writeEmitters ( const std::string &  file,
const RODFDetectorFlows flows,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset,
const RODFNet net,
bool  writeCalibrators,
bool  includeUnusedRoutes,
double  scale,
bool  insertionsOnly 
)

◆ writeEndRerouterDetectors()

void RODFDetectorCon::writeEndRerouterDetectors ( const std::string &  file)

Definition at line 824 of file RODFDetector.cpp.

References OutputDevice::close(), StringUtils::escapeXML(), OutputDevice::getDevice(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getType(), myDetectors, OutputDevice::openTag(), SINK_DETECTOR, SUMO_ATTR_EDGES, SUMO_ATTR_FILE, SUMO_ATTR_ID, SUMO_ATTR_POSITION, SUMO_TAG_REROUTER, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().

Referenced by startComputation().

Here is the caller graph for this function:

◆ writeSpeedTrigger()

void RODFDetectorCon::writeSpeedTrigger ( const RODFNet *const  net,
const std::string &  file,
const RODFDetectorFlows flows,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset 
)

◆ writeValidationDetectors()

void RODFDetectorCon::writeValidationDetectors ( const std::string &  file,
bool  includeSources,
bool  singleFile,
bool  friendly 
)

Field Documentation

◆ myDetectorEdgeMap

std::map<std::string, std::vector<RODFDetector*> > RODFDetectorCon::myDetectorEdgeMap
protected

Definition at line 272 of file RODFDetector.h.

Referenced by addDetector(), getAggFlowFor(), and removeDetector().

◆ myDetectorMap

std::map<std::string, RODFDetector*> RODFDetectorCon::myDetectorMap
protected

◆ myDetectors


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