PREDICTIVE ANALYTICS
Duffl

SCOPE OF PROJECT
PREDICTIVE ANALYTICS
Timeline: September 2020-January 2021
What We Did: Analyzed order assignment inefficiencies, developed strategies for optimizing racer assignments, Explored predictive modeling for customer purchases, designed an algorithm for product ranking
Tools: Python, SQL, ML Modeling, Data Analytics Frameworks
Goal of Project
Optimize racer assignments to minimize delivery time and labor costs
Use predictive modeling to anticipate future orders and improve dispatching
Develop an intelligent product ranking system for Duffl’s new mobile app
What is Duffl?
Duffl is a UCLA-based startup that delivers snacks and supplies to students within 10 minutes. However, their racer assignment system lacked efficiency, and their platform had opportunities to improve user engagement.
Guiding Questions
How can racer shifts be optimized to reduce costs while ensuring timely deliveries?
Can user behavior data help predict purchases and improve delivery batching?
What ranking algorithm should the mobile app use to maximize user satisfaction?
Phase 1: Collected and analyzed delivery and user interaction data
We used Duffl’s data to generate the following distribution plots and obtain a general picture of Duffl racers’ prior delivery and packing times.
The panel to the left displays some crucial descriptive statistics for the time between order packing and delivery (top) and time between order creation and delivery (bottom). The first insight of note is that for both groupings, the mean is greater than the median, indicating the distributions for both groupings are skewed to the right, meaning we have a higher number of data points with high values.
Phase 2: Developed Models to Predict Order Timing and Optimize Racer Assignments
To solve the racer routing problem, we needed an algorithm that could solve the multiple traveling salesman problem (MTSP), which is a generalization of the traveling salesman problem (TSP), which asks: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" To implement such an algorithm, we used Google’s OR-Tools (an open source software suite for optimization), which given a list of addresses will output the most efficient route for each racer. We then simulated Duffl’s past orders (for the UCLA depot) through this new algorithm to analyze the increased efficiency. The parameters used in the simulation were as follows: 30 minute time window for each delivery, 5 minute delay on each order, 2 hour maximum trip time for each racer.
Phase 3: Designed a personalized ranking algorithm for the mobile app
To solve the racer routing problem, we needed an algorithm that could solve the multiple traveling salesman problem (MTSP), which is a generalization of the traveling salesman problem (TSP), which asks: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" To implement such an algorithm, we used Google’s OR-Tools (an open source software suite for optimization), which given a list of addresses will output the most efficient route for each racer. We then simulated Duffl’s past orders (for the UCLA depot) through this new algorithm to analyze the increased efficiency. The parameters used in the simulation were as follows: 30 minute time window for each delivery, 5 minute delay on each order, 2 hour maximum trip time for each racer.
Phase 4: Validated solutions with test data and proposed implementation strategies
Our solution answers the problems of who should take which orders and the order in which they should be delivered, accounting for backlogged orders. This resolves the issue of batching, which is automatically taken into consideration. Additionally, it minimizes the number of racers required to make deliveries, reducing the labor cost.
Our Impact
Improved Efficiency: Enhanced order assignment systems led to lower delivery costs.
Accelerated Delivery: Predictive order batching shortened delivery times and elevated customer satisfaction.
Increased Engagement: Personalized product ranking drove higher user interaction on the platform.
Reflection
Our initial model did not explicitly account for first-time customer priority or the dynamic arrival of new orders, yet it still significantly outperformed manual dispatching. These features can be seamlessly integrated into the MTSP (Multiple Traveling Salesman Problem) framework to further optimize deliveries and enhance the overall customer experience. We recommend implementing the MTSP solution to help Duffl fully realize these benefits.