SUMO - Simulation of Urban MObility
|
Writes routes of vehicles passing a certain edge. More...
#include <MSRouteProbe.h>
Public Types | |
enum | Notification { NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE, NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED, NOTIFICATION_TELEPORT_ARRIVED } |
Definition of a vehicle state. More... | |
Public Member Functions | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
const std::string & | getDescription () const |
const std::string & | getID () const |
Returns the id. More... | |
const MSLane * | getLane () const |
Returns the lane the reminder works on. More... | |
MSRouteProbe (const std::string &id, const MSEdge *edge, SUMOTime begin) | |
Constructor. More... | |
virtual void | notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed) |
Internal notification about the vehicle moves. More... | |
void | setID (const std::string &newID) |
resets the id More... | |
virtual | ~MSRouteProbe () |
Destructor. More... | |
Methods inherited from MSMoveReminder | |
bool | notifyEnter (SUMOVehicle &veh, MSMoveReminder::Notification reason) |
Returns whether the vehicle shall be aware of this entry. More... | |
Methods inherited from MSDetectorFileOutput. | |
void | writeXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime) |
Writes values into the given stream. More... | |
void | writeXMLDetectorProlog (OutputDevice &dev) const |
Opens the XML-output using "detector" as root element. More... | |
Virtual methods to implement by derived classes | |
virtual void | reset () |
Resets collected values. More... | |
virtual void | detectorUpdate (const SUMOTime step) |
Updates the detector (computes values) More... | |
virtual GUIDetectorWrapper * | buildDetectorGUIRepresentation () |
Builds the graphical representation. More... | |
Interface methods, to be derived by subclasses | |
virtual bool | notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) |
Checks whether the reminder still has to be notified about the vehicle moves. More... | |
virtual bool | notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason) |
Called if the vehicle leaves the reminder's lane. More... | |
Protected Attributes | |
const std::string | myDescription |
a description of this moveReminder More... | |
std::string | myID |
The name of the object. More... | |
MSLane *const | myLane |
Lane on which the reminder works. More... | |
Private Member Functions | |
MSRouteProbe (const MSRouteProbe &) | |
Invalidated copy constructor. More... | |
MSRouteProbe & | operator= (const MSRouteProbe &) |
Invalidated assignment operator. More... | |
Private Attributes | |
RandomDistributor< const MSRoute * > * | myCurrentRouteDistribution |
The current distribution of routes (probability->route) More... | |
Writes routes of vehicles passing a certain edge.
This device allows to create route distributions of all vehicles running over a certain edge.
A frequency can be specified to generate the output in certain intervals, (e.g. every 900 seconds) and is used via the detector control by calling the appropriate methods derived from MSDetectorFileOutput.
Definition at line 68 of file MSRouteProbe.h.
|
inherited |
Definition of a vehicle state.
Definition at line 94 of file MSMoveReminder.h.
Constructor.
[in] | id | The id of the route probe |
[in] | edge | The edge where the distribution shall be estimated |
[in] | begin | The start of the first reporting interval |
Definition at line 55 of file MSRouteProbe.cpp.
References MSRoute::dictionary(), MSRoute::distDictionary(), MSEdge::getLanes(), MSRoute::getMaxRouteDistSize(), MSGlobals::gUseMesoSim, myCurrentRouteDistribution, MSRoute::releaseRoute(), and toString().
|
virtual |
Destructor.
Definition at line 81 of file MSRouteProbe.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.
|
inlinevirtualinherited |
Updates the detector (computes values)
[in] | step | The current time step |
Reimplemented in MSMeanData, MSE3Collector, MSMeanData_Harmonoise, and MSE2Collector.
Definition at line 113 of file MSDetectorFileOutput.h.
References UNUSED_PARAMETER.
|
inlineinherited |
Definition at line 210 of file MSMoveReminder.h.
References MSMoveReminder::myDescription.
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), 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(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), 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(), NBEdge::connections_sorter(), 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(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), RODFNet::getDetectorEdge(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), 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(), 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_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::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()(), 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(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), GUITrafficLightLogicWrapper::switchTLSLogic(), 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(), RODFDetector::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(), writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 88 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by MSE2Collector::detectorUpdate(), TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_InductionLoop::getTree(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), TraCIServerAPI_InductionLoop::processGet(), and MSMeanData::writeEdge().
|
virtual |
Returns whether the vehicle shall be aware of this entry.
Returns true if the vehicle is in front of the entry, so that it may enter it in later steps.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented from MSMoveReminder.
Definition at line 86 of file MSRouteProbe.cpp.
References RandomDistributor< T >::add(), MSRoute::addReference(), SUMOVehicle::getRoute(), myCurrentRouteDistribution, MSMoveReminder::NOTIFICATION_LANE_CHANGE, and MSMoveReminder::NOTIFICATION_SEGMENT.
|
inlinevirtualinherited |
Called if the vehicle leaves the reminder's lane.
Informs if vehicle leaves reminder lane (due to lane change, removal from the network, or leaving to the next lane). The default is to do nothing.
[in] | veh | The leaving vehicle. |
[in] | lastPos | Position on the lane when leaving. |
[in] | reason | how the vehicle leaves the lane |
Reimplemented in MSMeanData::MeanDataValueTracker, MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSMeanData::MeanDataValues, MSDevice_Tripinfo, MSDevice_Example, MSInstantInductLoop, MSDevice_Vehroutes, MSE3Collector::MSE3EntryReminder, MSDevice_Person, and MSMeanData_Net::MSLaneMeanDataValues.
Definition at line 174 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtualinherited |
Checks whether the reminder still has to be notified about the vehicle moves.
Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.
[in] | veh | Vehicle that asks this reminder. |
[in] | oldPos | Position before move. |
[in] | newPos | Position after move with newSpeed. |
[in] | newSpeed | Moving speed. |
Reimplemented in MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSMeanData::MeanDataValues, MSDevice_HBEFA, MSE3Collector::MSE3EntryReminder, MSInstantInductLoop, MSDevice_Tripinfo, MSDevice_Example, MSDevice_Person, and MSDevice_BTreceiver.
Definition at line 149 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtualinherited |
Internal notification about the vehicle moves.
Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.
[in] | veh | Vehicle that asks this reminder. |
[in] | timeOnLane | time the vehicle spent on the lane. |
[in] | speed | Moving speed. |
Reimplemented in MSMeanData::MeanDataValueTracker, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_HBEFA::MSLaneMeanDataValues.
Definition at line 201 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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().
|
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().
|
virtual |
Opens the XML-output using "detector" 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 122 of file MSRouteProbe.cpp.
References OutputDevice::writeXMLHeader().
|
virtual |
Writes values into the given stream.
This method writes the distribution of routes collected in the last interval. As a side effect the distribution is added to the global route distribution container.
[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 96 of file MSRouteProbe.cpp.
References MSRoute::begin(), OutputDevice::closeTag(), MSRoute::dictionary(), MSRoute::end(), Named::getID(), MSRoute::getMaxRouteDistSize(), RandomDistributor< T >::getOverallProb(), RandomDistributor< T >::getProbs(), RandomDistributor< T >::getVals(), myCurrentRouteDistribution, OutputDevice::openTag(), MSRoute::releaseRoute(), time2string(), and toString().
|
private |
The current distribution of routes (probability->route)
Definition at line 135 of file MSRouteProbe.h.
Referenced by MSRouteProbe(), notifyEnter(), and writeXMLOutput().
|
protectedinherited |
a description of this moveReminder
Definition at line 219 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getDescription().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 217 of file MSMoveReminder.h.
Referenced by MSE2Collector::detectorUpdate(), MSMoveReminder::getLane(), MSE2Collector::MSE2Collector(), and MSMoveReminder::MSMoveReminder().