57 into.push_back(device);
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...
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice *> &into)
Build devices for the given vehicle, if needed.
MSDevice_Emissions(SUMOVehicle &holder, const std::string &id)
Constructor.
bool notifyMove(SUMOVehicle &veh, double oldPos, double newPos, double newSpeed)
Computes current emission values and adds them to their sums.
PollutantsInterface::Emissions myEmissions
Internal storages for pollutant/fuel sum in mg or ml.
void generateOutput() const
Called on writing tripinfo output.
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
static std::string realString(const double v, const int precision=gPrecision)
Helper method for string formatting.
static OptionsCont & getOptions()
Retrieves the options.
~MSDevice_Emissions()
Destructor.
Representation of a vehicle.
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc)
Adds common command options that allow to assign devices to vehicles.
Abstract in-vehicle device.
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, SUMOVehicle &v)
Determines whether a vehicle should get a certain device.
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
static void insertOptions()
Inserts MSDevice_Emissions-options.
Static storage of an output device and its base (abstract) implementation.
A device which collects vehicular emissions.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
virtual const std::string & getID() const =0
Get the vehicle's ID.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void addScaled(const Emissions &a, const double scale=1.)
Add the values of the other struct to this one, scaling the values if needed.
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.