SUMO - Simulation of Urban MObility
RODFDetector Class Reference

Class representing a detector within the DFROUTER. More...

#include <RODFDetector.h>

Inheritance diagram for RODFDetector:
Named

Public Member Functions

void addFollowingDetector (const RODFDetector *det)
 
void addPriorDetector (const RODFDetector *det)
 
void addRoute (RODFRouteDesc &nrd)
 
void addRoutes (RODFRouteCont *routes)
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
void buildDestinationDistribution (const RODFDetectorCon &detectors, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, const RODFNet &net, std::map< size_t, RandomDistributor< size_t > * > &into) const
 
void computeSplitProbabilities (const RODFNet *net, const RODFDetectorCon &detectors, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 
const std::set< const RODFDetector * > & getFollowerDetectors () const
 
const std::string & getID () const
 Returns the id. More...
 
const std::set< const RODFDetector * > & getPriorDetectors () const
 
const std::vector< RODFRouteDesc > & getRouteVector () const
 
const std::vector< std::map< RODFEdge *, SUMOReal > > & getSplitProbabilities () const
 
bool hasRoutes () const
 
 RODFDetector (const std::string &id, const std::string &laneID, SUMOReal pos, const RODFDetectorType type)
 Constructor. More...
 
 RODFDetector (const std::string &id, const RODFDetector &f)
 Constructor. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setType (RODFDetectorType type)
 
 ~RODFDetector ()
 Destructor. More...
 
Atomar getter methods
const std::string & getLaneID () const
 Returns the id of the lane this detector is placed on. More...
 
std::string getEdgeID () const
 Returns the id of the edge this detector is placed on. More...
 
SUMOReal getPos () const
 Returns the position at which the detector lies. More...
 
RODFDetectorType getType () const
 Returns the type of the detector. More...
 
Writing methods
bool writeEmitterDefinition (const std::string &file, const std::map< size_t, RandomDistributor< size_t > * > &dists, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, bool includeUnusedRoutes, SUMOReal scale, bool insertionsOnly, SUMOReal defaultSpeed) const
 
bool writeRoutes (std::vector< std::string > &saved, OutputDevice &out)
 
void writeSingleSpeedTrigger (const std::string &file, const RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset, SUMOReal defaultSpeed)
 
void writeEndRerouterDetectors (const std::string &file)
 

Protected Member Functions

SUMOReal computeDistanceFactor (const RODFRouteDesc &rd) const
 
int getFlowFor (const ROEdge *edge, SUMOTime time) const
 

Protected Attributes

std::set< const RODFDetector * > myFollowingDetectors
 
std::string myID
 The name of the object. More...
 
std::string myLaneID
 
SUMOReal myPosition
 
std::set< const RODFDetector * > myPriorDetectors
 
std::map< std::string, RODFEdge * > myRoute2Edge
 
RODFRouteContmyRoutes
 
std::vector< std::map< RODFEdge *, SUMOReal > > mySplitProbabilities
 
RODFDetectorType myType
 

Private Member Functions

RODFDetectoroperator= (const RODFDetector &src)
 Invalidated assignment operator. More...
 
 RODFDetector (const RODFDetector &src)
 Invalidated copy constructor. More...
 

Detailed Description

Class representing a detector within the DFROUTER.

Definition at line 88 of file RODFDetector.h.

Constructor & Destructor Documentation

RODFDetector::RODFDetector ( const std::string &  id,
const std::string &  laneID,
SUMOReal  pos,
const RODFDetectorType  type 
)

Constructor.

This constructor is used when detectors are read from a file

Parameters
[in]idThe id of the detector
[in]laneIDThe id of the lane the detector is placed at
[in]posThe position of the detector at the lane
[in]typeThe df-router type of the detector
See also
RODFDetectorType

Definition at line 65 of file RODFDetector.cpp.

RODFDetector::RODFDetector ( const std::string &  id,
const RODFDetector f 
)

Constructor.

This constructor is used when detectors shall be joined

Parameters
[in]idThe id of the detector
[in]fA detector from which routes shall be copied

Definition at line 70 of file RODFDetector.cpp.

References myRoutes.

RODFDetector::~RODFDetector ( )

Destructor.

Definition at line 79 of file RODFDetector.cpp.

References myRoutes.

RODFDetector::RODFDetector ( const RODFDetector src)
private

Invalidated copy constructor.

Member Function Documentation

void RODFDetector::addFollowingDetector ( const RODFDetector det)

Definition at line 244 of file RODFDetector.cpp.

References myFollowingDetectors.

void RODFDetector::addPriorDetector ( const RODFDetector det)

Definition at line 238 of file RODFDetector.cpp.

References myPriorDetectors.

Referenced by RODFNet::buildDetectorDependencies().

void RODFDetector::addRoute ( RODFRouteDesc nrd)

Definition at line 270 of file RODFDetector.cpp.

References RODFRouteCont::addRouteDesc(), and myRoutes.

void RODFDetector::addRoutes ( RODFRouteCont routes)

Definition at line 263 of file RODFDetector.cpp.

References myRoutes.

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

Adds this object to the given container.

Parameters

Definition at line 121 of file Named.h.

References Named::StoringVisitor::add().

void RODFDetector::buildDestinationDistribution ( const RODFDetectorCon detectors,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset,
const RODFNet net,
std::map< size_t, RandomDistributor< size_t > * > &  into 
) const
SUMOReal RODFDetector::computeDistanceFactor ( const RODFRouteDesc rd) const
protected

Definition at line 91 of file RODFDetector.cpp.

References RODFRouteDesc::edges2Pass, and SUMOReal.

std::string RODFDetector::getEdgeID ( ) const
inline

Returns the id of the edge this detector is placed on.

Returns
The id of the edge this detector is placed on

Definition at line 133 of file RODFDetector.h.

References myLaneID.

Referenced by RODFDetectorCon::writeEmitters(), and RODFDetectorCon::writeSpeedTrigger().

int RODFDetector::getFlowFor ( const ROEdge edge,
SUMOTime  time 
) const
protected
const std::set< const RODFDetector * > & RODFDetector::getFollowerDetectors ( ) const

Definition at line 256 of file RODFDetector.cpp.

References myFollowingDetectors.

Referenced by RODFDetectorCon::guessEmptyFlows().

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

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBNode::buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), 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(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), GUIViewTraffic::onGamingClick(), 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()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_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(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_JE2013::wantsChange(), MSFCDExport::write(), MSEmissionExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

const std::string& RODFDetector::getLaneID ( ) const
inline

Returns the id of the lane this detector is placed on.

Returns
The id of the lane this detector is placed on

Definition at line 125 of file RODFDetector.h.

References myLaneID.

Referenced by RODFDetectorCon::addDetector(), RODFNet::getDetectorEdge(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), RODFDetectorCon::writeSpeedTrigger(), and RODFDetectorCon::writeValidationDetectors().

SUMOReal RODFDetector::getPos ( ) const
inline

Returns the position at which the detector lies.

Returns
The position of the detector at the lane

Definition at line 141 of file RODFDetector.h.

References myPosition.

Referenced by RODFNet::buildEdgeFlowMap(), RODFNet::getAbsPos(), RODFNet::mesoJoin(), RODFDetectorCon::writeEmitters(), and RODFDetectorCon::writeValidationDetectors().

const std::set< const RODFDetector * > & RODFDetector::getPriorDetectors ( ) const

Definition at line 250 of file RODFDetector.cpp.

References myPriorDetectors.

Referenced by RODFDetectorCon::guessEmptyFlows().

const std::vector< RODFRouteDesc > & RODFDetector::getRouteVector ( ) const

Definition at line 232 of file RODFDetector.cpp.

References RODFRouteCont::get(), and myRoutes.

Referenced by RODFNet::buildDetectorDependencies().

const std::vector<std::map<RODFEdge*, SUMOReal> >& RODFDetector::getSplitProbabilities ( ) const
inline

Definition at line 194 of file RODFDetector.h.

References mySplitProbabilities.

Referenced by buildDestinationDistribution().

bool RODFDetector::hasRoutes ( ) const

Definition at line 279 of file RODFDetector.cpp.

References RODFRouteCont::get(), and myRoutes.

Referenced by RODFNet::buildDetectorDependencies().

RODFDetector& RODFDetector::operator= ( const RODFDetector src)
private

Invalidated assignment operator.

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void RODFDetector::setType ( RODFDetectorType  type)

Definition at line 85 of file RODFDetector.cpp.

References myType.

void RODFDetector::writeEndRerouterDetectors ( const std::string &  file)
bool RODFDetector::writeRoutes ( std::vector< std::string > &  saved,
OutputDevice out 
)

Definition at line 430 of file RODFDetector.cpp.

References myRoutes, and RODFRouteCont::save().

Field Documentation

std::set<const RODFDetector*> RODFDetector::myFollowingDetectors
protected

Definition at line 208 of file RODFDetector.h.

Referenced by addFollowingDetector(), and getFollowerDetectors().

std::string RODFDetector::myLaneID
protected

Definition at line 204 of file RODFDetector.h.

Referenced by getEdgeID(), getLaneID(), and writeEmitterDefinition().

SUMOReal RODFDetector::myPosition
protected

Definition at line 205 of file RODFDetector.h.

Referenced by getPos(), and writeEmitterDefinition().

std::set<const RODFDetector*> RODFDetector::myPriorDetectors
protected

Definition at line 208 of file RODFDetector.h.

Referenced by addPriorDetector(), and getPriorDetectors().

std::map<std::string, RODFEdge*> RODFDetector::myRoute2Edge
protected

Definition at line 210 of file RODFDetector.h.

Referenced by computeSplitProbabilities().

std::vector<std::map<RODFEdge*, SUMOReal> > RODFDetector::mySplitProbabilities
protected

Definition at line 209 of file RODFDetector.h.

Referenced by computeSplitProbabilities(), and getSplitProbabilities().

RODFDetectorType RODFDetector::myType
protected

Definition at line 206 of file RODFDetector.h.

Referenced by buildDestinationDistribution(), getType(), and setType().


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