Maximize Revenue
The ultimate goal of any route optimization exercise is to improve the profitability of the business. One of the ways to do so is to choose the routes which lead to the highest revenue earned. NextBillion.ai Route Optimization Flexible API allows users to add potential revenue earned from fulfilling each task. During optimization this value helps identify the profit earned from fulfilling the task after considering all the costs incurred to fulfill the task. The algorithm applies this approach to assign and schedule every task resulting in a final route with maximum potential revenue within a given set of constraints.
Setup
We have a total of 3 pickup jobs to be fulfilled along with the potential revenue they can earn configured into the task properties. We use only one pickup van, which starts from a designated depot location and brings the items collected from the pickup locations back to the depot. To highlight the impact of adding revenues on the final solution, we provide different revenues for each task. Let’s configure the locations, pickup jobs with their revenues, and the vehicle one by one in the following sections.
Locations
First, we define the locations
object and add all the location coordinates used in the problem along with a valid id
. The locations
object used in this example:
Jobs
Next, we define the 3 pickup jobs in our problem statement. For each of these tasks, we add:
- A unique identifier
- Location index
- Pickup quantities
- A service time
- Potential revenue earned by fulfilling the task
Following is the JSON we use in this example:
Vehicles
Now we configure the pickup van that will be responsible for fulfilling the tasks. To configure the van properties, we specify:
- A unique ID
start_index
&end_index
to indicate the starting and ending locations of the routecapacity
indicating the storage capacity of the vehicle
Once the vehicle and its properties are defined, the resulting vehicles
JSON is:
Optimization POST Request
When all the above components are put together we get the final POST request that we will submit to the optimizer.
Optimization POST Response
Once the request is made, we get a unique ID in the API response:
Optimization GET Request
We use the request ID and retrieve the result through the Optimization GET request. Following is the GET request:
Optimization GET Response
Following is the optimized route plan:
Following image shows a visual representation of the above route plan.
Optimizer doesn’t fulfill a order with low profitability
Analyzing the Solution
- Looking at the result we can observe that:
- Only 2 pickup tasks were fulfilled while one remained unassigned.
- The “summary” attribute returns the total cost incurred to make this trip, 1011, and the total revenue earned, 1700. Hence, an overall profit of 689 is earned by following the suggested route plan.
- The unassigned task was the farthest from the depot location and had the lowest revenue. Hence it was not profitable to fulfill this task as the cost incurred to fulfill it was higher than the revenue earned from it.
- The solution also returns the reason for keeping this task unassigned - “fulfilling this job will not be profitable”.
The above example exhibits how NextBillion.ai’s Route Optimization Flexible API uses the revenue information to suggest a route with high profitability. We encourage you to go ahead and try out different configurations of revenues, number of tasks / vehicles and explore how the solution changes under different scenarios presented to Route Optimization Flexible API.
Learn more about the other powerful features and the related use cases that Route Optimization Flexible API can solve for you.