You are on page 1of 7

How to engineer an efficient route:

Uber case-study

Redacted by: Hind El Aouani, KIMP-APS


Dr.Nathalie Clement

Table of content :
Introduction ........................................................................................................................................... 2
Problematic ........................................................................................................................................... 3
TSP with Brute force algorithm ............................................................................................................ 4
Traveling Salesman model with pickup and delivery TSP .................................................................. 5
References: ............................................................................................................................................ 7

1 UE4 Manufacturing Process Management


Introduction

On-demand delivery business like Uber are springing up every day, because to the rising popularity of supply
services. They specialize in a range of industries. Delivery of food and gifts, on-demand medical and cosmetic
services, and transportation services are all offered. All of these companies are built around the concept of on-
demand solutions. In the startup and business world, economic uberization is a new trend. By 2025, the on-
demand delivery industry will have a total revenue of $335 billion.

Brief history: Uber’s story began in Paris in 2008. Two friends, Travis Kalanick and Garrett Camp, were attending
LeWeb, an annual tech conference The Economist describes as “where revolutionaries gather to plot the
future."1 In 2007, both men had sold startups they co-founded for large sums. Kalanick sold Red Swoosh to
Akamai Technologies for $19 million while Camp sold StumbleUpon to eBay (EBAY) for $75 million. The concept
for Uber was born one winter night during the conference when the pair was unable to get a cab. Uber was
founded on a single idea: "What if you could request a ride from your phone?"

March, 2009. Kalanick and Camp, along with college buddies Oscar Salazar and Conrad Whelan, create the "black
car" ride service model that would ultimately become UberCab.

June, 2010. UberCab is launched in San Francisco, and the ride service immediately connects with the city's tech-
heavy, and car-ownership averse, urban professionals.

October, 2010. UberCab is renamed Uber, and the company snares $1.25 million in capital funding to expand.
Former Napster co-founder Shawn Fanning is an early investor. Two months later, CEO Graves steps down and is
replaced by Kalanick.

May, 2011. Uber rolls out in New York City, and is met with heavy resistance from the city's massive taxicab
industry. Six months later, Uber launches in Paris.

December, 2013. Uber drivers join up to file a lawsuit against Uber, looking to be designated as employees, and
not contract workers. It's the first of multiple showdowns between drivers and Uber.

August, 2014. Uber introduces UberPool, a ride-sharing model that enables riders to "pool" their rides and split the
fare between multiple parties.

April, 2015. UberEats is launched in Los Angeles, Chicago and New York, giving consumers the Uber experience
with food delivery. The service immediately catches on with young millennials too busy on the job to cook
dinners - giving Uber another profit line in the process.

February, 2017. Uber is hit with its first of several charges of sexual harassment in the workplace. A blog post
from a former company engineer lights the fuse with charges of a sexist workplace culture at Uber. Management
responds to the resulting outcry by hiring former U.S. Attorney General Eric Holder to investigate the matter, and
to look into the company's workplace culture. Five months later, Kalanick resigns as CEO after strong pressure
from the company's board of directors. He is replaced by Dara Khosrowshahi, the former CEO at Expedia (EXPE)
- Get Expedia Group, Inc. Report .

May, 2019.Uber goes public on the New York Stock Exchange, with an initial share price of $45, and a market
capitalization of $75.5 billion.

2 UE4 Manufacturing Process Management


Problematic

Uber first launched back in 2011, and since then it had made life easier for a lot of people with its transportation
system and set a new standard in the world of on command transportation. But what looks simple on Uber’s
frontend actually consists of complex architecture and services on the backend, including sophisticated routing
and matching algorithms that direct cars to people and people to places. Constant renovation of their route
solving system allowed them to evolve from several uberblacks in Francesco to delivering millions of rides
around the world every day.

The key problem behind this innovation can be presented as follows: What is the optimal route a driver can take to
deliver a set of costumers (or goods) to a set of locations?

To find the optimal trip for a driver, the system needs to solve a great mathematical challenge.
That means:

 receiving of all parameters (travel, time, traffic) for all points of all deliveries
 permutation of all combinations in the resulting chart, taking into account optimizations and
constraints to eliminate unnecessary options

Consider a set of customers represented by C = {1 . . . n}, such that a


positive demand is associated to each customer i ∈ C. To service these
customers, we have to design routes for a vehicle available near the
costumers. Each route must start at the driver’s spot, visit a set of
customers and take them to a set of destinations D= {1 . . . k}, then
return to his spot. All customers must be visited exactly once. Each
vehicle has a maximum capacity Q, which limits the number of
customers it can visit before returning to the original place. This
problem is considered a NP-Hard problem.

The algorithm needs to consider the distances between all the customer locations and their destinations to find
the optimal route that take a minimal time. The driver should always give priority to reaching costumer 1.

Constraint: All customers (goods) must reach their destinations eventually.

3 UE4 Manufacturing Process Management


TSP with Brute force algorithm

The TSP is an important problem in inspiring algorithmic research, to the substantial benefit of the
optimization community. It also provides a practical application in its own right, particularly in the context of
Vehicle Routing Problems (VRP). VRPs are common in industry and involve routing a set of vehicles to visit
a set of nodes at minimum cost. At its surface, the only substantive difference between the TSP and the
VRP is the latter’s use of multiple vehicles to service customer demand.

A Hamiltonian circuit is a circuit that visits every vertex once with no repeats. Being a circuit, it must start
and end at the same vertex.

Brute force algorithm (aka exhaustive search):

 List all the possible Hamiltonian circuits.


 Find the length of each circuit by adding edge weights
 Select the circuit with minimal total weight.

Let’s assume the following example:

This algorithm is not suited for a complex problem like uber transportations as it does not take into account
that a costumer should reach his destination and that all pickups should precede their associated delivery.
But it may work well with a smaller number of vertexes. Most industrial problems are complex and have a
lot of side constraints. And so, solving them with exact approaches is often impossible because of their
inflexibity.

4 UE4 Manufacturing Process Management


Traveling Salesman model with pickup and delivery TSP

The Pickup and Delivery Problem (PDP) is an increasingly prevalent industrial form of the VRP in which each
of a set of requests must be picked up from one or more locations and delivered to one or more delivery
points. Pickups must precede their associated deliveries in any feasible route, and each pair must be
serviced by the same vehicle. Given multiple pickup and delivery requests, the PDP seeks to route a set of
vehicles to service those requests at minimum cost. Solving a PDP with a single vehicle is equivalent to
solving a TSP with precedence constraints on the pickup and delivery nodes. This form is referred to as the
Traveling Salesman Problem with Pickup and Delivery (TSPPD).

The TSPPD is defined on an ordered set of pickup nodes V+


= {+1. . . +n} and associated delivery nodes V− = {−1 . . . −n}
such that (+i, −i) form a request and +i must precede −i in a
feasible route. V is defined as the union of V+ and V− with
the addition of origin and destination nodes {+0, −0}. E± is
the set of edges connecting V+ ∪V−. E is the union of E±
with all feasible edges connecting to the origin and
destination nodes. The graph G = (V, E) includes all nodes
and edges required to describe the TSPPD.

V = {+0, −0} ∪ V+ ∪ V− E = {(+0, −0)} ∪ {(+0, +i) | i ∈ V+} ∪ {(−0, −i) | i ∈ V−} ∪ E±

The edge (+0, −0) must be included in any feasible solution. The set of edges E is defined such that it
includes only feasible edges. That is, it is not possible that a TSPPD route begins with a delivery or ends with
a pickup.

Symmetric TSPPD:

Each edge (i, j) ∈ E is the same as the edge (j, i) and has the same costs and edge variables. cij specifies a
nonnegative cost for each edge (i, j) ∈ E. By convention, c+0,−0 = 0. xij ∈ {0, 1} is a binary decision variable for
each (i, j) ∈ E with the value xij = 1 if the edge (i, j) is in a solution and 0 otherwise. δ(S)
= {(i, j) ∈ E | i ∈ S, /∈ S} is the cutset containing edges that connect S ⊂ V and S¯ ⊂ V . For any node i ∈V δ (i)
= δ({i}). The STSPPD is defined using Formulation 1.

5 UE4 Manufacturing Process Management


Asymmetric TSPPD:

We associate the x variables with arcs (i.e. directed edges) and replace the two-degree constraints with
assignment constraints. Instead of an edge set E we define an arc set A which contains only the feasible
arcs for the ATSPPD.

Formulation 2 is more general since it supports arc costs that


are not the same bidirectionally. Further, it is intuitively
satisfying to consider the TSPPD this way, as there is a natural
asymmetry built into the structure of the problem: pickups must
precede their associated deliveries. As in Formulation 1, the
x−0,+0 arc connecting the start and end nodes must be part of
any feasible tour, +0 must connect to a pickup, and −0 must be
preceded by a delivery. One small additional difference is that
Formulation 2 does not include x variables for arcs starting at a
delivery and ending at its associated pickup.

Enumerative method:
Algorithm 1 uses a recursive function to search the feasible set
of TSPPD routes, while tracking the best solution discovered at
each point in the search tree. This algorithm maintains a
current node and a partial tour starting at +0. Every recursion
loops over the arcs from the current node and appends each
feasible one to the tour individually prior to recursing. If an arc’s
added cost puts a partial route’s cost over that of the best
known tour, that arc is ignored and its section of the search tree
effectively fathomed. If a complete tour improves the best
known solution, it is stored as the new incumbent. The key to
effective search and early discovery of good solutions is the
ordering technique for arcs. During initialization, each node is
assigned a sorted vector of next nodes. We use ascending arc
cost as our sorting function, and others can be easily
incorporated. Nodes that are infeasible for the current partial
route are skipped. A symmetric TSP instance with n pairs of
nodes has #TSP (n) = 1/2 (2n − 1)! unique solutions, while a
TSPPD of the same size has #TSPPD (n) = (2n)!/ 2^n.The size
of the feasible set of the TSPPD grows slower with respect to
the number of node pairs than that of the TSP. Obviously, the
set of feasible solutions of the TSPPD is a subset of the feasible
solutions to the TSP. Allowing only pickup and delivery node pairs in the route with precedence relations

6 UE4 Manufacturing Process Management


reduces the size of the TSP feasible set by 1/2n−1 . With fewer feasible solutions, the worst case complexity
of solving a TSPPD instance via enumeration

References:

 Exact Methods for Solving Traveling Salesman Problems with Pickup and Delivery in Real Time -
Ryan J. O’Neil · Karla Hoffman
 https://eng.uber.com/engineering-routing-engine/
 A real world case-study of a vehicle routing problem under uncertain demand
– Anan Mungwattana, Kusuma Soonpracha, Gerrit K. Janssens
 Uber Wikipedia Page

7 UE4 Manufacturing Process Management

You might also like