Compatible & Incompatible Fuel Types

Product Used: Route Optimization API

Background

Consider a fuel distributor operating a fleet of trucks for delivering diesel and gasoline at multiple gas stations across the city. Each station orders either diesel or gasoline based on demand. The dispatcher must plan efficient routes such that a truck is assigned for delivering only one of the two fuels in any given run and not be forced to carry both fuel types. The trucks should be loaded with the required fuel type when starting from the depot, and then deliver it to the required gas stations. If compatibility rules are ignored for a truck, it may lead to quality, safety and compliance issues.

Problem Statements

When multiple fuel types are involved such that they are incompatible to be transported together using single truck for a given run, fuel dispatchers need to overcome following challenges:

Ensure fuel types are not mixed

In a mixed fuel distribution operation, it becomes critical to plan routes for trucks such that they are dealing with compatible fuel types only to avoid vehicle safety or regulatory constraints. As an example, a truck certified to carry diesel only should not be assigned to deliver regular gasoline. Manual or spreadsheet based route planning workflows may lead to inefficient plans and confusion among operators.

Optimum routing for honoring fuel compatibility

Generating optimum routes while honoring the compatibility rules is an additional layer of complexity to be solved. Focus on enforcing compatibility rules can lead to common routing inefficiencies like redundant routes, ill-utilization of capacity and inconsistent delivery schedules.

Solution

NextBillion.ai's Route Optimization API supports configuring compatible and incompatible load types for each order to ensure that optimizer efficiently batches together the orders with compatible fuel types.

Configuring compatible load types

The API allows each order to be configured with a list of compatible load types. In this example, we use it to represent the compatible fuel types as follows:

1
{
2
"id": "Delivery-Gas Station 5",
3
"load_types":["diesel"]
4
}
5

As a result, when gas stations place orders for one of the fuel types, the optimizer automatically assigns the delivery order for the given station to a truck which is transporting the same fuel type.

Restricting incompatible load types

In addition to defining compatible fuel types, the API also allows users to specify incompatible load types for each delivery order:

1
{
2
"id": "Delivery-Gas Station 5",
3
"incompatible_load_types":["gasoline"]
4
}
5

These represent fuel types that the order must never be clubbed with, even if other constraints might otherwise allow it. During route optimization, the system ensures that vehicles are never assigned deliveries containing a mix of permitted and restricted fuel types.

Sample Request and Response

Following is a JSON request that we built for this case and the corresponding response.

API Request

1
curl --location 'https://api.nextbillion.io/optimization/v2?key=<your_api_key>' --header 'Content-Type: application/json' --data '{...}'

API Response

1
{
2
"description": "Compatible & Incompatible Fuel Types",
3
"result": '{...}',
4
"status": "Ok",
5
"message": ""

From the optimized route plan, we can observe that the system generates routing plans that remain both operationally feasible and compliant with fuel compatibility rules, while still producing efficient routes for all vehicles. The ability to define both compatible and incompatible load types, offers dispatchers total control, over which deliveries should be grouped together and which should be kept separate.