SUMO - Simulation of Urban MObility
|
A device which collects vehicular emissions (using HBEFA-reformulation) More...
#include <MSDevice_HBEFA.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... | |
void | generateOutput () const |
Called on writing tripinfo output. More... | |
SUMOVehicle & | getHolder () const |
Returns the vehicle that holds this device. More... | |
const std::string & | getID () const |
Returns the id. More... | |
const MSLane * | getLane () const |
Returns the lane the reminder works on. 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... | |
~MSDevice_HBEFA () | |
Destructor. More... | |
Methods called on vehicle movement / state change, overwriting MSDevice | |
bool | notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) |
Computes current emission values and adds them to their sums. 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 bool | notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason) |
Called if the vehicle leaves the reminder's lane. More... | |
Static Public Member Functions | |
static void | buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice * > &into) |
Build devices for the given vehicle, if needed. More... | |
static void | insertOptions () |
Inserts MSDevice_HBEFA-options. More... | |
Protected Attributes | |
SUMOVehicle & | myHolder |
The vehicle that stores the device. More... | |
std::string | myID |
The name of the object. More... | |
MSLane *const | myLane |
Lane on which the reminder works. More... | |
Private Member Functions | |
MSDevice_HBEFA (SUMOVehicle &holder, const std::string &id) | |
Constructor. More... | |
MSDevice_HBEFA (const MSDevice_HBEFA &) | |
Invalidated copy constructor. More... | |
MSDevice_HBEFA & | operator= (const MSDevice_HBEFA &) |
Invalidated assignment operator. More... | |
Private Attributes | |
Internal storages for pollutant/fuel sum in mg or ml | |
SUMOReal | myCO2 |
SUMOReal | myCO |
SUMOReal | myHC |
SUMOReal | myPMx |
SUMOReal | myNOx |
SUMOReal | myFuel |
A device which collects vehicular emissions (using HBEFA-reformulation)
Each device collects the vehicular emissions / fuel consumption by being called each time step, computing the current values using HelpersHBEFA, and aggregating them into internal storages over the whol journey.
Definition at line 63 of file MSDevice_HBEFA.h.
|
inherited |
Definition of a vehicle state.
Definition at line 93 of file MSMoveReminder.h.
MSDevice_HBEFA::~MSDevice_HBEFA | ( | ) |
Destructor.
Definition at line 100 of file MSDevice_HBEFA.cpp.
|
private |
Constructor.
[in] | holder | The vehicle that holds this device |
[in] | id | The ID of the device |
Definition at line 94 of file MSDevice_HBEFA.cpp.
Referenced by buildVehicleDevices().
|
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().
|
static |
Build devices for the given vehicle, if needed.
The options are read and evaluated whether hbefa-devices shall be built for the given vehicle.
For each seen vehicle, the global vehicle index is increased.
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 69 of file MSDevice_HBEFA.cpp.
References OptionsCont::getBool(), OptionsCont::getFloat(), SUMOVehicle::getID(), MSNet::getInstance(), OptionsCont::getOptions(), MSNet::getVehicleControl(), MSVehicleControl::isInQuota(), OptionsCont::isInStringVector(), OptionsCont::isSet(), MSDevice_HBEFA(), and RandHelper::rand().
Referenced by MSBaseVehicle::MSBaseVehicle().
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Reimplemented from MSDevice.
Definition at line 119 of file MSDevice_HBEFA.cpp.
References OutputDevice::getDeviceByOption(), myCO, myCO2, myFuel, myHC, myNOx, myPMx, OutputDevice::openTag(), and OutputDevice::realString().
|
inlineinherited |
Returns the vehicle that holds this device.
Definition at line 85 of file MSDevice.h.
References MSDevice::myHolder.
|
inlineinherited |
Returns the id.
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(), MSDevice_Person::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_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(), 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().
|
static |
Inserts MSDevice_HBEFA-options.
!! describe
!! describe
!! describe
Definition at line 52 of file MSDevice_HBEFA.cpp.
References OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), OptionsCont::addSynonyme(), OptionsCont::doRegister(), and OptionsCont::getOptions().
Referenced by MSFrame::fillOptions().
|
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, MSInductLoop, MSInstantInductLoop, MSMeanData_Net::MSLaneMeanDataValues, MSDevice_Routing, MSTriggeredRerouter, MSCalibrator::VehicleRemover, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData::MeanDataValues, MSRouteProbe, MSDevice_Person, MSDevice_Tripinfo, and MSDevice_Vehroutes.
Definition at line 128 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
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, MSInstantInductLoop, MSE3Collector::MSE3EntryReminder, MSDevice_Person, MSMeanData_Net::MSLaneMeanDataValues, MSDevice_Tripinfo, and MSDevice_Vehroutes.
Definition at line 173 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
virtual |
Computes current emission values and adds them to their sums.
The vehicle's current emission values are computed using the current velocity and acceleration.
[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 105 of file MSDevice_HBEFA.cpp.
References HelpersHBEFA::computeCO(), HelpersHBEFA::computeCO2(), HelpersHBEFA::computeFuel(), HelpersHBEFA::computeHC(), HelpersHBEFA::computeNOx(), HelpersHBEFA::computePMx(), SUMOVehicle::getAcceleration(), MSVehicleType::getEmissionClass(), SUMOVehicle::getVehicleType(), myCO, myCO2, myFuel, myHC, myNOx, myPMx, SUMOReal, and TS.
|
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().
|
private |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().
|
private |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().
|
private |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().
|
private |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().
|
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 |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().
|
private |
Definition at line 133 of file MSDevice_HBEFA.h.
Referenced by generateOutput(), and notifyMove().