GuidesAPI Reference
Guides

Fuel consumption

📘

Note

This feature is currently in beta.

The empirical consumption model for internal combustion engine (ICE) vehicles allows you to specify vehicle-specific parameters, which are then used to calculate fuel consumption for the vehicle on a given route.

Aside from vehicle parameters, the empirical model depends on user-provided consumption speed tables for travelling at a constant speed (freeFlowSpeedTable) and travelling in heavy traffic (trafficSpeedTable).

The fuel consumption is in liters (l) for diesel, petrol, and LPG, and in kilograms (kg) for CNG.

Consumption speed table

A consumption speed table defines the rate of fuel consumption, in vehicle-dependent units per meter driven, when the vehicle travels on a straight road with no change in elevation, at a given speed expressed in km/h.

A table represents a piecewise linear function. The following is a function with the corresponding request option:

fuel[freeFlowSpeedTable]=0,0.239,27,0.239,45,0.259,60,0.196,
75,0.207,90,0.238,100,0.26,110,0.296,120,0.337,130,0.351
Consumption speed table

Consumption speed function

You can use two consumption speed tables:

  • freeFlowSpeedTable describes fuel when travelling at constant speed.
  • trafficSpeedTable describes fuel consumption when travelling under heavy traffic conditions, that is when the vehicle is expected to often change the travel speed, at a given average speed.

If a request contains only the freeFlowSpeedTable, then that table is used to calculate fuel consumption related to speed changes.

When both freeFlowSpeedTable and trafficSpeedTable are provided in the request, the following formula is used to calculate consumption:

$$P_{speed} = S_T(v_t) + rac{v_t}{v_f} imes (S_F(v_t) - S_T(v_t))$$
  • $v_f$: free flow speed of a given road, defined as the estimated speed of travel without considering any traffic-related constraints.
  • $v_t$: the average traffic speed of a given road, that uses available traffic information to estimate the speed of travel.
  • $S_T$ and $S_F$: the traffic and free flow speed tables, respectively.

If the traffic speed is equal to the free flow speed, the calculation uses only the freeFlowSpeedTable to determine the fuel consumption.

The lower the traffic speed is compared to the free flow speed, the bigger an effect the trafficSpeedTable will have.

Consumption calculation formula for ICE vehicles

In this model, consumption ($C$) along the segment depends on the length, speed, and elevation difference.

$$C = P_{asc} cdot Delta h_+ + P_{speed} cdot L + P_{addl} cdot t$$

Request and model parameters for ICE vehicles

The following request parameters define the consumption model for consumption calculation:

Request parameterModel parameterMandatoryDescription
fuel[freeFlowSpeedTable]$P_{speed}$YesFunction curve specifying consumption rate at a given free-flow speed on a flat stretch of road.
fuel[trafficSpeedTable]$P_{speed}$Function curve specifying consumption rate at a given speed under traffic conditions on a flat stretch of road.
fuel[additionalConsumption]$P_{addl}$Fuel consumption in grams (g) or milliliters (ml) by the vehicle's auxiliary systems (for example, air conditioning, lights) per second of travel.
fuel[ascent]$P_{asc}$Fuel consumption in grams (g) or milliliters (ml) per meter rise in elevation.

Map parameters for fuel-based vehicles

The following parameters are taken from the map data to support the consumption calculation:

ParameterDescription
$L$Length of the segment in meters.
$t$Travel time along the segment in seconds.

Tutorials