61 if (param ==
nullptr) {
74 power += 0.5 * mass * (v * v - lastV * lastV) /
TS;
98 if (angleDiff != 0.) {
100 double radius =
SPEED2DIST(v) / fabs(angleDiff);
103 if (radius < 0.0001) {
105 }
else if (radius > 10000) {
140 return power / 3600.;
150 if (param ==
nullptr) {
160 double const1, const2, const3;
190 const1 += 0.5 * mass * (2 * v);
191 const2 = 0.5 * mass * (
TS);
219 return MAX3(x1, x2, x3);
221 WRITE_ERROR(
"An acceleration given by the power was not found.");
@ SUMO_ATTR_ROLLDRAGCOEFFICIENT
Roll Drag coefficient.
@ SUMO_ATTR_CONSTANTPOWERINTAKE
Constant Power Intake.
@ SUMO_ATTR_RECUPERATIONEFFICIENCY_BY_DECELERATION
Recuperation efficiency (by deceleration)
@ SUMO_ATTR_RECUPERATIONEFFICIENCY
Recuperation efficiency (constant)
@ SUMO_ATTR_AIRDRAGCOEFFICIENT
Air drag coefficient.
@ SUMO_ATTR_VEHICLEMASS
Vehicle mass.
@ SUMO_ATTR_RADIALDRAGCOEFFICIENT
Radial drag coefficient.
@ SUMO_ATTR_PROPULSIONEFFICIENCY
Propulsion efficiency.
@ SUMO_ATTR_INTERNALMOMENTOFINERTIA
Internal moment of inertia.
@ SUMO_ATTR_FRONTSURFACEAREA
Front surface area.
double compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param) const
Computes the emitted pollutant amount using the given speed and acceleration.
std::map< int, double > myDefaultParameter
The default parameter.
HelpersEnergy()
Constructor (initializes myEmissionClassStrings)
double acceleration(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double P, const double slope, const std::map< int, double > *param) const
Computes the achievable acceleration using the given speed and amount of consumed electric power.
Helper methods for PHEMlight-based emission computation.
EmissionType
Enumerating all emission types, including fuel.
static std::tuple< int, double, double, double > cubicSolve(double a, double b, double c, double d)
Solver of cubic equation ax^3 + bx^2 + cx + d = 0.