Logistics - Integer Programming
Logistics - Integer Programming
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
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}
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 -
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
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*