Kapitel 3 - univie.ac.at

Download Report

Transcript Kapitel 3 - univie.ac.at

Chapter 3
Transportation Problems
Design of Transport Networks
Transportation Problem: Model & LP

Situation:
 Location of warehouses and customers are given
 Supply and demand given
 Example:
 3 warehouses and 4 customers
 Transportation cost per unit from i to j
 Total demand must be = total supply
Factory or
customer
warehouse
V1
V2
V3
V4
Production
F1
10
5
6
11
25
F2
2
2
7
4
25
F3
9
1
4
8
50
Demand
15
20
30
35
100
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 2
Solution in the Uncapacitated case
No capacity constraint
 solution using column minimum procedure
customer
Factory
F1
10
F2
1
F3
9
Demand
Total cost =
Kapitel 3/3
V1
15
V2
5
6
11
2
7
4
1
15
V3
20
4
20
30
30
V4
Capacity
used
35
15 + 35 = 50
8
20 + 30 = 50
35
15 * 1 + 20 * 1 + 30 * 4 + 35 * 4 = 295
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Capacity constraints
Not all customers will be delivered from their closest
factory!
Solution as a special LP problem
- starting (basic feasible) solution
- iteration (modi, stepping stone)
Kapitel 3/4
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Capacity constraints
Total capacity = total demand
Customer
V1
V2
V3
V4
capacity
F1
10
5
6
11
25
F2
1
2
7
4
25
F3
9
1
4
8
50
Demand
15
20
30
35
100
100
Kapitel 3/5
(c) Prof. Richard F. Hartl
QEM - Chapter 3
100
Factory
Constructive Heuristics (Basic Feasible Solution)
Heuristics:
 Simple to apply, Simple to understand
 „Reasonably“ good solutions
 Optimality not guaranteed
Examples:
Column minimum („Greedy“)
Vogel approximation („Regret“)
Kapitel 3/6
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Column Minimum Algorithm
0. Initialization: empty transport tableau. No rows or columns are deleted
1. Proceed with the first (not yet deleted) column (from left to right)
2. In choose the cell with the smallest unit cost cij and choose
transportation quantity xij maximal.
3. If column resource depleted  delete column j,
OR
if row resource depleted  delete row i.
4. Just one row or columd not deleted
 all cells in this row or colum get maximal transportation quantity
Otherwise continue with 1.
EXAMPLE
Kapitel 3/7
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Column Minimum Algorithm
1
i/j
1
2
3
10
2
5
1
3
6
2
4
11
7
9
Demand
Total cost =
1
15
25
25 0
10
25 10 0
50 30 0
4
15
4
Capacity
8
20
30
0
20
30
35
Just one
colums not
deleted
100
15 * 1 + 20 * 1 + 30 * 4 + 25 * 11 + 10 * 4 + 0 * 8
= 470
ALGORITHM
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3/8
Vogel Approximation
0. Initialization: empty transport tableau. No rows or columns are deleted
1.
2.
3.
4.
In each row and column (not yet deleted) compute opportunity cost
= difference between the smallest and the second smallest cij (not yet
deleted).
Where this opportunity cost is largest choose smallest cij and make xij
maximal.
If column resource depleted  delete column j,
OR
if row resource depleted  delete row i.
Just one row or columd not deleted
 all cells in this row or colum get maximal transportation quantity
Otherwise continue with 1.
Kapitel 3/9
SS 2011
EK Produktion & Logistik
Vogel Approximation
1
i/j
1
2
3
10
1
15
9
Nachfrage
2
4
5
6
2
7
4
1
4
8
15
8
3
20
4
5
30 5
20
1
25
2
11
capacity
25
1
5
10
25 10
1
2
25
50 30
3
4
35 25
Column
deleted 
recompute
row
differences
100
4 3
Row deleted  recompute column differences
Jut one row not deleted
Total cost =
15 * 1 + 20 * 1 + 25 * 6 + 5 * 4 + 10 * 4 + 25 * 8
= 445
SS 2011
(besser als 470 zuvor)
EK Produktion & Logistik
Kapitel 3/10


General formulation:

m supplyers with supply si, i = 1, …, m

n customers with demand dj, j = 1, …, n

Transportation cost cij per unit from i to j, i = 1, …, m; j = 1, …, n
LP-Formulation:

variable: Transportation quantity xij from i to j
Transportation cost
m n
K
  cij xij  min
i 1 j 1
n
Supply
si 
Demand
dj 
m
 xij
j = 1, …, n
j 1
m
i 1
n
s   d
i
i =1
(c) Prof. Richard F. Hartl
i = 1, …, m
xij  0
Non negativity
Data must satisfy
 xij
j 1
j
i = 1, …, m; j = 1, …, n
M
QEM - Chapter 3
Total demand = Total supply
Kapitel 3 / 11

In example:

K = (10x11+5x12+6x13+11x14) + (x21+2x22+7x23+4x24) + (9x31+x32+4x33+8x34)  min

Supply:
 x11 + x12 + x13 + x14
x21 + x22 + x23 + x24
x31 + x3 2+ x33 + x34



Damand:
 x11

x12



+ x21
+ x22
x13
x14
+ x31
+ x32
+ x23
+ x24
+ x33
+ x34
= 25
= 25
= 50
(i=1)
(i=2)
(i=3) :
= 15
= 20
= 30
= 35
(j=1)
(j=2)
(j=3)
(j=4)
Non negativity:
 xij  0 für i = 1, … , 3; j = 1, … , 4
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 12

Solution:

As LP (o.k. but less efficient)

Make use of special structure:
1
...
1
1
...
1
...
1
1
1
.
...
.
.
...
1
.
.
.
.
.
1
.
1
1

In each column exactly 2 of the m + n elements are ≠ 0

Transportation simplex or network simplex

Starting solution

Iteration (stepping stone)
(c) Prof. Richard F. Hartl
1
QEM - Chapter 3
Kapitel 3 / 13
Exakt Algorithm: MODI, Stepping Stone



Equivalent to simplex method
Start with basic feasible solution (m+n-1 basic variables)
Iteration step:
 Initalize the tableau
2
c11
c12
c21
c22
…
…
n
c1n
c2n
cm2
…
cm1
…
…
…
…
m
2
…
cmn
dj
d1
d2
…
dn
vj
v1
v2
…
vn
(c) Prof. Richard F. Hartl
QEM - Chapter 3
si
ui
s1
u1
s2
u2
…
1
1
…
i\j
sm
um
Kapitel 3 / 14

Compute dual varables ui und vj [MODI]
cij = ui + vj if xij is basic variable

Since ui and vj are not unique, normalize one of these dual varables =
0. (Choose row or colums with most basic varaibles
 easier computation of ui and vj)

For all non basic variables compute cij – ui – vj
(reduced cost coefficient in objective function).
New (entering) BV where this coefficient is most negative.
If all coefficients non-negative  optimal solution.

Increase new BV and perform chain reaction (donor cell, recipient cell).
Transportation quantities in each row and column must remain same.
The BV, which first becomes zero, leaves the basis. [stepping stone]

Compute new basic solution (perform chain reaction).
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 15
Example

For didactical raesons we choose poor starting solution, because after
Vogel only few steps (if any) can be demonstrated
i\j
1
2
10
3
5
4
-4
6
1
-6
2
7
10
5
3
4
0
25
-3
50
-6
-7
1
2
15
4
8
15
35
dj
15
20
30
35
vj
10
5
10
14
(c) Prof. Richard F. Hartl
25
10
2
9
ui
-3
11
1
15
si
QEM - Chapter 3
16

Total cost = 10*15 + 5*10 + 2*10 + 7*15 + 4*15 + 8*35 = 665.

Check equality of primal and dual objective (optional):
K
m n
m
n
i 1 j 1
i 1
j 1
  cij xij   ui si   v j d j

K = 25*0 + 25*(-3) + 50*(-6) + 15*10 + 20*5 + 30*10 + 35*14 = 665

The most negative cost ceofficient cij – ui – vj of a NBV is -7 for
 new basic variable x24.

x24
Chain rection: increase new BV (starting from 0) by  investigate consequences for
other BV (in some row and some column  must be subtracted)
The BV, that constrains  most is the leaving BV.
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 17

Chain reaction:

New BV x24 increases from 0 to .
Add +  odor -  for some other BV.

If x24 increases by , x23 and x34 will decrease by , and x33 increases by .
For  = 15 BV x23 becomes 0 → BV x23 leaves.
i\j
1
2
10
3
5
4
-4
6
si
1
-6
2
7
10
5
3
4
0
25
-3
50
-6
-7
1
2
+
15-
4
8
15+ 
35- 
dj
15
20
30
35
vj
10
5
10
14
(c) Prof. Richard F. Hartl
25
10
2
9
K = 665 – 7 * 
= 665 – 7*15 = 560
-3
11
1
15
ui
QEM - Chapter 3
Kapitel 3 / 18

New BV x24 gets value  = 15 → chain reaction
 x34 = 35-15 = 20

x33 = 15+15 = 30

x23 is no BV anymore, all other BV remain same

Next iteration:
i\j
1
2
10
1
3
5
15- 
1
-6
2
-2
3
3
6
2
7
7
-5
K = 560 – 6 * 
= 560 – 6*10 = 500
25
0
25
-3
50
1
4
10- 
1
ui
4
11
15
4
8
30
20
dj
15
20
30
35
vj
10
5
3
7
(c) Prof. Richard F. Hartl
si
10+ 

9
4
QEM - Chapter 3
Kapitel 3 / 19

Next iteration:
i\j
1
2
10
1
5
1
6
7
7
4
3
1
4
= 500 – 3*5 = 485
25
0
25
-9
50
-5
8
30- 
20+ 
dj
15
20
30
35
vj
10
5
9
13
(c) Prof. Richard F. Hartl
K = 500 – 3 * 
4
15- 
1
ui
-2
11
10+ 
9
si

20
2
4
-3
6
5- 
2
3
QEM - Chapter 3
Kapitel 3 / 20

Next iteration:
i\j
1
2
3
10
3
5
1
6
20-
1
4
2
3
si
5+ 
7
15
4
3
0
25
-6
50
-2
10
1
-2

4
8
25- 
25
dj
15
20
30
35
vj
7
5
6
10
(c) Prof. Richard F. Hartl
25
4
2
9
K = 485 – 2 * 
= 485 – 2*20 = 445
1
11
7
ui
QEM - Chapter 3
Kapitel 3 / 21
Next iteration:

i\j
1
2
3
10
3
2
5
4
6
si
ui
25
2
1
11
1
All coefficients nonnegative → optimal
solution found.
25
1
2
5
7
7
4
2
15
9
4
3
-4
50
0
10
1
4
8
20

25
25
5
dj
15
20
30
35
vj
5
1
4
8

Basic variables:
 x13 = 25
 x21 = 15
 x24 = 10
 x32 = 20
 x33 = 5
 x34 = 25
Total cost: K = 445
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 22
Sensitivity analysis

TP is a LP-Problem with equality constraints
 dual variables ui azw. vj can also be negative (free variables).

From duality theory follows
si  si +  for some i and
dj  dj +  for some j
If  small enough, then the dual variables ui and vj do not change
 cost change by (ui + vj):
K  K + (ui + vj)

Clearly some si AND soem dj must change at the same time;
Otherwise total demand ≠ total capacity
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 23

Example:
i\j
1
2
1
3
4
4
2
5
1
10
6
12
1
5
2
5
ui
22
22+

0
24
2
16
1
6
13
7
si
11
3

Change of data?
s1  s1 +  and
d2  d2 + 
5
3
10
6
dj
10
1313+ 
22
17
vj
1
-1
2
4
Optimal cost change to K = 173 + (u1 + v2) = 173 - ; i.e. cost decrease!
(this paradoxon can occur if some ui and/or vj are negative. In most cases cost will
increase.)
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 24

How large can  be before basis changes: similar to stepping stone
i\j
1
2
1
4
3
2
1
5
12+
10
6
4
1
2
5
5
11-
3
3
ui
22
+
0
24
2
16
1
6
13+
7
si

K = 173 - 

Check: K =
1*10+2*(12+ ) +
1*(13+ ) +6*(11- )
+3*(10- ) +5*(6 + )
= 173 - 
5
10-
6+
dj
10
13 + 
22
17
vj
1
-1
2
4
Clearly x33 first becomes 0, if  increases. Hence upper bound  10.
Similar for negative .
Here x34 first becomes 0, if  decreases. Hence lower bound  -6.
(c) Prof. Richard F. Hartl
QEM - Chapter 3
Kapitel 3 / 25