SUMO - Simulation of Urban MObility
|
Noise data collector for edges/lanes. More...
#include <MSMeanData_Harmonoise.h>
Data Structures | |
class | MSLaneMeanDataValues |
Data structure for mean (aggregated) edge/lane values. More... |
Public Member Functions | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. | |
virtual void | detectorUpdate (const SUMOTime step) |
Updates the detector. | |
const std::string & | getID () const |
Returns the id. | |
void | init () |
Adds the value collectors to all relevant edges. | |
MSMeanData_Harmonoise (const std::string &id, const SUMOTime dumpBegin, const SUMOTime dumpEnd, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, const SUMOReal minSamples, const SUMOReal maxTravelTime, const std::set< std::string > vTypes) | |
Constructor. | |
void | setID (const std::string &newID) |
resets the id | |
virtual | ~MSMeanData_Harmonoise () |
Destructor. | |
Methods inherited from MSDetectorFileOutput. | |
void | writeXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime) |
Writes collected values into the given stream. | |
void | writeXMLDetectorProlog (OutputDevice &dev) const |
Opens the XML-output using "netstats" as root element. | |
Virtual methods to implement by derived classes | |
virtual void | reset () |
Resets collected values. | |
virtual GUIDetectorWrapper * | buildDetectorGUIRepresentation () |
Builds the graphical representation. |
Protected Member Functions | |
MSMeanData::MeanDataValues * | createValues (MSLane *const lane, const SUMOReal length, const bool doAdd) const |
Create an instance of MeanDataValues. | |
void | resetOnly (SUMOTime stopTime) |
Resets network value in order to allow processing of the next interval. | |
void | writeEdge (OutputDevice &dev, const std::vector< MeanDataValues * > &edgeValues, MSEdge *edge, SUMOTime startTime, SUMOTime stopTime) |
Writes edge values into the given stream. | |
bool | writePrefix (OutputDevice &dev, const MeanDataValues &values, const SumoXMLTag tag, const std::string id) const |
Checks for emptiness and writes prefix into the given stream. |
Protected Attributes | |
std::string | myID |
The name of the object. | |
const SUMOReal | myMaxTravelTime |
the maximum travel time to write | |
std::vector< std::vector < MeanDataValues * > > | myMeasures |
Value collectors; sorted by edge, then by lane. | |
const SUMOReal | myMinSamples |
the minimum sample seconds | |
const std::set< std::string > | myVehicleTypes |
The vehicle types to look for (empty means all) |
Private Member Functions | |
MSMeanData_Harmonoise (const MSMeanData_Harmonoise &) | |
Invalidated copy constructor. | |
MSMeanData_Harmonoise & | operator= (const MSMeanData_Harmonoise &) |
Invalidated assignment operator. |
Noise data collector for edges/lanes.
This structure does not contain the data itself, it is stored within MSLaneMeanDataValues-MoveReminder objects. This class is used to build the output, optionally, in the case of edge-based dump, aggregated over the edge's lanes.
Definition at line 60 of file MSMeanData_Harmonoise.h.
MSMeanData_Harmonoise::MSMeanData_Harmonoise | ( | const std::string & | id, |
const SUMOTime | dumpBegin, | ||
const SUMOTime | dumpEnd, | ||
const bool | useLanes, | ||
const bool | withEmpty, | ||
const bool | printDefaults, | ||
const bool | withInternal, | ||
const bool | trackVehicles, | ||
const SUMOReal | minSamples, | ||
const SUMOReal | maxTravelTime, | ||
const std::set< std::string > | vTypes | ||
) |
Constructor.
[in] | id | The id of the detector |
[in] | dumpBegin | Begin time of dump |
[in] | dumpEnd | End time of dump |
[in] | useLanes | Information whether lane-based or edge-based dump shall be generated |
[in] | withEmpty | Information whether empty lanes/edges shall be written |
[in] | printDefaults | Information whether defaults for empty lanes/edges shall be written |
[in] | withInternal | Information whether internal lanes/edges shall be written |
[in] | trackVehicles | Information whether vehicles shall be tracked |
[in] | maxTravelTime | the maximum travel time to use when calculating per vehicle output |
[in] | minSamples | the minimum number of sample seconds before the values are valid |
[in] | vTypes | the set of vehicle types to consider |
Definition at line 127 of file MSMeanData_Harmonoise.cpp.
|
virtual |
Destructor.
Definition at line 139 of file MSMeanData_Harmonoise.cpp.
|
private |
Invalidated copy constructor.
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 114 of file Named.h.
References Named::StoringVisitor::add().
|
inlinevirtualinherited |
Builds the graphical representation.
Meant to be overridden by graphical versions of the detectors
Reimplemented in GUI_E2_ZS_Collector, GUIInductLoop, GUIE3Collector, GUI_E2_ZS_CollectorOverLanes, and GUIInstantInductLoop.
Definition at line 123 of file MSDetectorFileOutput.h.
|
protectedvirtual |
Create an instance of MeanDataValues.
[in] | lane | The lane to create for |
[in] | doAdd | whether to add the values as reminder to the lane |
Implements MSMeanData.
Definition at line 143 of file MSMeanData_Harmonoise.cpp.
References MSMeanData::myVehicleTypes.
|
virtual |
Updates the detector.
Reimplemented from MSMeanData.
Definition at line 149 of file MSMeanData_Harmonoise.cpp.
References MSMeanData::myMeasures.
|
inlineinherited |
Returns the id.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), NLDetectorBuilder::convUncontE2PosLength(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inherited |
Adds the value collectors to all relevant edges.
Definition at line 270 of file MSMeanData.cpp.
References MSMeanData::createValues(), MSEdge::EDGEFUNCTION_INTERNAL, MSNet::getEdgeControl(), MSEdgeControl::getEdges(), MSNet::getInstance(), MSGlobals::gUseMesoSim, MSMeanData::myAmEdgeBased, MSMeanData::myDumpInternal, MSMeanData::myEdges, MSMeanData::myMeasures, MSMeanData::myTrackVehicles, MSMeanData::myVehicleTypes, and MSMeanData::MeanDataValues::reset().
Referenced by MSDetectorControl::add(), and MSMeanData::detectorUpdate().
|
private |
Invalidated assignment operator.
|
inlinevirtualinherited |
Resets collected values.
Please note that this is only a "hack" for coupled-tls-outputs.
Reimplemented in MSE2Collector, MSE3Collector, MSInductLoop, and GUIInductLoop.
Definition at line 106 of file MSDetectorFileOutput.h.
Referenced by Command_SaveTLCoupledLaneDet::execute().
|
protectedinherited |
Resets network value in order to allow processing of the next interval.
Goes through the lists of edges and starts "resetOnly" for each edge.
[in] | edge | The last time step that is reported |
Reimplemented in MSMeanData_Net.
Definition at line 326 of file MSMeanData.cpp.
References MSGlobals::gUseMesoSim, MSMeanData::myEdges, MSMeanData::myMeasures, MSMeanData::MeanDataValues::reset(), and UNUSED_PARAMETER.
Referenced by MSMeanData::writeXMLOutput().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 68 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
protectedinherited |
Writes edge values into the given stream.
microsim: It is checked whether the dump shall be generated edge- or lane-wise. In the first case, the lane-data are collected and aggregated and written directly. In the second case, "writeLane" is used to write each lane's state.
[in] | dev | The output device to write the data into |
[in] | edgeValues | List of this edge's value collectors |
[in] | edge | The edge to write the dump of |
[in] | startTime | First time step the data were gathered |
[in] | stopTime | Last time step the data were gathered |
IOError | If an error on writing occurs (!!! not yet implemented) |
Definition at line 352 of file MSMeanData.cpp.
References MSMeanData::MeanDataValues::addTo(), OutputDevice::closeTag(), MSMeanData::createValues(), Named::getID(), MSMoveReminder::getLane(), MSEdge::getLanes(), MSLane::getLength(), MSEdge::getLength(), MSLane::getSpeedLimit(), MSEdge::getSpeedLimit(), MSGlobals::gUseMesoSim, MSMeanData::myAmEdgeBased, MSMeanData::myDumpEmpty, MSMeanData::myPrintDefaults, MSMeanData::myTrackVehicles, OutputDevice::openTag(), MSMeanData::MeanDataValues::reset(), SUMO_ATTR_ID, SUMO_TAG_EDGE, SUMO_TAG_LANE, SUMOReal, MSMeanData::MeanDataValues::write(), OutputDevice::writeAttr(), and MSMeanData::writePrefix().
Referenced by MSMeanData::writeXMLOutput().
|
protectedinherited |
Checks for emptiness and writes prefix into the given stream.
[in] | dev | The output device to write the data into |
[in] | values | The values to check for emptiness |
[in] | tag | The xml tag to write (lane / edge) |
[in] | id | The id for the lane / edge to write |
IOError | If an error on writing occurs (!!! not yet implemented) |
Definition at line 420 of file MSMeanData.cpp.
References MSMeanData::MeanDataValues::getSamples(), MSMeanData::MeanDataValues::isEmpty(), MSMeanData::myDumpEmpty, OutputDevice::openTag(), SUMO_ATTR_ID, and OutputDevice::writeAttr().
Referenced by MSMeanData::writeEdge().
|
virtualinherited |
Opens the XML-output using "netstats" as root element.
[in] | dev | The output device to write the root into |
IOError | If an error on writing occurs (!!! not yet implemented) |
Implements MSDetectorFileOutput.
Definition at line 470 of file MSMeanData.cpp.
References OutputDevice::writeXMLHeader().
|
virtualinherited |
Writes collected values into the given stream.
At first, it is checked whether the values for the current interval shall be written. If not, a reset is performed, only, using "resetOnly". Otherwise, both the list of single-lane edges and the list of multi-lane edges are gone through and each edge is written using "writeEdge".
[in] | dev | The output device to write the data into |
[in] | startTime | First time step the data were gathered |
[in] | stopTime | Last time step the data were gathered |
IOError | If an error on writing occurs (!!! not yet implemented) |
Implements MSDetectorFileOutput.
Definition at line 430 of file MSMeanData.cpp.
References OutputDevice::closeTag(), DELTA_T, MIN2(), MSMeanData::myDumpBegin, MSMeanData::myDumpEnd, MSMeanData::myEdges, Named::myID, MSMeanData::myMeasures, MSMeanData::myPendingIntervals, MSMeanData::myTrackVehicles, OutputDevice::openTag(), MSMeanData::resetOnly(), STEPS2TIME, SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_TAG_INTERVAL, OutputDevice::writeAttr(), and MSMeanData::writeEdge().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
protectedinherited |
the maximum travel time to write
Definition at line 417 of file MSMeanData.h.
|
protectedinherited |
Value collectors; sorted by edge, then by lane.
Definition at line 423 of file MSMeanData.h.
Referenced by detectorUpdate(), MSMeanData::init(), MSMeanData::resetOnly(), MSMeanData::writeXMLOutput(), and MSMeanData::~MSMeanData().
|
protectedinherited |
the minimum sample seconds
Definition at line 414 of file MSMeanData.h.
|
protectedinherited |
The vehicle types to look for (empty means all)
Definition at line 420 of file MSMeanData.h.
Referenced by MSMeanData_HBEFA::createValues(), createValues(), MSMeanData_Net::createValues(), MSMeanData::init(), and MSMeanData::MeanDataValues::vehicleApplies().