0% found this document useful (0 votes)
14 views

Logistics - Integer Programming

Uploaded by

P K
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Logistics - Integer Programming

Uploaded by

P K
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

LOGISTICS AND

DISTRIBUTION
MANAGEMENT
PROF. C. RAJENDRAN
DEPARTMENT OF MANAGEMENT STUDIES
IIT MADRAS
SUDOKU
SUDOKU – INTEGER PROGRAMMING
SUDOKU – INTEGER PROGRAMMING
Example
For the 1st column & number 7 (, the constraint 1 is
+ + ++++ +

For the 2nd row and number 7 (), the constraint 2 becomes,
+ + ++++ +

For The 1st cell in Sudoku, ( the constraint 3 and constraint 4 becomes
++ ++ +++
1 + 3+ 4 + 5+ 6 + 7++
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.
TRAVELLING SALESMAN PROBLEM
INPUT
CITY LOCATIONS/DISTANCE MATRIX

OUTPUT
ROUTE
EXAMPLE - IN A 5 CITY TSP 1-4-3-2-5-1
SOLUTION APPROACHES
EXACT METHODS
• Brute Force Algorithm
• MILP
• Dynamic Programming
• Branch and bound Algorithm

HEURISTICS
COMPLEXITY
• (n-1)! Permutations
FORMULATION
SUBTOURS
SUBTOUR ELIMINATION
CONSTRAINTS

• (Assuming city 1 as the starting point)


DYNAMIC PROGRAMMING
• DIVIDE INTO STAGES AND SOLVE
• IMPLICIT ENUMERATION
1 2 3 4
1 - 30 50 90
2 40 - 20 80
3 30 30 - 60
4 20 15 10 -
• STAGES
• STATE VARIABLE
• ALTERNATIVES
STAGE 1
Let

STATE VARIABLE
2 40
3 30
4 20
STAGE 2

{3} 20+30=50
2
{4} 80+20=100

{2} 30+40=70
3
{4} 60+20=80
{2} 15+40=55
4
{3} 10+30=40
STAGE 3

J
2 {3,4} Min {20+80,80+40} 100
Min
3 {2,4} 115
{30+100,60+55}
4 {2,3} Min {15+50,10+70} 65
STAGE 4

Min
1 {2,3,4} 130
{30+100,50+115,90+65}

Optimal Tour is 1-2-3-4-1


NEAREST NEIGHBOUR ALGORITHM
1 2 3 4 5
1 - 10 9 8 7
2 10 - 10 6 6
3 9 10 - 8 5
4 8 6 8 - 5
5 7 6 5 5 -

• Let the initial starting point be city 1


• Starting with city 1, the nearest neighbour is city 5,
• From city 5, the nearest neighbour is either 3 or 4, (breaking tie arbitrarily)
• From city 4, the nearest available neighbour is 2, (since city 5 is already visited, it is
eliminated to avoid sub-tours)
• From city 2, the nearest available neighbour is city 3, so the solution becomes (city 4 and
5 were already visited)
NEAREST NEIGHBOUR ALGORITHM

1 2 3 4 5
1 - 10 9 8 7
2 10 - 10 6 6
3 9 10 - 8 5
4 8 6 8 - 5
5 7 6 5 5 -

• The TSP heuristic solution is


• And the corresponding distance is 7+5+6+10+9=37
PENALTY METHOD
The penalty for not leaving to the nearest city is calculated (least value-second least value in a row)
The penalty for not arriving from a nearest city is calculated (least value – second least value in a
column)

1 2 3 4 5 PENALTY
1 - 10 9 8 7 1
2 10 - 10 6 6 0
3 9 10 - 8 5 3
4 8 6 8 - 5 1
5 7 6 5- 5 - 0
PENALTY 1 0 3 1 0

The penalty of not leaving to the nearest city 5 from city 3 is 3. Therefore, let the partial route be 3-5
(Eliminate the row for city 3, and the column for city 5 and make the distance between 5-5 as infinity)
PENALTY COST METHOD
• The penalty of not leaving to the nearest city 4 from city 2 is 4.
Therefore, let the partial route be 2-4

1 2 3 4 PENALTY
1 - 10 9 8 1
2 10 - 10 6 4
4 8 6- 8 - 2
5 7 6 - 5 1
PENALTY 1 0 1 1

• Eliminate the city 2 row and city 4 column and make distance
between 4-2 infinity(eliminating sub tour)
PENALTY COST METHOD
• The penalty of not arriving from the nearest city 5 to city 2 is 4. Therefore, let
the partial route be 5-2
1 2 3 PENALTY
1 - 10 9 1
4 8 - - 0
5 7 6 - 1
PENALTY 1 4 1

• Now the sequence is 3-5-2-4


• 4-2,4-5 ,4-3 can form sub tour. 4-2, 4-5 already removed.
• So remove 4-3, as well.
PENALTY COST METHOD
• The sequence is 1-3-5-2-4-1
1 3
1 - 9
4 8 -
VEHICLE ROUTING PROBLEM
• CAPACITATED TRAVELLING SALESMAN PROBLEM
• NP- hard
CLARKE-WRIGHT SAVINGS HEURISTIC
FOR SINGLE DEPOT VRP
• Identify distance matrix
• Identify Savings matrix
• Assign customers to vehicles or routes
• Sequence customers within routes
DISTANCE MATRIX
DEMA-
DC 1 2 3 4 5 6 7 8 9 10 11 12 13 ND
DC 0
1 12 0 48
2 8 9 0 36
3 17 8 10 0 43
4 15 9 8 4 0 92
5 15 17 9 14 11 0 57
6 20 23 15 20 16 6 0 16
7 17 22 13 20 16 5 4 0 56
8 8 17 9 19 16 11 14 10 0 30
9 6 18 12 22 20 17 20 16 6 0 57
10 16 23 14 22 19 9 8 4 8 14 0 47
11 21 28 18 26 22 11 7 6 13 19 5 0 91
12 11 22 14 24 21 14 16 12 5 7 9 13 0 55
13 15 27 20 30 28 22 23 20 12 9 16 20 8 0 38
SAVINGS
SAVINGS MATRIX
• Savings
• For Example
SAVINGS MATRIX
1 2 3 4 5 6 7 8 9 10 11 12 13 DEMAND
1 48
2 11 36
3 21 15 43
4 18 15 28 92
5 10 14 18 19 57
6 9 13 17 19 29 16
7 7 12 14 16 27 33 56
8 3 7 6 7 12 14 15 30
9 0 2 1 1 4 6 7 8 57
10 5 10 11 12 22 28 29 16 8 47
11 5 11 12 14 25 34 32 16 8 32 91
12 1 5 4 5 12 15 16 14 10 18 19 55
13 0 3 2 2 8 12 12 11 12 15 16 18 38
HEURISTIC SOLUTION
For the vehicle capacity 200
Vehicle 1 : Customers 6 and 11 – SAVINGS -34; VEHICLE LOAD – 16+91 =107. D-(6-11)-D
Vehicle 1: Add customer 7 near 6. SAVINGS – 33; LOAD = 107+56=163. D-(7-6-11)-D
Customers 7 and 11 with savings 32 are already on the same route
Customer 10 cannot be added to vehicle 1 due to capacity constraints
Therefore, create vehicle 2 : D-10-D
Customers 6 and 5/ customers 10 and 7 with savings 29 cannot be added because of
capacity constraints
Customers 3 and 4 with savings 28 are combined into a third vehicle. D-(3-4)-D
Continue this iteration until all the vehicles are covered, vehicles can also be combined
without violating the capacity constraints
SOLUTION
• D-1-3-4-D
• D-2-9-D
• D-6-7-8-11-D
• D-5-10-12-13-D
MAXIMAL FLOW PROBLEM

1 9
7

f 3 f
s d

9 8
2
FORMULATION
SHORTEST ROUTE PROBLEM

25
2 5

15 10 20 10

30
1 4 7

15 15
20 20
3 6
20
SHORTEST ROUTE PROBLEM

Subject to
+=1
=+
=+
+=++
+=
+=
+
All
DIJKSTRA’S ALGORITHM
• Initiate
• For all labelled node , Calculate , if there is an arc in the network. Find
the minimum and label the corresponding node =
• Repeat the previous step till the destination node is labelled
DIJKSTRA’S ALGORITHM

2 3 4 5 6 7
Iteration 1
15* 20 - - - -
2 3 4 5 6 7
Iteration 2
15 20* 25 40 - -
2 3 4 5 6 7
Iteration 3
15 20 25* 40 40 -
2 3 4 5 6 7
Iteration 4
15 20 25 40 40* 55
2 3 4 5 6 7
Iteration 5
15 20 25 40* 40 55
2 3 4 5 6 7
Iteration 6
15 20 25 40 40 50*

You might also like