50
1 The Transportation Problem Experience the Joy! Feel the Excitement! Share in the Pleasure!

The Transportation Problem - University of Daytonacademic.udayton.edu/charlesebeling/MSC521/PDF_PPT Files... · Shipping costs per unit shipped. 4. The LP Formulation Min z c x subject

Embed Size (px)

Citation preview

1

The Transportation Problem

Experience the Joy!Feel the Excitement!Share in the Pleasure!

2

The ProblemA company manufactures a single product ateach of m factories. Factory i has a capacity ofSi per month. There are n warehouses receivingthis product. The demand at warehouse j is Dj.It cost factory i, cij dollars to ship one unit towarehouse j. How many units should each factorysend to each warehouse in order to minimize thetotal transportation costs?

This is a really neat problem.

3

More of the Problem

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Shipping costs per unit shipped

4

The LP Formulation

Min z c x

subject to

x S i m

x D j n

x

ij ijj

n

i

m

ijj

n

i

ij ji

m

ij

=

≤ =

= =

==

=

=

∑∑

11

1

1

1 2

1 2

0

:

, ,...,

, ,...,

Let xij = the number of units sent from factory i to warehouse j

5

Initial Tableau

Eq basic z xij . . . zi . .. zm+j . . .RHSno. Var

0 z 1 -cij -M -M 01

i zi 0 1 1 si

m+j zm+j 0 1 1 dj

6

Min z = 12x11 + 13x12 + 10x13 + 11x4 + 10x21 + 12x22 + 14x23+ 10x24 + 14x31 + 11x32 + 15x33 + 12x34

The Objective Function

7

Min z = 12x11 + 13x12 + 10x13 + 11x4 + 10x21 + 12x22 + 14x23+ 10x24 + 14x31 + 11x32 + 15x33 + 12x34

Subject to:x11 + x12 + x13 + x14 = 10x21 + x22 + x23 + x24 = 9x31 + x32 + x33 + x34 = 7

Supplyconstraints

Supply Constraints

8

Min z = 12x11 + 13x12 + 10x13 + 11x4 + 10x21 + 12x22 + 14x23+ 10x24 + 14x31 + 11x32 + 15x33 + 12x34

Subject to:x11 + x12 + x13 + x14 = 10x21 + x22 + x23 + x24 = 9x31 + x32 + x33 + x34 = 7

Supplyconstraints

x11 + x21 + x31 = 6x12 + x22 + x32 = 5x13 + x23 + x33 = 7x14 + x24 + x34 = 8

Demandconstraints

Demand Constraints

9

Min z = 12x11 + 13x12 + 10x13 + 11x4 + 10x21 + 12x22 + 14x23+ 10x24 + 14x31 + 11x32 + 15x33 + 12x34

Subject to:x11 + x12 + x13 + x14 = 10x21 + x22 + x23 + x24 = 9x31 + x32 + x33 + x34 = 7

Supplyconstraints

x11 + x21 + x31 = 6x12 + x22 + x32 = 5x13 + x23 + x33 = 7x14 + x24 + x34 = 8

Demandconstraints

A Redundant Constraint

10

Min z = 12x11 + 13x12 + 10x13 + 11x4 + 10x21 + 12x22 + 14x23+ 10x24 + 14x31 + 11x32 + 15x33 + 12x34

Subject to:x11 + x12 + x13 + x14 = 10x21 + x22 + x23 + x24 = 9x31 + x32 + x33 + x34 = 7

Supplyconstraints

x11 + x21 + x31 = 6x12 + x22 + x32 = 5x13 + x23 + x33 = 7x14 + x24 + x34 = 8

Demandconstraints

Isn’t one ofthose constraintsredundant?

A Redundant Constraint

11

The Northwest CornerStarting Solution-1

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

12

The Northwest CornerStarting Solution-2

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

13

The Northwest CornerStarting Solution-3

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6 4

14

The Northwest CornerStarting Solution-3

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6 4

1

15

The Northwest CornerStarting Solution-4

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6 4

1 7

16

The Northwest CornerStarting Solution-5

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6 4

1 7 1

17

The Northwest CornerStarting Solution-6

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6 4

1 7 1

7

Cost = $ 328

18

The Northwest CornerStarting Solution-7

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Cost = $ 328

6 4

1 7 1

7

Basic cells

19

The Northwest CornerStarting Solution-8

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Cost = $ 328

6 4

1 7 1

7

Non-basiccells

20

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

+

- +

-

10-12+13-12 = -1

Ring-around-the rosie-1a

6 4

1 7 1

7

Step 1: Find a non-basic cell to become basic.

21

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-1b

6 4

1 7 1

7

-1

Step 1: Find a non-basic cell to become basic.

22

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-1c

6 4

1 7 1

7

+-

-

10-14+12-13 = -5

+

Step 1: Find a non-basic cell to become basic.

-1

23

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-1d

6 4

1 7 1

7

-5

Step 1: Find a non-basic cell to become basic.

-1

24

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-2a

6 4

1 7 1

7

-1

-5 +

+

--

11-10+12-13 = 0

25

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-2b

6 4

1 7 1

7

-1

-5 0

26

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-3a

6 4

1 7 1

7

-1 +

+ -

-5+ 0-

-

14-12+13-12+10-12 = 1

27

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-3b

6 4

1 7 1

7

-1

-5 0

1

28

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-3c

6 4

1 7 1

7

-1

-5 0

1

29

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-3d

6 4

1 7 1

7

-1

-5 0

1 -3

30

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-4

6 4

1 7 1

7

-1

-5 0

1 -3 -1

Select the most negative

31

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-5

6 4

1 7 1

7

+

--

10-14+12-13 = -5

+

Step 2: From among the negative cells -select the one that goes to zero first.

32

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

Ring-around-the rosie-6

6 4

1 7 1

7

+-

-

+

Step 3: Generate the new basic solution by adding and subtractingthe minimum cell quantity to each affected cell.

4

35

10-14+12-13 = -5

Cost = $328 - 5 x 4 = $308

33

The Problem Solution –demo1

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

34

The Problem Solution –demo2

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

35

The Problem Solution –demo3

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

36

The Problem Solution –demo4

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

37

The Problem Solution –demo5

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

38

The Problem Solution –demo6

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

39

The Problem Solution -1

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

+ +

-6

-4 -3 -1

40

The Problem Solution -1continued

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

41

The Problem Solution -2

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 2

- +

+ -3

73

Cost = $308 - 6 x 3 = $290

42

The Problem Solution -3

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

6

5 1

7

4

3

Iteration 3

3

73 -1 -1

+

+ -3 +

43

The Problem Solution -4

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

3

5 1

7

7

Iteration 3

3 - +

+ -5

6

2

Cost = $290 - 3 x 5 = $275

44

The Problem Solution -5

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

3

6

2

7

Iteration 4

3

5

- + -1

+ - 36

3

Cost = 275 -1 x 3 = 272

45

+1 +3

+3 +5

+2 +4

The Problem Solution -6

Warehouse

Factory1 2 3 4 Supply

1 12 13 10 11 10

2 10 12 14 10 9

3 14 11 15 12 7Demand 6 5 7 8 26

3

6

2

7

Iteration 4

3

5

36

3

Cost = 275 -1 x 3 = 272

This appears to be optimal!

46

S Di jj

n

i

m

≠==∑∑

11

What happens if

Supply =100 demand =120

A Question?

47

Dummy

0

0

0

30

Answer -Add aDummy Column

S Di jj

n

i

m

>==∑∑

11

Month 1 2 3 Supply

1 2 3 4 20

2 M 3 4 30

3 M M 4 50Demand 15 25 30 100

48

Dummy 0 0 0 700

Or Add aDummy Row

S Di jj

n

i

m

<==∑∑

11

Dayton New York Columbus Excesscapacity

DP&L 9.5 11.2 10.0 500

First Energy 10.2 11.0 9.4 1000

Long IslandLight

12.0 9.1 11.3 2000

Peakdemand

1000 2300 900 4200

Power requirements in 1000 KWH

49

A Paradox? - Less cost more?A B supply

1 1 4 20

2 7 1 17

Demands 20 17 37

A B supply

1 1 4 20

2 7 1 17

Demands 20 17 37

20 0

17

Cost = $37

--- 9

-----12

12 8

9

Cost = $53

WarehouseFactory

WarehouseFactory

50

The Transportation Problem

This has been a fast paced ride through a wondrous land in which

the movement of a single commodity from source to destination is optimized.