SUMO - Simulation of Urban MObility
|
#include <MSDevice_Person.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 | addPerson (MSPerson *person) |
Add a passenger. | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. | |
virtual void | generateOutput () const |
Called on writing tripinfo output. | |
SUMOVehicle & | getHolder () const |
Returns the vehicle that holds this device. | |
const std::string & | getID () const |
Returns the id. | |
const MSLane * | getLane () const |
Returns the lane the reminder works on. | |
const std::vector< MSPerson * > & | getPersons () const |
virtual void | notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed) |
Internal notification about the vehicle moves. | |
void | setID (const std::string &newID) |
resets the id | |
unsigned int | size () const |
Return the number of passengers. | |
~MSDevice_Person () | |
Destructor. | |
Methods called on vehicle movement / state change, overwriting MSDevice | |
bool | notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) |
Checks whether the vehicle is at a stop and person action is needed. | |
bool | notifyEnter (SUMOVehicle &veh, MSMoveReminder::Notification reason) |
Adds passengers on vehicle insertion. | |
bool | notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason) |
Passengers leaving on arrival. |
Static Public Member Functions | |
static MSDevice_Person * | buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice * > &into) |
Build devices for the given vehicle, if needed. |
Protected Attributes | |
SUMOVehicle & | myHolder |
The vehicle that stores the device. | |
std::string | myID |
The name of the object. | |
MSLane *const | myLane |
Lane on which the reminder works. |
Private Member Functions | |
MSDevice_Person (SUMOVehicle &holder, const std::string &id) | |
Constructor. | |
MSDevice_Person (const MSDevice_Person &) | |
Invalidated copy constructor. | |
MSDevice_Person & | operator= (const MSDevice_Person &) |
Invalidated assignment operator. |
Private Attributes | |
std::vector< MSPerson * > | myPersons |
The passengers of the vehicle. | |
bool | myStopped |
Whether the vehicle is at a stop. |
Definition at line 57 of file MSDevice_Person.h.
|
inherited |
Definition of a vehicle state.
Definition at line 93 of file MSMoveReminder.h.
MSDevice_Person::~MSDevice_Person | ( | ) |
Destructor.
Definition at line 68 of file MSDevice_Person.cpp.
|
private |
Constructor.
[in] | holder | The vehicle that holds this device |
[in] | id | The ID of the device |
Definition at line 63 of file MSDevice_Person.cpp.
Referenced by buildVehicleDevices().
|
private |
Invalidated copy constructor.
void MSDevice_Person::addPerson | ( | MSPerson * | person | ) |
Add a passenger.
[in] | person | The passenger to add. |
Definition at line 133 of file MSDevice_Person.cpp.
References myPersons.
Referenced by MSVehicle::addPerson().
|
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().
|
static |
Build devices for the given vehicle, if needed.
The built device is stored in the given vector.
[in] | v | The vehicle for which a device may be built |
in,filled] | into The vector to store the built device in |
Definition at line 53 of file MSDevice_Person.cpp.
References SUMOVehicle::getID(), and MSDevice_Person().
Referenced by MSVehicle::addPerson().
|
inlinevirtualinherited |
Called on writing tripinfo output.
The device may write some statistics into the tripinfo output. It is assumed that the written information is a valid xml-snipplet, which will be embedded within the vehicle's information.
The device should use the openTag / closeTag methods of the OutputDevice for correct indentation.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Reimplemented in MSDevice_Tripinfo, MSDevice_Vehroutes, and MSDevice_HBEFA.
Definition at line 102 of file MSDevice.h.
|
inlineinherited |
Returns the vehicle that holds this device.
Definition at line 85 of file MSDevice.h.
References MSDevice::myHolder.
|
inlineinherited |
Returns the id.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), NLDetectorBuilder::convUncontE2PosLength(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), notifyLeave(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inlineinherited |
Returns the lane the reminder works on.
Definition at line 87 of file MSMoveReminder.h.
References MSMoveReminder::myLane.
Referenced by GUIInstantInductLoop::buildDetectorGUIRepresentation(), GUIInductLoop::buildDetectorGUIRepresentation(), MSE2Collector::detectorUpdate(), TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_InductionLoop::getTree(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), TraCIServerAPI_InductionLoop::processGet(), and MSMeanData::writeEdge().
|
inline |
Definition at line 125 of file MSDevice_Person.h.
References myPersons.
Referenced by GUIVehicle::drawGL(), GUIVehicle::getNumPassengers(), and MSVehicle::processNextStop().
|
virtual |
Adds passengers on vehicle insertion.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented from MSMoveReminder.
Definition at line 102 of file MSDevice_Person.cpp.
References MSNet::getInstance(), myPersons, and MSMoveReminder::NOTIFICATION_DEPARTED.
|
virtual |
Passengers leaving on arrival.
[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 113 of file MSDevice_Person.cpp.
References MSPersonControl::erase(), MSNet::getCurrentTimeStep(), MSPerson::getDestination(), SUMOVehicle::getEdge(), Named::getID(), MSPerson::getID(), MSNet::getInstance(), MSNet::getPersonControl(), myPersons, MSMoveReminder::NOTIFICATION_ARRIVED, MSPerson::proceed(), and WRITE_WARNING.
|
virtual |
Checks whether the vehicle is at a stop and person action is needed.
[in] | veh | The regarded vehicle |
[in] | oldPos | Position before the move-micro-timestep. |
[in] | newPos | Position after the move-micro-timestep. |
[in] | newSpeed | The vehicle's current speed |
Reimplemented from MSMoveReminder.
Definition at line 73 of file MSDevice_Person.cpp.
References MSPersonControl::erase(), MSNet::getCurrentTimeStep(), MSPerson::getDestination(), SUMOVehicle::getEdge(), MSNet::getInstance(), MSNet::getPersonControl(), SUMOVehicle::isStopped(), myPersons, myStopped, and MSPerson::proceed().
|
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 200 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
private |
Invalidated assignment operator.
|
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().
|
inline |
Return the number of passengers.
Definition at line 121 of file MSDevice_Person.h.
References myPersons.
Referenced by MSVehicle::getPersonNumber().
|
protectedinherited |
The vehicle that stores the device.
Definition at line 108 of file MSDevice.h.
Referenced by MSDevice_Vehroutes::addRoute(), MSDevice_Tripinfo::generateOutput(), MSDevice_Vehroutes::generateOutput(), MSDevice::getHolder(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Routing::preInsertionReroute(), MSDevice_Routing::wrappedRerouteCommandExecute(), MSDevice_Vehroutes::writeXMLRoute(), and MSDevice_Vehroutes::~MSDevice_Vehroutes().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
protectedinherited |
Lane on which the reminder works.
Definition at line 215 of file MSMoveReminder.h.
Referenced by MSE2Collector::detectorUpdate(), MSMoveReminder::getLane(), MSE2Collector::MSE2Collector(), and MSMoveReminder::MSMoveReminder().
|
private |
The passengers of the vehicle.
Definition at line 144 of file MSDevice_Person.h.
Referenced by addPerson(), getPersons(), notifyEnter(), notifyLeave(), notifyMove(), and size().
|
private |
Whether the vehicle is at a stop.
Definition at line 147 of file MSDevice_Person.h.
Referenced by notifyMove().