SUMOReal ROEdge::getFuelEffort(const ROVehicle* const veh, SUMOReal time) const { SUMOReal ret = 0; if (!getStoredEffort(time, ret)) { SUMOReal v = mySpeed; SUMOEmissionClass c = SVE_UNKNOWN; if (veh->getType() != 0) { v = MIN2(veh->getType()->maxSpeed, mySpeed); c = veh->getType()->emissionClass; } ret = HelpersHBEFA::computeFuel(c, v, 0) * getTravelTime(veh, time); } return ret; }
SUMOReal ROEdge::getFuelEffort(const ROVehicle* const veh, SUMOReal time) const { SUMOReal ret = 0; if (!getStoredEffort(time, ret)) { const SUMOVTypeParameter* const type = veh->getType(); const SUMOReal vMax = MIN2(type->maxSpeed, mySpeed); const SUMOReal accel = type->get(SUMO_ATTR_ACCEL, SUMOVTypeParameter::getDefaultAccel(type->vehicleClass)) * type->get(SUMO_ATTR_SIGMA, SUMOVTypeParameter::getDefaultImperfection(type->vehicleClass)) / 2.; ret = PollutantsInterface::computeDefault(type->emissionClass, PollutantsInterface::FUEL, vMax, accel, 0, getTravelTime(veh, time)); // @todo: give correct slope } return ret; }