![]() |
Eclipse 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 | 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. 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 221 of file RODFDetector.h.
RODFDetectorCon::RODFDetectorCon | ( | ) |
Definition at line 475 of file RODFDetector.cpp.
RODFDetectorCon::~RODFDetectorCon | ( | ) |
Definition at line 478 of file RODFDetector.cpp.
|
private |
Invalidated copy constructor.
bool RODFDetectorCon::addDetector | ( | RODFDetector * | dfd | ) |
Definition at line 486 of file RODFDetector.cpp.
References Named::getID(), and RODFDetector::getLaneID().
Referenced by RODFDetectorHandler::myStartElement().
|
protected |
Clears the given distributions map, deleting the timed distributions.
[in] | dists | The distribution map to clear |
Definition at line 956 of file RODFDetector.cpp.
bool RODFDetectorCon::detectorsHaveCompleteTypes | ( | ) | const |
Definition at line 502 of file RODFDetector.cpp.
References TYPE_NOT_DEFINED.
Referenced by startComputation().
bool RODFDetectorCon::detectorsHaveRoutes | ( | ) | const |
Definition at line 513 of file RODFDetector.cpp.
Referenced by startComputation().
int RODFDetectorCon::getAggFlowFor | ( | const ROEdge * | edge, |
SUMOTime | time, | ||
SUMOTime | period, | ||
const RODFDetectorFlows & | flows | ||
) | const |
Definition at line 760 of file RODFDetector.cpp.
References Named::getID(), FlowDef::qLKW, FlowDef::qPKW, and UNUSED_PARAMETER.
Referenced by RODFDetector::computeSplitProbabilities().
const RODFDetector & RODFDetectorCon::getAnyDetectorForEdge | ( | const RODFEdge *const | edge | ) | const |
Definition at line 945 of file RODFDetector.cpp.
References Named::getID().
Referenced by RODFDetector::buildDestinationDistribution().
const RODFDetector & RODFDetectorCon::getDetector | ( | const std::string & | id | ) | const |
Definition at line 608 of file RODFDetector.cpp.
Referenced by RODFNet::buildDetectorDependencies(), RODFNet::buildEdgeFlowMap(), RODFNet::buildRoutes(), RODFNet::hasInBetweenDetectorsOnly(), RODFNet::hasSourceDetector(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), and RODFNet::mesoJoin().
const std::vector< RODFDetector * > & RODFDetectorCon::getDetectors | ( | ) | const |
Definition at line 524 of file RODFDetector.cpp.
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 614 of file RODFDetector.cpp.
Referenced by RODFNet::buildDetectorDependencies().
void RODFDetectorCon::guessEmptyFlows | ( | RODFDetectorFlows & | flows | ) |
Definition at line 900 of file RODFDetector.cpp.
References RODFDetector::getFollowerDetectors(), Named::getID(), RODFDetector::getPriorDetectors(), and RODFDetectorFlows::knows().
Referenced by startComputation().
bool RODFDetectorCon::knows | ( | const std::string & | id | ) | const |
Definition at line 620 of file RODFDetector.cpp.
Referenced by RODFDetFlowLoader::read().
void RODFDetectorCon::mesoJoin | ( | const std::string & | nid, |
const std::vector< std::string > & | oldids | ||
) |
Definition at line 964 of file RODFDetector.cpp.
References RODFDetector::RODFDetector().
Referenced by RODFNet::mesoJoin().
|
private |
Invalidated assignment operator.
void RODFDetectorCon::removeDetector | ( | const std::string & | id | ) |
Definition at line 873 of file RODFDetector.cpp.
Referenced by RODFNet::removeEmptyDetectors().
void RODFDetectorCon::save | ( | const std::string & | file | ) | const |
Definition at line 530 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, OutputDevice::close(), OutputDevice::closeTag(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), 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 558 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, RGBColor::BLUE, OutputDevice::close(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), RGBColor::GREEN, 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 586 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), SOURCE_DETECTOR, and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::setSpeedFactorAndDev | ( | SUMOVTypeParameter & | type, |
double | maxFactor, | ||
double | avgFactor, | ||
double | dev, | ||
bool | forceDev | ||
) |
Definition at line 709 of file RODFDetector.cpp.
References Distribution_Parameterized::getParameter(), NUMERICAL_EPS, SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::speedFactor, and VTYPEPARS_SPEEDFACTOR_SET.
void RODFDetectorCon::writeEmitterPOIs | ( | const std::string & | file, |
const RODFDetectorFlows & | flows | ||
) |
Definition at line 728 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, OutputDevice::close(), DISCARDED_DETECTOR, StringUtils::escapeXML(), OutputDevice::getDevice(), RODFDetectorFlows::getFlowSumSecure(), Named::getID(), RODFDetectorFlows::getMaxDetectorFlow(), OutputDevice::openTag(), SINK_DETECTOR, SOURCE_DETECTOR, SUMO_ATTR_COLOR, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE, SUMO_TAG_POI, 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, | ||
double | scale, | ||
bool | insertionsOnly | ||
) |
Definition at line 626 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, RODFDetector::buildDestinationDistribution(), OutputDevice::close(), OutputDevice::closeTag(), DEFAULT_VTYPE_ID, StringUtils::escapeXML(), RODFNet::getAvgSpeedFactorLKW(), RODFNet::getAvgSpeedFactorPKW(), OutputDevice::getDevice(), RONet::getEdge(), RODFDetector::getEdgeID(), FileHelpers::getFilePath(), OptionsCont::getFloat(), Named::getID(), RODFDetector::getLaneID(), RODFNet::getMaxSpeedFactorLKW(), RODFNet::getMaxSpeedFactorPKW(), OptionsCont::getOptions(), RODFDetector::getPos(), OptionsCont::getString(), RODFDetector::getType(), OptionsCont::isDefault(), RODFDetectorFlows::knows(), MAX2(), OutputDevice::openTag(), SUMOVTypeParameter::parametersSet, SOURCE_DETECTOR, SUMO_ATTR_FILE, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_TAG_CALIBRATOR, SVC_PASSENGER, SVC_TRUCK, VTYPEPARS_VEHICLECLASS_SET, SUMOVTypeParameter::write(), OutputDevice::writeAttr(), RODFDetector::writeEmitterDefinition(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
void RODFDetectorCon::writeEndRerouterDetectors | ( | const std::string & | file | ) |
Definition at line 826 of file RODFDetector.cpp.
References OutputDevice::close(), StringUtils::escapeXML(), OutputDevice::getDevice(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getType(), 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().
void RODFDetectorCon::writeSpeedTrigger | ( | const RODFNet *const | net, |
const std::string & | file, | ||
const RODFDetectorFlows & | flows, | ||
SUMOTime | startTime, | ||
SUMOTime | endTime, | ||
SUMOTime | stepOffset | ||
) |
Definition at line 804 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(), OutputDevice::openTag(), SINK_DETECTOR, SUMO_ATTR_FILE, SUMO_ATTR_ID, SUMO_ATTR_LANES, SUMO_TAG_VSS, 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 842 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::getDevice(), Named::getID(), RODFDetector::getLaneID(), RODFDetector::getPos(), RODFDetector::getType(), 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, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
|
protected |
Definition at line 277 of file RODFDetector.h.
|
protected |
Definition at line 276 of file RODFDetector.h.
|
protected |
Definition at line 275 of file RODFDetector.h.