0% found this document useful (0 votes)
17 views60 pages

L14 Vehicle

The document discusses the Travelling Salesman Problem (TSP) and its methods of solving, including the Hungarian Method and Branch and Bound Algorithm. It also covers the Vehicle Routing Problem (VRP) and its extensions, such as the Multiple Traveling Salesman Problem (MTSP) and Generalized Vehicle Routing Problem (GVRP), emphasizing the importance of minimizing travel distance and costs in logistics. Various heuristics and algorithms are presented for optimizing routes and scheduling in transportation and distribution scenarios.

Uploaded by

f20221700
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views60 pages

L14 Vehicle

The document discusses the Travelling Salesman Problem (TSP) and its methods of solving, including the Hungarian Method and Branch and Bound Algorithm. It also covers the Vehicle Routing Problem (VRP) and its extensions, such as the Multiple Traveling Salesman Problem (MTSP) and Generalized Vehicle Routing Problem (GVRP), emphasizing the importance of minimizing travel distance and costs in logistics. Various heuristics and algorithms are presented for optimizing routes and scheduling in transportation and distribution scenarios.

Uploaded by

f20221700
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 60

Supply Chain Analytics


Topic: Travelling
Salesman
BITS Pilani Problem Vehicle Routing Problem
Pilani Campus
Travelling Salesman

What does a Travelling salesman do?


•A travelling salesman performs door-to-door sales

What is a travelling salesman problem?


•A set of cities and the distance between every pair of cities
is given, the problem is to find the shortest distance for a
salesman covering all the cities starting from the origin.

•Graph theory – Hamiltonian graph


go to each vertex once and only once and come back
Methods of Solving
Travelling Salesman
Problem

• Hungarian Method
• B & B Method
Hungarian Method
Objective:
To minimize the distance travelled by salesman
Steps:
1)Row minimization
2)Column minimization
3)Calculation of penalties for all zeroes and then eliminating the zero
with the maximum penalty

TSP is symmetric, triangular inequality


dij + dik >= dik
Problem:
• A Salesman has to visit five cities A,B,C,D and E. The
distance(in km) between the cities are as follows

A B C D E

A - 7 6 8 4

B 7 - 8 5 6

C 6 8 - 9 7

D 8 5 9 - 8

E 4 6 7 8 -
So, the route the salesman should take in
order to travel minimum distance is

AEBDCA

The total distance covered = 4+6+5+9+6 =


30km.
Formulation of Traveling Salesman Problem
(TSP) as an Assignment Problem
 A traveling salesman has to visit n cities and return to the starting
point
 He has to start from any one city and visit each city only once.
 Suppose he starts from the kth city and the last city he visited is m
 Let the cost of travel from ith city to jth city be cij.
 Then the objective function is
 Xij = 1 if the person goes immediately from i to j

m n
Minimize c
i 1 j 1
ij xij
Formulation of Traveling Salesman
Problem (TSP) as an Assignment Problem
…contd.

 subject to the constraints


n

x
i 1
ij 1 for j 1, 2,...n, i  j , i m
n

x
j 1
ij 1 for i 1, 2,...m, i  j , i m

xmk 1
xij 0 or 1
 Solution Procedure:
 Solve the problem as an assignment problem using the method
used to solve the above examples
 If the solutions thus found out are cyclic in nature, then that is the
final solution
Formulation of Traveling Salesman
Problem (TSP) as an Assignment Problem
…contd.

 Solution Procedure …contd.


 If it is not cyclic, then select the lowest entry in the table (other than
zero)
 Delete the row and column of this lowest entry and again do the zero
assignment in the remaining matrix
 Check whether cyclic assignment is available
 If not, include the next higher entry in the table and the procedure is
repeated until a cyclic assignment is obtained.

 Subtour of length 1, length 2


 This increases the number of constraints expontially,

9
Traveling Salesman Problem
(TSP) - Example
 Consider a four city TSP for which the cost between the city pairs are
as shown in the figure below. Find the tour of the salesman so that
the cost of travel is minimal.

Cost matrix

10
Traveling Salesman Problem (TSP) –
Example …contd.

 Solution:
 Step 1: The optimal solution after using the Hungarian method is
shown below.

 The optimal assignment is 1→ 4, 2→ 3, 3→ 2, 4→ 1 which is not


cyclic

11
Traveling Salesman Problem
(TSP) – Example …contd.
 Step 2:
 Consider the lowest entry ‘2’ of the cell (2,1)
 If there is a tie in selecting the lowest entry, then break the tie
arbitrarily
 Delete the 2nd row and 1st column
 Do the zero assignment in the remaining matrix

12
Traveling Salesman Problem
(TSP) – Example …contd.

 The resulting table is

 Next optimal assignment is 1→ 4, 2→1, 3→ 2, 4→ 3 which is cyclic


 Required tour is 1→ 4→3→ 2→ 1
 Optimal total travel cost is 5 + 9 + 4 + 6 = 24

13
Travelling Salesman Problem
Given a set of cities and distance between
every pair of cities, the problem is to find
the shortest possible route that visits
every city exactly once and returns to the
starting point.
Branch and Bound
Algorithm
A

B D
C
Introduction
● The vehicle routing problem (VRP) is a combinatorial
optimization and integer programming problem seeking to
service a number of customers with a fleet of vehicles.
● Often the context is that of delivering goods located at a
central depot to customers who have placed orders for
such goods. Objective of such problems is to minimize the
time and distance traveled.
● Many methods have been developed for searching for
good solutions to the problem, but for all but the smallest
problems, finding global minimum for the cost function is
computationally complex.
● Hence many good heuristics have been developed for
these types of problems which yield good solutions if not
optimal solutions.
Example
Consider a milk van delivering milk to four distribution centers (DC) every day
morning.
The objective of depot is to minimize the total cost of providing the services. This
includes the vehicle capital cost, mileage and personnel costs.
Feasibility

Minimum-cost solution or any other criterion like time


or distance traveled is subject to the tour being
feasible. Feasibility implies that
(i) A tour must include all nodes
(ii) A node must be visited only once
(iii) A tour must begin and end at a depot.
Multiple Traveling Salesman Problem (MTSP) is an extension of
the TSP used when a fleet of vehicles have to be routed from a
single depot. A set of routes are generated, one for each vehicle in
the fleet. A node is assigned to only one vehicle; A vehicle will
have more than one node assigned to it.

Vehicle Routing Problem (VRP) is a MTSP with capacity restriction


of the multiple vehicles coupled with varying demands at each
node. It is an important problem in the fields of transportation,
distribution and logistics. Several variations and specializations of
the vehicle routing problem exist like VRP problems having time
windows within which the deliveries must be made and VRP with
limited carrying capacity of vehicles.
Vehicle Scheduling

• Heuristic- Construction and Improvement


• Nearest neighborhood search

• Basic Vehicle scheduling formulation


• Heuristics
– Saving Matrix Method
Typical Vehicle Scheduling Problem

Depot at location 0 serving 10 retailers


Saving Algorithm
• Construct distance matrix
• Calculate savings for all the pairs of
customer i and j
Sij = C1i - Cij + Cj1
• Order savings in descending order
• Start at the top link, do following:
– If making a given link results in feasible
route( feasibility constraints, can be used to extend
one of the existing route or starting a new route),
append this link to solution, if not reject the link
– Repeat above step until no more links are left
Two Independent Routes Versus
Merged Routes
Saving Algorithm

Depot(1)

Ci1 Cj1

C1i C1j

Node i Node j

Savings if routes are merged = Ci1+Cj1-Cij


Vehicle Scheduling Exercise
Consider an instance of the VRP with the deport at vertex 1 and
six customers at vehicles 2, …., 7. The symmetric distance matrix is shown in table.
There are two vehicles with capacities Q1=Q2=6. The customer demands are (q2,
….q7) = (2,3,1,1,2,1).

Distance matrix for a VRP

-
1 2 3 4 5 6 7
1 -
2 28 -
3 21 47 -
4 14 36 26 -
5 17 25 37 15 -
6 18 20 30 31 29 -
7 22 35 20 34 39 16 -
Saving Matrix

2 3 4 5 6
3 2
4 6 9
5 20 1 16
6 26 9 1 6
7 15 23 2 0 24

Suggested routes based on Saving algorithm:


Route1 : 1-5-2-6-7-1
Route 2 : 1-3-4-1
Spatial Representation of Depot and Dealers
Cost Matrix

Distance
and load
related data
Saving Matrix
Final Routes Based on Saving Heurstics
Vehicle Route Planning:
Extensions
• Vehicle can operate multiple routes
• Time window for a customer
• Business may involve both deliveries and
collections
• Vehicles ( drivers) may have a time window
• Time consuming activities other than travel:
– Loading & unloading
– Queuing at loading and unloading
Vehicle Routing: Strategic Decisions
• Fixed versus dynamic routes
• Temporal consolidation
– Time based
– Quantity based’
• Nature of relationship with transport
carrier
– Short term versus long term contract
• Special vehicle versus standard vehicle
– Load and volume optimization
Vehicle Scheduling: Baroda Dairy
Routes Routes
(Present) (Using savings
Heuristic)

No. of Routes 12 10

Total Distance per Trip 988 km. 786

Annual saving (2 - 1,47,460 km.


trips per day for 365
days)

Expected cost reduction 20.4%


E-Retailing
• Provides the convenience of shopping from home
• E-retailer can provide higher variety compared to Brick and Mortar store
and still mange higher inventory turns
– Centralisation versus decentralisation of inventory
• Transportation cost is higher for e-retailer
– Small shipment size
– Last-mile transportation
• Product/market Characteristic
– Value density, Nature of demand uncertainty, Volume of demand
• Cases
– Dell Computers, Amazon, Webvan
• Grocery on net : Webvan Versus Tesco
• Indian Experiences: firstandsecond.com, and Rediff.com, Indiaplaza.com
Shipment Charges in E-retailing *

Source; WWW.Amazon.com
* Shipping within USA
Importance of Transportation Cost for Different
Category of Orders in E-retailing

*Transportation cost is calculated using Amazon.com rates for standard shipping In US


** Typical order for Dell, Amazon & Webvan respectively
Generalized Vehicle Routing
Problem
The Generalized Vehicle Routing Problem (GVRP) is an extension of the Vehicle Routing Problem (VRP).

The GVRP is the problem of designing optimal delivery or collection routes, subject to capacity
restrictions, from a given depot to a number of predefined, mutually exclusive and exhaustive node-sets
Let G = (V,A) be a directed graph with V = {0,1,2,....,n} as the set of vertices
and the set of arcs A = {(i,j) | i,j ∈ V,i ̸= j}. A nonnegative cost cij associated
with each arc (i,j) ∈ A. The set of vertices (nodes) is partitioned into k + 1
mutually exclusive nonempty subsets, called clusters.
The cluster V0 has only one vertex 0, which represents the depot, and remaining n
nodes belonging to the remaining k clusters represent geographically dispersed
customers.

There exist m identical vehicles, each with a capacity Q.

The generalized vehicle routing problem (GVRP) consists in finding the minimum
total cost tours of starting and ending at the depot, such that each cluster should
be visited by exactly once, the entering and leaving nodes of each cluster is the
same and the sum of all the demands of any tour (route) does not exceed the
capacity of the vehicle Q.
A local global heuristic for
GVRP
The last heuristic algorithm for solving the GVRP that we are going to describe is based on local-global approach
and it aims at distinguishing between global connections (connections between clusters) and local connections.

There are several generalized collection of routes, i.e. routes containing exactly one node from a cluster,
corresponding to a global collection of routes. Between these generalized collection of routes there exist one
called the best generalized collection of routes.
Let G′ be the graph obtained from G after replacing all nodes of a cluster Vi
with a supernode representing Vi. We will call the graph G′ the global graph.
For convenience, we identify Vi with the supernode representing it. Edges of
the graph G′ are defined between each pair of the graph vertices V1,...,Vk.
Vehicle routing system
Sequential steps in the routing process


Order Retrieval

Order geocoding

Travel time computation

Routing solution optimization

Manual editing of routing solutions

Routing solution release

Driver assignment
● A feasible route judged to be a good route if it completely
fills a vehicle and its order locations are in a tight cluster.
THANK YOU

BITS Pilani, Pilani Campus

You might also like