Eclipse SUMO - Simulation of Urban MObility
MSMeanData Class Referenceabstract

Data collector for edges/lanes. More...

#include <MSMeanData.h>

Inheritance diagram for MSMeanData:
Collaboration diagram for MSMeanData:

Data Structures

class  MeanDataValues
 Data structure for mean (aggregated) edge/lane values. More...
 
class  MeanDataValueTracker
 Data structure for mean (aggregated) edge/lane values for tracked vehicles. More...
 

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
virtual void detectorUpdate (const SUMOTime step)
 Updates the detector. More...
 
const std::string & getID () const
 Returns the id. More...
 
double getMaxTravelTime () const
 
double getMinSamples () const
 
void init ()
 Adds the value collectors to all relevant edges. More...
 
 MSMeanData (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 int detectPersons, const double minSamples, const double maxTravelTime, const std::string &vTypes)
 Constructor. More...
 
void setID (const std::string &newID)
 resets the id More...
 
virtual ~MSMeanData ()
 Destructor. More...
 

Static Public Member Functions

template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 

Protected Member Functions

virtual MSMeanData::MeanDataValuescreateValues (MSLane *const lane, const double length, const bool doAdd) const =0
 Create an instance of MeanDataValues. More...
 
virtual std::string getEdgeID (const MSEdge *const edge)
 Return the relevant edge id. More...
 
virtual void openInterval (OutputDevice &dev, const SUMOTime startTime, const SUMOTime stopTime)
 Writes the interval opener. More...
 
void resetOnly (SUMOTime stopTime)
 Resets network value in order to allow processing of the next interval. More...
 
void writeEdge (OutputDevice &dev, const std::vector< MeanDataValues * > &edgeValues, MSEdge *edge, SUMOTime startTime, SUMOTime stopTime)
 Writes edge values into the given stream. More...
 
virtual 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. More...
 

Protected Attributes

const bool myDumpEmpty
 Whether empty lanes/edges shall be written. More...
 
std::string myID
 The name of the object. More...
 
const double myMaxTravelTime
 the maximum travel time to write More...
 
std::vector< std::vector< MeanDataValues * > > myMeasures
 Value collectors; sorted by edge, then by lane. More...
 
const double myMinSamples
 the minimum sample seconds More...
 

Private Member Functions

 MSMeanData (const MSMeanData &)
 Invalidated copy constructor. More...
 
MSMeanDataoperator= (const MSMeanData &)
 Invalidated assignment operator. More...
 

Private Attributes

const bool myAmEdgeBased
 Information whether the output shall be edge-based (not lane-based) More...
 
const SUMOTime myDumpBegin
 The first and the last time step to write information (-1 indicates always) More...
 
const SUMOTime myDumpEnd
 
const bool myDumpInternal
 Whether internal lanes/edges shall be written. More...
 
MSEdgeVector myEdges
 The corresponding first edges. More...
 
std::list< std::pair< SUMOTime, SUMOTime > > myPendingIntervals
 The intervals for which output still has to be generated (only in the tracking case) More...
 
const bool myPrintDefaults
 Whether empty lanes/edges shall be written. More...
 
const bool myTrackVehicles
 Whether vehicles are tracked. More...
 

Virtual methods to implement by derived classes

std::set< std::string > myVehicleTypes
 The vehicle types to look for (empty means all) More...
 
const int myDetectPersons
 Whether pedestrians shall be detected instead of vehicles. More...
 
virtual void reset ()
 Resets collected values. More...
 
virtual GUIDetectorWrapperbuildDetectorGUIRepresentation ()
 Builds the graphical representation. More...
 
bool vehicleApplies (const SUMOTrafficObject &veh) const
 Checks whether the detector measures vehicles of the given type. More...
 
bool isTyped () const
 Checks whether the detector is type specific. More...
 
bool detectPersons () const
 

Detailed Description

Data collector for edges/lanes.

This structure does not contain the data itself, it is stored within MeanDataValues-MoveReminder objects. This class is used to build the output, optionally, in the case of edge-based dump, aggregated over the edge's lanes.

Todo:
consider error-handling on write (using IOError)

Definition at line 59 of file MSMeanData.h.

Constructor & Destructor Documentation

◆ MSMeanData() [1/2]

MSMeanData::MSMeanData ( 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 int  detectPersons,
const double  minSamples,
const double  maxTravelTime,
const std::string &  vTypes 
)

Constructor.

Parameters
[in]idThe id of the detector
[in]dumpBeginBegin time of dump
[in]dumpEndEnd time of dump
[in]useLanesInformation whether lane-based or edge-based dump shall be generated
[in]withEmptyInformation whether empty lanes/edges shall be written
[in]withInternalInformation whether internal lanes/edges shall be written
[in]trackVehiclesInformation whether vehicles shall be tracked
[in]detectPersonsWhether pedestrians shall be detected instead of vehicles
[in]maxTravelTimethe maximum travel time to use when calculating per vehicle output
[in]defaultEffortthe value to use when calculating defaults
[in]minSamplesthe minimum number of sample seconds before the values are valid
[in]vTypesthe set of vehicle types to consider

Definition at line 407 of file MSMeanData.cpp.

◆ ~MSMeanData()

MSMeanData::~MSMeanData ( )
virtual

Destructor.

Definition at line 476 of file MSMeanData.cpp.

References myMeasures.

◆ MSMeanData() [2/2]

MSMeanData::MSMeanData ( const MSMeanData )
private

Invalidated copy constructor.

Member Function Documentation

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
[in,filled]cont The container to add this item to

Definition at line 126 of file Named.h.

References Named::StoringVisitor::add().

◆ buildDetectorGUIRepresentation()

virtual GUIDetectorWrapper* MSDetectorFileOutput::buildDetectorGUIRepresentation ( )
inlinevirtualinherited

Builds the graphical representation.

Meant to be overridden by graphical versions of the detectors

Returns
A wrapper for the detector which performs the user I/O within the GUI

Reimplemented in GUIE2Collector, GUIInductLoop, GUIE3Collector, GUIInstantInductLoop, and GUIMEInductLoop.

Definition at line 131 of file MSDetectorFileOutput.h.

◆ createValues()

virtual MSMeanData::MeanDataValues* MSMeanData::createValues ( MSLane *const  lane,
const double  length,
const bool  doAdd 
) const
protectedpure virtual

Create an instance of MeanDataValues.

Parameters
[in]laneThe lane to create for
[in]doAddwhether to add the values as reminder to the lane

Implemented in MSMeanData_Net, MSMeanData_Amitran, MSMeanData_Harmonoise, and MSMeanData_Emissions.

Referenced by init(), MSMeanData::MeanDataValueTracker::MeanDataValueTracker(), and writeEdge().

◆ detectorUpdate()

void MSMeanData::detectorUpdate ( const SUMOTime  step)
virtual

Updates the detector.

Reimplemented from MSDetectorFileOutput.

Reimplemented in MSMeanData_Harmonoise.

Definition at line 645 of file MSMeanData.cpp.

References DELTA_T, init(), and myDumpBegin.

Referenced by MSMeanData_Harmonoise::detectorUpdate().

◆ detectPersons()

bool MSDetectorFileOutput::detectPersons ( ) const
inlineinherited

◆ getEdgeID()

std::string MSMeanData::getEdgeID ( const MSEdge *const  edge)
protectedvirtual

Return the relevant edge id.

Parameters
[in]edgeThe edge to retrieve the id for

Reimplemented in MSMeanData_Amitran.

Definition at line 510 of file MSMeanData.cpp.

References Named::getID().

Referenced by writeEdge().

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 76 of file Named.h.

References Named::myID.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSPModel_Remote::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSLane::addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), MSRailSignal::LinkInfo::buildDriveWay(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSRailSignal::DriveWay::checkCrossingFlanks(), MSLane::checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), IntermodalRouter< E, L, N, V >::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNodeTypeComputer::computeNodeTypes(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), MSVehicle::Manoeuvre::configureEntryManoeuvre(), MSVehicle::Manoeuvre::configureExitManoeuvre(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSActuatedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), MSVehicle::Manoeuvre::entryManoeuvreIsComplete(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSProgram::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), libsumo::Helper::findCloserLane(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBNodeCont::generateNodeClusters(), GUITrafficLightLogicWrapper::getActiveTLLogic(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), libsumo::TrafficLight::getControlledLinks(), MSLane::getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), MSActuatedTrafficLightLogic::getDetectorPriority(), libsumo::Lane::getEdgeID(), GUIMEVehicle::getEdgeID(), GUIPerson::getEdgeID(), getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), MSLane::getLinkTo(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), GNEDialogACChooser::getObjectName(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), libsumo::Simulation::getParameter(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParameterWindow(), GUILane::getParentName(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), PolygonDynamics::getPolygonID(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), libsumo::Vehicle::getRouteID(), MSVehicle::getSafeFollowSpeed(), libsumo::Person::getStage(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSNet::getStoppingPlaceID(), MSLane::getSurroundingVehicles(), MSActuatedTrafficLightLogic::getTarget(), MSRailSignal::getTLLinkID(), MSLane::getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSEdge::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSDelayBasedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicles(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MESegment::isOpen(), RODFNet::isSource(), NIImporter_VISUM::isSplitEdge(), MSSOTLTrafficLightLogic::isThresholdPassed(), MESegment::jamThresholdForSpeed(), NBNodeShapeComputer::joinSameDirectionEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), MSSOTLE2Sensors::meanVehiclesSpeed(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIImporter_SUMO::myEndElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Bluelight::notifyMove(), MSDevice_Example::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_ToC::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), GNETLSEditorFrame::onCmdDefSwitch(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_Connectors_legacy(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Turns(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), NIXMLNodesHandler::processNodeType(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDelayBasedTrafficLightLogic::proposeProlongation(), NBNodeCont::pruneClusterFringe(), MSPModel_Striping::PState::PState(), MSOffTrafficLightLogic::rebuildPhase(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), MSLink::removeApproaching(), MSVehicle::removePassedDriveItems(), GNEJunction::removeTLSConnections(), NBNodeCont::rename(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), GNEJunction::replaceIncomingConnections(), MSVehicle::replaceParkingArea(), MSVehicle::replaceRoute(), MSBaseVehicle::replaceRouteEdges(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), MSDevice_ToC::requestToC(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), MSTransportableDevice_Routing::saveState(), MSDevice_Routing::saveState(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NLEdgeControlBuilder::setDefaultStopOffsets(), MSChargingStation::setEfficency(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), MSLane::sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), MSSOTLTrafficLightLogic::trySwitch(), PolygonDynamics::update(), MSDevice_SSM::update(), MSDevice_SSM::updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMOPolygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 69 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V >::compute(), AStarRouter< E, V >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), MSLane::detectCollisions(), MSRailSignal::DriveWay::findProtection(), NBPTLineCont::findWay(), MSCFModel_W99::followSpeed(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestCombination(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), NBEdge::Connection::getDescription(), MSLane::getFollowersOnConsecutive(), GUIVehicle::getLaneID(), MSVehicle::getLatOffset(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), GUIVehicle::getShadowLaneID(), GUIVehicle::getTargetLaneID(), NBEdge::init(), MSLane::isInsertionSuccess(), MESegment::isOpen(), joinNamedToString(), joinNamedToStringSorting(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), operator<<(), NBEdge::recheckLanes(), MSTriggeredRerouter::rerouteParkingArea(), MSLCM_LC2013::saveBlockerLength(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getMaxTravelTime()

double MSMeanData::getMaxTravelTime ( ) const
inline

Definition at line 358 of file MSMeanData.h.

References myMaxTravelTime.

◆ getMinSamples()

double MSMeanData::getMinSamples ( ) const
inline

Definition at line 354 of file MSMeanData.h.

References myMinSamples.

◆ init()

◆ isTyped()

bool MSDetectorFileOutput::isTyped ( ) const
inlineinherited

Checks whether the detector is type specific.

Returns
whether vehicle types are considered

Definition at line 162 of file MSDetectorFileOutput.h.

References MSDetectorFileOutput::myVehicleTypes.

◆ openInterval()

void MSMeanData::openInterval ( OutputDevice dev,
const SUMOTime  startTime,
const SUMOTime  stopTime 
)
protectedvirtual

Writes the interval opener.

Parameters
[in]devThe output device to write the data into
[in]startTimeFirst time step the data were gathered
[in]stopTimeLast time step the data were gathered

Reimplemented in MSMeanData_Amitran.

Definition at line 582 of file MSMeanData.cpp.

References Named::myID, OutputDevice::openTag(), SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_TAG_INTERVAL, time2string(), and OutputDevice::writeAttr().

Referenced by writeXMLOutput().

◆ operator=()

MSMeanData& MSMeanData::operator= ( const MSMeanData )
private

Invalidated assignment operator.

◆ reset()

virtual void MSDetectorFileOutput::reset ( )
inlinevirtualinherited

Resets collected values.

Please note that this is only a "hack" for coupled-tls-outputs.

See also
Command_SaveTLCoupledLaneDet
Todo:
Reckeck/refactor

Reimplemented in MSE2Collector, MSE3Collector, MSCalibrator, MSInductLoop, METriggeredCalibrator, and GUIInductLoop.

Definition at line 114 of file MSDetectorFileOutput.h.

Referenced by Command_SaveTLCoupledLaneDet::execute().

◆ resetOnly()

void MSMeanData::resetOnly ( SUMOTime  stopTime)
protected

Resets network value in order to allow processing of the next interval.

Goes through the lists of edges and starts "resetOnly" for each edge.

Parameters
[in]edgeThe last time step that is reported

Definition at line 486 of file MSMeanData.cpp.

References MESegment::getNextSegment(), MELoop::getSegmentForEdge(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, myEdges, myMeasures, MESegment::prepareDetectorForWriting(), MSMeanData::MeanDataValues::reset(), and UNUSED_PARAMETER.

Referenced by writeXMLOutput().

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ vehicleApplies()

◆ writeEdge()

void MSMeanData::writeEdge ( OutputDevice dev,
const std::vector< MeanDataValues * > &  edgeValues,
MSEdge edge,
SUMOTime  startTime,
SUMOTime  stopTime 
)
protected

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.

Parameters
[in]devThe output device to write the data into
[in]edgeValuesList of this edge's value collectors
[in]edgeThe edge to write the dump of
[in]startTimeFirst time step the data were gathered
[in]stopTimeLast time step the data were gathered
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Definition at line 516 of file MSMeanData.cpp.

References MSMeanData::MeanDataValues::addTo(), OutputDevice::closeTag(), createValues(), getEdgeID(), Named::getID(), MSMoveReminder::getLane(), MSEdge::getLanes(), MSLane::getLength(), MSEdge::getLength(), MESegment::getNextSegment(), MELoop::getSegmentForEdge(), MSLane::getSpeedLimit(), MSEdge::getSpeedLimit(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, myAmEdgeBased, myDumpEmpty, myPrintDefaults, myTrackVehicles, OutputDevice::openTag(), MESegment::prepareDetectorForWriting(), MSMeanData::MeanDataValues::reset(), SUMO_ATTR_ID, SUMO_TAG_EDGE, SUMO_TAG_LANE, MSMeanData::MeanDataValues::write(), OutputDevice::writeAttr(), and writePrefix().

Referenced by writeXMLOutput().

◆ writePrefix()

bool MSMeanData::writePrefix ( OutputDevice dev,
const MeanDataValues values,
const SumoXMLTag  tag,
const std::string  id 
) const
protectedvirtual

Checks for emptiness and writes prefix into the given stream.

Parameters
[in]devThe output device to write the data into
[in]valuesThe values to check for emptiness
[in]tagThe xml tag to write (lane / edge)
[in]idThe id for the lane / edge to write
Returns
whether further output should be generated
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Reimplemented in MSMeanData_Amitran.

Definition at line 589 of file MSMeanData.cpp.

References MSMeanData::MeanDataValues::getSamples(), MSMeanData::MeanDataValues::isEmpty(), myDumpEmpty, OutputDevice::openTag(), SUMO_ATTR_ID, and OutputDevice::writeAttr().

Referenced by writeEdge().

◆ writeXMLDetectorProlog()

void MSMeanData::writeXMLDetectorProlog ( OutputDevice dev) const
virtual

Opens the XML-output using "netstats" as root element.

Parameters
[in]devThe output device to write the root into
See also
MSDetectorFileOutput::writeXMLDetectorProlog
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Implements MSDetectorFileOutput.

Reimplemented in MSMeanData_Amitran.

Definition at line 639 of file MSMeanData.cpp.

References OutputDevice::writeXMLHeader().

◆ writeXMLOutput()

void MSMeanData::writeXMLOutput ( OutputDevice dev,
SUMOTime  startTime,
SUMOTime  stopTime 
)
virtual

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".

Parameters
[in]devThe output device to write the data into
[in]startTimeFirst time step the data were gathered
[in]stopTimeLast time step the data were gathered
See also
MSDetectorFileOutput::writeXMLOutput
write
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Implements MSDetectorFileOutput.

Definition at line 599 of file MSMeanData.cpp.

References OutputDevice::closeTag(), DELTA_T, OutputDevice::flush(), MIN2(), myDumpBegin, myDumpEnd, myEdges, myMeasures, myPendingIntervals, myTrackVehicles, openInterval(), resetOnly(), and writeEdge().

Field Documentation

◆ myAmEdgeBased

const bool MSMeanData::myAmEdgeBased
private

Information whether the output shall be edge-based (not lane-based)

Definition at line 436 of file MSMeanData.h.

Referenced by init(), and writeEdge().

◆ myDetectPersons

const int MSDetectorFileOutput::myDetectPersons
protectedinherited

Whether pedestrians shall be detected instead of vehicles.

Definition at line 175 of file MSDetectorFileOutput.h.

Referenced by MSDetectorFileOutput::detectPersons().

◆ myDumpBegin

const SUMOTime MSMeanData::myDumpBegin
private

The first and the last time step to write information (-1 indicates always)

Definition at line 439 of file MSMeanData.h.

Referenced by detectorUpdate(), and writeXMLOutput().

◆ myDumpEmpty

const bool MSMeanData::myDumpEmpty
protected

Whether empty lanes/edges shall be written.

Definition at line 432 of file MSMeanData.h.

Referenced by writeEdge(), MSMeanData_Amitran::writePrefix(), and writePrefix().

◆ myDumpEnd

const SUMOTime MSMeanData::myDumpEnd
private

Definition at line 439 of file MSMeanData.h.

Referenced by writeXMLOutput().

◆ myDumpInternal

const bool MSMeanData::myDumpInternal
private

Whether internal lanes/edges shall be written.

Definition at line 448 of file MSMeanData.h.

Referenced by init().

◆ myEdges

MSEdgeVector MSMeanData::myEdges
private

The corresponding first edges.

Definition at line 442 of file MSMeanData.h.

Referenced by init(), resetOnly(), and writeXMLOutput().

◆ myID

◆ myMaxTravelTime

const double MSMeanData::myMaxTravelTime
protected

the maximum travel time to write

Definition at line 426 of file MSMeanData.h.

Referenced by getMaxTravelTime().

◆ myMeasures

std::vector<std::vector<MeanDataValues*> > MSMeanData::myMeasures
protected

Value collectors; sorted by edge, then by lane.

Definition at line 429 of file MSMeanData.h.

Referenced by MSMeanData_Harmonoise::detectorUpdate(), init(), resetOnly(), writeXMLOutput(), and ~MSMeanData().

◆ myMinSamples

const double MSMeanData::myMinSamples
protected

the minimum sample seconds

Definition at line 423 of file MSMeanData.h.

Referenced by getMinSamples().

◆ myPendingIntervals

std::list< std::pair<SUMOTime, SUMOTime> > MSMeanData::myPendingIntervals
private

The intervals for which output still has to be generated (only in the tracking case)

Definition at line 454 of file MSMeanData.h.

Referenced by writeXMLOutput().

◆ myPrintDefaults

const bool MSMeanData::myPrintDefaults
private

Whether empty lanes/edges shall be written.

Definition at line 445 of file MSMeanData.h.

Referenced by writeEdge().

◆ myTrackVehicles

const bool MSMeanData::myTrackVehicles
private

Whether vehicles are tracked.

Definition at line 451 of file MSMeanData.h.

Referenced by init(), writeEdge(), and writeXMLOutput().

◆ myVehicleTypes

std::set<std::string> MSDetectorFileOutput::myVehicleTypes
protectedinherited

The vehicle types to look for (empty means all)

Definition at line 172 of file MSDetectorFileOutput.h.

Referenced by MSDetectorFileOutput::isTyped(), MSDetectorFileOutput::MSDetectorFileOutput(), and MSDetectorFileOutput::vehicleApplies().


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