58 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...
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
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.
static std::string realString(const double v, const int precision=gPrecision)
Helper method for string formatting.
static OptionsCont & getOptions()
Retrieves the options.
virtual double getAcceleration() const =0
Returns the vehicle's acceleration.
~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.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
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 void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into)
Build devices for the given vehicle, if needed.
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
static void insertOptions()
Inserts MSDevice_Emissions-options.
virtual const std::string & getID() const =0
Get the vehicle's ID.
void generateOutput() const
Called on writing tripinfo output.
Static storage of an output device and its base (abstract) implementation.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
A device which collects vehicular emissions.
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.