SUMO - Simulation of Urban MObility
|
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 RODFDetector & | getAnyDetectorForEdge (const RODFEdge *const edge) const |
const RODFDetector & | getDetector (const std::string &id) const |
const std::vector< RODFDetector * > & | getDetectors () const |
RODFDetector & | getModifiableDetector (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 | 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, SUMOReal 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< size_t, RandomDistributor< size_t > * > &dists) const |
Clears the given distributions map, deleting the timed distributions. More... | |
Protected Attributes | |
std::map< std::string, std::vector< RODFDetector * > > | myDetectorEdgeMap |
std::map< std::string, RODFDetector * > | myDetectorMap |
std::vector< RODFDetector * > | myDetectors |
Private Member Functions | |
RODFDetectorCon & | operator= (const RODFDetectorCon &src) |
Invalidated assignment operator. More... | |
RODFDetectorCon (const RODFDetectorCon &src) | |
Invalidated copy constructor. More... | |
A container for RODFDetectors.
Definition at line 227 of file RODFDetector.h.
RODFDetectorCon::RODFDetectorCon | ( | ) |
Definition at line 470 of file RODFDetector.cpp.
RODFDetectorCon::~RODFDetectorCon | ( | ) |
Definition at line 473 of file RODFDetector.cpp.
References myDetectors.
|
private |
Invalidated copy constructor.
bool RODFDetectorCon::addDetector | ( | RODFDetector * | dfd | ) |
Definition at line 481 of file RODFDetector.cpp.
References Named::getID(), RODFDetector::getLaneID(), myDetectorEdgeMap, myDetectorMap, and myDetectors.
Referenced by mesoJoin(), and RODFDetectorHandler::myStartElement().
|
protected |
Clears the given distributions map, deleting the timed distributions.
[in] | dists | The distribution map to clear |
Definition at line 902 of file RODFDetector.cpp.
Referenced by writeEmitters().
bool RODFDetectorCon::detectorsHaveCompleteTypes | ( | ) | const |
Definition at line 497 of file RODFDetector.cpp.
References myDetectors, and TYPE_NOT_DEFINED.
Referenced by startComputation().
bool RODFDetectorCon::detectorsHaveRoutes | ( | ) | const |
Definition at line 508 of file RODFDetector.cpp.
References myDetectors.
Referenced by startComputation().
int RODFDetectorCon::getAggFlowFor | ( | const ROEdge * | edge, |
SUMOTime | time, | ||
SUMOTime | period, | ||
const RODFDetectorFlows & | flows | ||
) | const |
Definition at line 706 of file RODFDetector.cpp.
References Named::getID(), myDetectorEdgeMap, FlowDef::qLKW, FlowDef::qPKW, SUMOReal, and UNUSED_PARAMETER.
Referenced by RODFDetector::computeSplitProbabilities().
const RODFDetector & RODFDetectorCon::getAnyDetectorForEdge | ( | const RODFEdge *const | edge | ) | const |
Definition at line 891 of file RODFDetector.cpp.
References Named::getID(), and myDetectors.
Referenced by RODFDetector::buildDestinationDistribution().
const RODFDetector & RODFDetectorCon::getDetector | ( | const std::string & | id | ) | const |
Definition at line 603 of file RODFDetector.cpp.
References myDetectorMap.
Referenced by RODFNet::buildDetectorDependencies(), RODFNet::buildEdgeFlowMap(), RODFNet::buildRoutes(), RODFNet::hasInBetweenDetectorsOnly(), RODFNet::hasSourceDetector(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), RODFNet::mesoJoin(), and mesoJoin().
const std::vector< RODFDetector * > & RODFDetectorCon::getDetectors | ( | ) | const |
Definition at line 519 of file RODFDetector.cpp.
References myDetectors.
Referenced by RODFNet::buildDetectorEdgeDependencies(), RODFNet::buildRoutes(), RODFNet::computeTypes(), readDetectors(), RODFNet::removeEmptyDetectors(), RODFNet::reportEmptyDetectors(), RODFNet::revalidateFlows(), and startComputation().
RODFDetector & RODFDetectorCon::getModifiableDetector | ( | const std::string & | id | ) | const |
Definition at line 609 of file RODFDetector.cpp.
References myDetectorMap.
Referenced by RODFNet::buildDetectorDependencies().
void RODFDetectorCon::guessEmptyFlows | ( | RODFDetectorFlows & | flows | ) |
Definition at line 846 of file RODFDetector.cpp.
References RODFDetector::getFollowerDetectors(), Named::getID(), RODFDetector::getPriorDetectors(), RODFDetectorFlows::knows(), and myDetectors.
Referenced by startComputation().
bool RODFDetectorCon::knows | ( | const std::string & | id | ) | const |
Definition at line 615 of file RODFDetector.cpp.
References myDetectorMap.
Referenced by RODFDetFlowLoader::read().
void RODFDetectorCon::mesoJoin | ( | const std::string & | nid, |
const std::vector< std::string > & | oldids | ||
) |
Definition at line 910 of file RODFDetector.cpp.
References addDetector(), getDetector(), and removeDetector().
Referenced by RODFNet::mesoJoin().
|
private |
Invalidated assignment operator.
void RODFDetectorCon::removeDetector | ( | const std::string & | id | ) |
Definition at line 819 of file RODFDetector.cpp.
References myDetectorEdgeMap, myDetectorMap, and myDetectors.
Referenced by mesoJoin(), and RODFNet::removeEmptyDetectors().
void RODFDetectorCon::save | ( | const std::string & | file | ) | const |
Definition at line 525 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, OutputDevice::close(), OutputDevice::closeTag(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), myDetectors, OutputDevice::openTag(), SINK_DETECTOR, SOURCE_DETECTOR, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE, SUMO_TAG_DETECTOR_DEFINITION, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::saveAsPOIs | ( | const std::string & | file | ) | const |
Definition at line 553 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, RGBColor::BLUE, OutputDevice::close(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), RGBColor::GREEN, myDetectors, OutputDevice::openTag(), RGBColor::RED, SINK_DETECTOR, SOURCE_DETECTOR, SUMO_ATTR_COLOR, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE, SUMO_TAG_POI, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::saveRoutes | ( | const std::string & | file | ) | const |
Definition at line 581 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), myDetectors, SOURCE_DETECTOR, and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeEmitterPOIs | ( | const std::string & | file, |
const RODFDetectorFlows & | flows | ||
) |
Definition at line 674 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, OutputDevice::close(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), RODFDetectorFlows::getFlowSumSecure(), Named::getID(), RODFDetectorFlows::getMaxDetectorFlow(), myDetectors, OutputDevice::openTag(), SINK_DETECTOR, SOURCE_DETECTOR, SUMO_ATTR_COLOR, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE, SUMO_TAG_POI, SUMOReal, toString(), OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeEmitters | ( | const std::string & | file, |
const RODFDetectorFlows & | flows, | ||
SUMOTime | startTime, | ||
SUMOTime | endTime, | ||
SUMOTime | stepOffset, | ||
const RODFNet & | net, | ||
bool | writeCalibrators, | ||
bool | includeUnusedRoutes, | ||
SUMOReal | scale, | ||
bool | insertionsOnly | ||
) |
Definition at line 621 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, RODFDetector::buildDestinationDistribution(), clearDists(), OutputDevice::close(), OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::getDevice(), RONet::getEdge(), RODFDetector::getEdgeID(), FileHelpers::getFilePath(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getPos(), RODFDetector::getType(), RODFDetectorFlows::knows(), myDetectors, OutputDevice::openTag(), SOURCE_DETECTOR, SUMO_ATTR_FILE, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_TAG_CALIBRATOR, SUMOReal, OutputDevice::writeAttr(), RODFDetector::writeEmitterDefinition(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeEndRerouterDetectors | ( | const std::string & | file | ) |
Definition at line 772 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, SUMOReal, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeSpeedTrigger | ( | const RODFNet *const | net, |
const std::string & | file, | ||
const RODFDetectorFlows & | flows, | ||
SUMOTime | startTime, | ||
SUMOTime | endTime, | ||
SUMOTime | stepOffset | ||
) |
Definition at line 750 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::getDevice(), RONet::getEdge(), RODFDetector::getEdgeID(), FileHelpers::getFilePath(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getType(), RODFDetectorFlows::knows(), myDetectors, OutputDevice::openTag(), SINK_DETECTOR, SUMO_ATTR_FILE, SUMO_ATTR_ID, SUMO_ATTR_LANES, SUMO_TAG_VSS, SUMOReal, OutputDevice::writeAttr(), RODFDetector::writeSingleSpeedTrigger(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeValidationDetectors | ( | const std::string & | file, |
bool | includeSources, | ||
bool | singleFile, | ||
bool | friendly | ||
) |
Definition at line 788 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::getDevice(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getPos(), RODFDetector::getType(), myDetectors, OutputDevice::openTag(), SOURCE_DETECTOR, SUMO_ATTR_FILE, SUMO_ATTR_FREQUENCY, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_TAG_E1DETECTOR, SUMOReal, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
|
protected |
Definition at line 282 of file RODFDetector.h.
Referenced by addDetector(), getAggFlowFor(), and removeDetector().
|
protected |
Definition at line 281 of file RODFDetector.h.
Referenced by addDetector(), getDetector(), getModifiableDetector(), knows(), and removeDetector().
|
protected |
Definition at line 280 of file RODFDetector.h.
Referenced by addDetector(), detectorsHaveCompleteTypes(), detectorsHaveRoutes(), getAnyDetectorForEdge(), getDetectors(), guessEmptyFlows(), removeDetector(), save(), saveAsPOIs(), saveRoutes(), writeEmitterPOIs(), writeEmitters(), writeEndRerouterDetectors(), writeSpeedTrigger(), writeValidationDetectors(), and ~RODFDetectorCon().