SUMO - Simulation of Urban MObility
|
An unextended detector measuring at a fixed position on a fixed lane. More...
#include <MSInductLoop.h>
Data Structures | |
struct | VehicleData |
Struct to store the data of the counted vehicle internally. More... | |
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... | |
virtual std::vector< VehicleData > | collectVehiclesOnDet (SUMOTime t) const |
Returns vehicle data for vehicles that have been on the detector starting at the given time. 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... | |
SUMOReal | getPosition () const |
Returns the position of the detector on the lane. More... | |
MSInductLoop (const std::string &id, MSLane *const lane, SUMOReal positionInMeters, bool splitByType) | |
Constructor. More... | |
virtual void | notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed) |
Internal notification about the vehicle moves. More... | |
virtual void | reset () |
Resets all generated values to allow computation of next interval. More... | |
void | setDescription (const std::string &description) |
void | setID (const std::string &newID) |
resets the id More... | |
~MSInductLoop () | |
Destructor. More... | |
Methods inherited from MSMoveReminder | |
bool | notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) |
Checks whether the vehicle shall be counted and/or shall still touch this MSMoveReminder. More... | |
bool | notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason) |
Dismisses the vehicle if it is on the detector due to a lane change. More... | |
Methods returning current values | |
SUMOReal | getCurrentSpeed () const |
Returns the speed of the vehicle on the detector. More... | |
SUMOReal | getCurrentLength () const |
Returns the length of the vehicle on the detector. More... | |
SUMOReal | getCurrentOccupancy () const |
Returns the current occupancy. More... | |
unsigned int | getCurrentPassedNumber () const |
Returns the number of vehicles that have passed the detector. More... | |
std::vector< std::string > | getCurrentVehicleIDs () const |
Returns the ids of vehicles that have passed the detector. More... | |
SUMOReal | getTimestepsSinceLastDetection () const |
Returns the time since the last vehicle left the detector. More... | |
Methods inherited from MSDetectorFileOutput. | |
void | writeXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime) |
Writes collected values into the given stream. More... | |
void | writeXMLDetectorProlog (OutputDevice &dev) const |
Opens the XML-output using "detector" as root element. More... | |
Interface methods, to be derived by subclasses | |
virtual bool | notifyEnter (SUMOVehicle &veh, Notification reason) |
Checks whether the reminder is activated by a vehicle entering the lane. More... | |
Virtual methods to implement by derived classes | |
virtual void | detectorUpdate (const SUMOTime step) |
Updates the detector (computes values) More... | |
virtual GUIDetectorWrapper * | buildDetectorGUIRepresentation () |
Builds the graphical representation. More... | |
Protected Types | |
typedef std::deque< VehicleData > | VehicleDataCont |
Type of myVehicleDataCont. More... | |
typedef std::map< SUMOVehicle *, SUMOReal > | VehicleMap |
Type of myVehiclesOnDet. More... | |
Protected Member Functions | |
void | writeTypedXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime, const std::string &type, const VehicleDataCont &vdc, const VehicleMap &vm) |
Methods that add and remove vehicles from internal container | |
virtual void | enterDetectorByMove (SUMOVehicle &veh, SUMOReal entryTimestep) |
Introduces a vehicle to the detector's map myVehiclesOnDet. More... | |
virtual void | leaveDetectorByMove (SUMOVehicle &veh, SUMOReal leaveTimestep) |
Processes a vehicle that leaves the detector. More... | |
virtual void | leaveDetectorByLaneChange (SUMOVehicle &veh, SUMOReal lastPos) |
Removes a vehicle from the detector's map myVehiclesOnDet. More... | |
Static Protected Member Functions | |
Function for summing up values | |
static SUMOReal | speedSum (SUMOReal sumSoFar, const MSInductLoop::VehicleData &data) |
Adds up VehicleData::speedM. More... | |
static SUMOReal | lengthSum (SUMOReal sumSoFar, const MSInductLoop::VehicleData &data) |
Adds up VehicleData::lengthM. More... | |
Protected Attributes | |
std::string | myDescription |
a description of this moveReminder More... | |
unsigned | myDismissedVehicleNumber |
The number of dismissed vehicles. More... | |
std::string | myID |
The name of the object. More... | |
MSLane *const | myLane |
Lane on which the reminder works. More... | |
SUMOReal | myLastLeaveTime |
Leave-time of the last vehicle detected [s]. More... | |
SUMOReal | myLastOccupancy |
Occupancy by the last vehicle detected. More... | |
VehicleDataCont | myLastVehicleDataCont |
Data of vehicles that have completely passed the detector in the last time interval. More... | |
const SUMOReal | myPosition |
Detector's position on lane [m]. More... | |
bool | mySplitByType |
Whether additional information split by vehicle classes shall be generated. More... | |
VehicleDataCont | myVehicleDataCont |
Data of vehicles that have completely passed the detector. More... | |
VehicleMap | myVehiclesOnDet |
Data for vehicles that have entered the detector (vehicle -> enter time) More... | |
Private Member Functions | |
MSInductLoop (const MSInductLoop &) | |
Invalidated copy constructor. More... | |
MSInductLoop & | operator= (const MSInductLoop &) |
Invalidated assignment operator. More... | |
An unextended detector measuring at a fixed position on a fixed lane.
Only vehicles that passed the entire detector are counted. We ignore vehicles that are emitted onto the detector and vehicles that change their lane while they are on the detector, because we cannot determine a meaningful enter/leave-times.
This detector uses the MSMoveReminder mechanism, i.e. the vehicles call the detector if they pass it.
Definition at line 71 of file MSInductLoop.h.
|
protected |
Type of myVehicleDataCont.
Definition at line 344 of file MSInductLoop.h.
|
protected |
Type of myVehiclesOnDet.
Definition at line 354 of file MSInductLoop.h.
|
inherited |
Definition of a vehicle state.
Definition at line 95 of file MSMoveReminder.h.
MSInductLoop::MSInductLoop | ( | const std::string & | id, |
MSLane *const | lane, | ||
SUMOReal | positionInMeters, | ||
bool | splitByType | ||
) |
Constructor.
Adds reminder to MSLane.
[in] | id | Unique id |
[in] | lane | Lane where detector woks on |
[in] | position | Position of the detector within the lane |
[in] | splitByType | Whether additional information split by vehicle classes shall be generated |
Definition at line 60 of file MSInductLoop.cpp.
References myPosition, and reset().
MSInductLoop::~MSInductLoop | ( | ) |
Destructor.
Definition at line 73 of file MSInductLoop.cpp.
|
private |
Invalidated copy constructor.
|
inlineinherited |
Adds this object to the given container.
Definition at line 121 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.
|
virtual |
Returns vehicle data for vehicles that have been on the detector starting at the given time.
[in] | t | The time from which vehicles shall be counted |
Reimplemented in GUIInductLoop.
Definition at line 306 of file MSInductLoop.cpp.
References SUMOVehicle::getID(), MSVehicleType::getID(), MSVehicleType::getLength(), SUMOVehicle::getSpeed(), SUMOVehicle::getVehicleType(), HAS_NOT_LEFT_DETECTOR, myLastVehicleDataCont, myVehicleDataCont, myVehiclesOnDet, MSInductLoop::VehicleData::speedM, STEPS2TIME, and SUMOReal.
Referenced by GUIInductLoop::collectVehiclesOnDet(), getCurrentLength(), getCurrentOccupancy(), getCurrentPassedNumber(), getCurrentSpeed(), getCurrentVehicleIDs(), and TraCIServerAPI_InductionLoop::processGet().
|
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.
|
protectedvirtual |
Introduces a vehicle to the detector's map myVehiclesOnDet.
veh | The entering vehicle. |
entryTimestep | Timestep (not necessary integer) of entrance. |
Reimplemented in GUIInductLoop.
Definition at line 273 of file MSInductLoop.cpp.
References myVehiclesOnDet.
Referenced by GUIInductLoop::enterDetectorByMove(), and notifyMove().
SUMOReal MSInductLoop::getCurrentLength | ( | ) | const |
Returns the length of the vehicle on the detector.
If no vehicle is on the detector, -1 is returned, otherwise this vehicle's length.
Definition at line 138 of file MSInductLoop.cpp.
References collectVehiclesOnDet(), DELTA_T, MSNet::getInstance(), lengthSum(), and SUMOReal.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), and TraCIServerAPI_InductionLoop::processGet().
SUMOReal MSInductLoop::getCurrentOccupancy | ( | ) | const |
Returns the current occupancy.
If a vehicle is on the detector, 1 is returned. If a vehicle has passed the detector in this timestep, its occupancy value is returned. If no vehicle has passed, 0 is returned.
Definition at line 147 of file MSInductLoop.cpp.
References collectVehiclesOnDet(), DELTA_T, MSNet::getCurrentTimeStep(), MSNet::getInstance(), HAS_NOT_LEFT_DETECTOR, MAX2(), MIN2(), STEPS2TIME, SUMOReal, and TS.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), and TraCIServerAPI_InductionLoop::processGet().
unsigned int MSInductLoop::getCurrentPassedNumber | ( | ) | const |
Returns the number of vehicles that have passed the detector.
If a vehicle is on the detector, 1 is returned. If a vehicle has passed the detector in this timestep, 1 is returned. If no vehicle has passed, 0 is returned.
Definition at line 166 of file MSInductLoop.cpp.
References collectVehiclesOnDet(), DELTA_T, and MSNet::getInstance().
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), and TraCIServerAPI_InductionLoop::processGet().
SUMOReal MSInductLoop::getCurrentSpeed | ( | ) | const |
Returns the speed of the vehicle on the detector.
If no vehicle is on the detector, -1 is returned, otherwise this vehicle's current speed.
Definition at line 129 of file MSInductLoop.cpp.
References collectVehiclesOnDet(), DELTA_T, MSNet::getInstance(), speedSum(), and SUMOReal.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), and TraCIServerAPI_InductionLoop::processGet().
std::vector< std::string > MSInductLoop::getCurrentVehicleIDs | ( | ) | const |
Returns the ids of vehicles that have passed the detector.
Definition at line 173 of file MSInductLoop.cpp.
References collectVehiclesOnDet(), DELTA_T, and MSNet::getInstance().
Referenced by TraCIServerAPI_InductionLoop::processGet().
|
inlineinherited |
Definition at line 215 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(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBEdge::addSidewalk(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), 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(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), 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(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_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_Person::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(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_JE2013::wantsChange(), 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(), writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 89 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by MSE2Collector::detectorUpdate(), MSDevice_Tripinfo::generateOutput(), 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().
|
inline |
Returns the position of the detector on the lane.
Definition at line 100 of file MSInductLoop.h.
References myPosition.
Referenced by TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_InductionLoop::getTree(), and TraCIServerAPI_InductionLoop::processGet().
SUMOReal MSInductLoop::getTimestepsSinceLastDetection | ( | ) | const |
Returns the time since the last vehicle left the detector.
Definition at line 184 of file MSInductLoop.cpp.
References MSNet::getInstance(), myLastLeaveTime, myVehiclesOnDet, and STEPS2TIME.
Referenced by GUIInductLoop::MyWrapper::getParameterWindow(), and TraCIServerAPI_InductionLoop::processGet().
|
protectedvirtual |
Removes a vehicle from the detector's map myVehiclesOnDet.
veh | The leaving vehicle. |
lastPos | The last position of the leaving vehicle. |
Reimplemented in GUIInductLoop.
Definition at line 295 of file MSInductLoop.cpp.
References myDismissedVehicleNumber, myPosition, and myVehiclesOnDet.
Referenced by GUIInductLoop::leaveDetectorByLaneChange(), and notifyLeave().
|
protectedvirtual |
Processes a vehicle that leaves the detector.
Removes a vehicle from the detector's map myVehiclesOnDet and adds the vehicle data to the internal myVehicleDataCont.
veh | The leaving vehicle. |
leaveTimestep | Timestep (not necessary integer) of leaving. |
Reimplemented in GUIInductLoop.
Definition at line 280 of file MSInductLoop.cpp.
References SUMOVehicle::getID(), MSVehicleType::getID(), MSVehicleType::getLength(), SUMOVehicle::getVehicleType(), myLastLeaveTime, myLastOccupancy, myVehicleDataCont, myVehiclesOnDet, and SUMOReal.
Referenced by GUIInductLoop::leaveDetectorByMove(), and notifyMove().
|
inlinestaticprotected |
Adds up VehicleData::lengthM.
Definition at line 320 of file MSInductLoop.h.
References MSInductLoop::VehicleData::lengthM.
Referenced by getCurrentLength(), and writeTypedXMLOutput().
|
inlinevirtualinherited |
Checks whether the reminder is activated by a vehicle entering the lane.
Lane change means in this case that the vehicle changes to the lane the reminder is placed at.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented in MSMeanData::MeanDataValueTracker, MSE2Collector, MSDevice_Routing, MSMeanData_Net::MSLaneMeanDataValues, MSCalibrator::VehicleRemover, MSTriggeredRerouter, MSMeanData_Amitran::MSLaneMeanDataValues, MSDevice_Example, MSDevice_BTreceiver, MSMeanData::MeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSDevice_Vehroutes, MSDevice_BTsender, MSDevice_Tripinfo, MSRouteProbe, MSDevice_Person, and MSDevice_Container.
Definition at line 130 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
virtual |
Dismisses the vehicle if it is on the detector due to a lane change.
If the vehicle is on the detector, it will be dismissed by incrementing myDismissedVehicleNumber and removing this vehicle's entering time from myVehiclesOnDet.
[in] | veh | The leaving vehicle. |
[in] | lastPos | Position on the lane when leaving. |
[in] | isArrival | whether the vehicle arrived at its destination |
[in] | isLaneChange | whether the vehicle changed from the lane |
Reimplemented from MSMoveReminder.
Definition at line 119 of file MSInductLoop.cpp.
References leaveDetectorByLaneChange(), and MSMoveReminder::NOTIFICATION_JUNCTION.
|
virtual |
Checks whether the vehicle shall be counted and/or shall still touch this MSMoveReminder.
As soon a vehicle enters the detector, its entry time is computed and stored in myVehiclesOnDet via enterDetectorByMove. If it passes the detector, the according leaving time is computed and stored, too, using leaveDetectorByMove.
[in] | veh | Vehicle that asks this remider. |
[in] | oldPos | Position before move. |
[in] | newPos | Position after move with newSpeed. |
[in] | newSpeed | Moving speed. |
Reimplemented from MSMoveReminder.
Definition at line 86 of file MSInductLoop.cpp.
References enterDetectorByMove(), MSNet::getInstance(), MSVehicleType::getLength(), SUMOVehicle::getVehicleType(), leaveDetectorByMove(), myPosition, myVehiclesOnDet, STEPS2TIME, and SUMOReal.
|
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, MSMeanData_Amitran::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.
Definition at line 203 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
private |
Invalidated assignment operator.
|
virtual |
Resets all generated values to allow computation of next interval.
Reimplemented from MSDetectorFileOutput.
Reimplemented in GUIInductLoop.
Definition at line 78 of file MSInductLoop.cpp.
References myDismissedVehicleNumber, myLastVehicleDataCont, and myVehicleDataCont.
Referenced by MSInductLoop(), GUIInductLoop::reset(), and writeXMLOutput().
|
inlineinherited |
Definition at line 211 of file MSMoveReminder.h.
References MSMoveReminder::myDescription.
Referenced by MSMeanData::init(), and MSCalibrator::MSCalibrator().
|
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().
|
inlinestaticprotected |
Adds up VehicleData::speedM.
Definition at line 315 of file MSInductLoop.h.
References MSInductLoop::VehicleData::speedM.
Referenced by getCurrentSpeed(), and writeTypedXMLOutput().
|
protected |
Definition at line 233 of file MSInductLoop.cpp.
References StringUtils::escapeXML(), Named::getID(), lengthSum(), MAX2(), MIN2(), myDismissedVehicleNumber, speedSum(), STEPS2TIME, SUMOReal, and time2string().
Referenced by writeXMLOutput().
|
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 194 of file MSInductLoop.cpp.
References OutputDevice::writeXMLHeader().
|
virtual |
Writes collected values into the given stream.
[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 200 of file MSInductLoop.cpp.
References mySplitByType, myVehicleDataCont, myVehiclesOnDet, reset(), and writeTypedXMLOutput().
|
protectedinherited |
a description of this moveReminder
Definition at line 229 of file MSMoveReminder.h.
Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().
|
protected |
The number of dismissed vehicles.
Definition at line 340 of file MSInductLoop.h.
Referenced by leaveDetectorByLaneChange(), reset(), and writeTypedXMLOutput().
|
protectedinherited |
The name of the object.
Definition at line 128 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), NBNode::computeNodeShape(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), MSMeanData::openInterval(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), and MSE3Collector::writeXMLOutput().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 227 of file MSMoveReminder.h.
Referenced by MSE2Collector::detectorUpdate(), MSMoveReminder::getLane(), MSE2Collector::MSE2Collector(), and MSMoveReminder::MSMoveReminder().
|
protected |
Leave-time of the last vehicle detected [s].
Definition at line 334 of file MSInductLoop.h.
Referenced by getTimestepsSinceLastDetection(), and leaveDetectorByMove().
|
protected |
Occupancy by the last vehicle detected.
Definition at line 337 of file MSInductLoop.h.
Referenced by leaveDetectorByMove().
|
protected |
Data of vehicles that have completely passed the detector in the last time interval.
Definition at line 350 of file MSInductLoop.h.
Referenced by collectVehiclesOnDet(), and reset().
|
protected |
Detector's position on lane [m].
Definition at line 328 of file MSInductLoop.h.
Referenced by GUIInductLoop::buildDetectorGUIRepresentation(), GUIInductLoop::MyWrapper::getParameterWindow(), getPosition(), leaveDetectorByLaneChange(), MSInductLoop(), and notifyMove().
|
protected |
Whether additional information split by vehicle classes shall be generated.
Definition at line 331 of file MSInductLoop.h.
Referenced by writeXMLOutput().
|
protected |
Data of vehicles that have completely passed the detector.
Definition at line 347 of file MSInductLoop.h.
Referenced by collectVehiclesOnDet(), leaveDetectorByMove(), reset(), and writeXMLOutput().
|
protected |
Data for vehicles that have entered the detector (vehicle -> enter time)
Definition at line 357 of file MSInductLoop.h.
Referenced by collectVehiclesOnDet(), enterDetectorByMove(), getTimestepsSinceLastDetection(), leaveDetectorByLaneChange(), leaveDetectorByMove(), notifyMove(), and writeXMLOutput().