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. | |
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. | |
RODFDetectorCon (const RODFDetectorCon &src) | |
Invalidated copy constructor. | |
A container for RODFDetectors.
Definition at line 216 of file RODFDetector.h.
RODFDetectorCon::RODFDetectorCon | ( | ) |
Definition at line 473 of file RODFDetector.cpp.
RODFDetectorCon::~RODFDetectorCon | ( | ) |
Definition at line 476 of file RODFDetector.cpp.
References myDetectors.
|
private |
Invalidated copy constructor.
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().
|
protected |
Clears the given distributions map, deleting the timed distributions.
[in] | dists | The distribution map to clear |
Definition at line 954 of file RODFDetector.cpp.
Referenced by writeEmitters().
bool RODFDetectorCon::detectorsHaveCompleteTypes | ( | ) | const |
Definition at line 500 of file RODFDetector.cpp.
References myDetectors, and TYPE_NOT_DEFINED.
Referenced by startComputation().
bool RODFDetectorCon::detectorsHaveRoutes | ( | ) | const |
Definition at line 511 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 758 of file RODFDetector.cpp.
References Named::getID(), myDetectorEdgeMap, FlowDef::qLKW, FlowDef::qPKW, and UNUSED_PARAMETER.
Referenced by RODFDetector::computeSplitProbabilities().
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().
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().
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().
RODFDetector & RODFDetectorCon::getModifiableDetector | ( | const std::string & | id | ) | const |
Definition at line 612 of file RODFDetector.cpp.
References myDetectorMap.
Referenced by RODFNet::buildDetectorDependencies().
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().
bool RODFDetectorCon::knows | ( | const std::string & | id | ) | const |
Definition at line 618 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 962 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 871 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 528 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 556 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 584 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), myDetectors, SOURCE_DETECTOR, and OutputDevice::writeXMLHeader().
Referenced by startComputation().
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().
void RODFDetectorCon::writeEmitterPOIs | ( | const std::string & | file, |
const RODFDetectorFlows & | flows | ||
) |
Definition at line 726 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, 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 624 of file RODFDetector.cpp.
References BETWEEN_DETECTOR, RODFDetector::buildDestinationDistribution(), clearDists(), OutputDevice::close(), OutputDevice::closeTag(), RODFDetector::computeSplitProbabilities(), 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(), ROEdge::getSpeedLimit(), OptionsCont::getString(), RODFDetector::getType(), OptionsCont::isDefault(), RODFDetectorFlows::knows(), MAX2(), myDetectors, OutputDevice::openTag(), SUMOVTypeParameter::parametersSet, setSpeedFactorAndDev(), 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 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().
void RODFDetectorCon::writeSpeedTrigger | ( | const RODFNet *const | net, |
const std::string & | file, | ||
const RODFDetectorFlows & | flows, | ||
SUMOTime | startTime, | ||
SUMOTime | endTime, | ||
SUMOTime | stepOffset | ||
) |
Definition at line 802 of file RODFDetector.cpp.
References OutputDevice::close(), OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::getDevice(), RONet::getEdge(), RODFDetector::getEdgeID(), FileHelpers::getFilePath(), Named::getID(), RODFDetector::getLaneID(), ROEdge::getSpeedLimit(), RODFDetector::getType(), RODFDetectorFlows::knows(), myDetectors, 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 840 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_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_PERIOD, SUMO_ATTR_POSITION, SUMO_TAG_E1DETECTOR, OutputDevice::writeAttr(), and OutputDevice::writeXMLHeader().
Referenced by startComputation().
|
protected |
Definition at line 272 of file RODFDetector.h.
Referenced by addDetector(), getAggFlowFor(), and removeDetector().
|
protected |
Definition at line 271 of file RODFDetector.h.
Referenced by addDetector(), getDetector(), getModifiableDetector(), knows(), and removeDetector().
|
protected |
Definition at line 270 of file RODFDetector.h.
Referenced by addDetector(), detectorsHaveCompleteTypes(), detectorsHaveRoutes(), getAnyDetectorForEdge(), getDetectors(), guessEmptyFlows(), removeDetector(), save(), saveAsPOIs(), saveRoutes(), writeEmitterPOIs(), writeEmitters(), writeEndRerouterDetectors(), writeSpeedTrigger(), writeValidationDetectors(), and ~RODFDetectorCon().