 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
50 into.push_back(device);
73 static_cast<const SUMOVehicle&>(veh).getEmissionParameters()),
TS);
81 const double timeOnLane,
83 const double meanSpeedVehicleOnLane,
91 meanSpeedVehicleOnLane, a, veh.
getSlope(),
92 static_cast<const SUMOVehicle&>(veh).getEmissionParameters()), timeOnLane);
static void insertOptions()
Inserts MSDevice_Emissions-options.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
Representation of a vehicle or person.
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
Static storage of an output device and its base (abstract) implementation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
~MSDevice_Emissions()
Destructor.
virtual const std::string & getID() const =0
Get the vehicle's ID.
Representation of a vehicle.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Computes current emission values and adds them to their sums.
static OptionsCont & getOptions()
Retrieves the options.
MSDevice_Emissions(SUMOVehicle &holder, const std::string &id)
Constructor.
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
Adds common command options that allow to assign devices to vehicles.
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const std::map< int, double > *param=0)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
void addScaled(const Emissions &a, const double scale=1.)
Add the values of the other struct to this one, scaling the values if needed.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
Determines whether a vehicle should get a certain device.
void notifyMoveInternal(const SUMOTrafficObject &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane)
Internal notification about the vehicle moves, see MSMoveReminder::notifyMoveInternal()
A device which collects vehicular emissions.
static std::string realString(const double v, const int precision=gPrecision)
Helper method for string formatting.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
PollutantsInterface::Emissions myEmissions
Internal storages for pollutant/fuel sum in mg or ml.
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
void generateOutput() const
Called on writing tripinfo output.
Abstract in-vehicle device.