## Slide 2

### Slide 2 text

Enjoy! • We will solve an optimal transform problem by Network Simplex method. • An example and its solution follows the article below. • Transportation Problem: Transportation Simplex Method by Rodion Chachura. • https://geekrodion.medium.com/transportation-problem-balancing- fc95df5c6677 • I strongly recommend that you read through the article in advance.

## Slide 3

### Slide 3 text

Example (given) 30 70 50 Supply Demand 40 30 40 40 10 8 5 4 7 6 6 8 2 2 2 1 Cost

## Slide 4

### Slide 4 text

North West Corner Rule 30 70 50 Supply Demand 40 30 40 40

## Slide 5

### Slide 5 text

North West Corner Rule 0 70 50 Supply Demand 30 10 30 40 40 Transportation amount

## Slide 6

### Slide 6 text

North West Corner Rule 0 60 50 Supply Demand 30 10 0 30 40 40

## Slide 7

### Slide 7 text

North West Corner Rule 0 30 50 Supply Demand 30 10 30 0 0 40 40

## Slide 8

### Slide 8 text

North West Corner Rule 0 0 50 Supply Demand 30 10 30 30 0 0 10 40

## Slide 9

### Slide 9 text

North West Corner Rule 0 0 40 Supply Demand 30 10 30 30 10 0 0 0 40

## Slide 10

### Slide 10 text

North West Corner Rule 0 0 0 Supply Demand 30 10 30 30 10 40 0 0 0 0 Initial basic feasible solution

## Slide 11

### Slide 11 text

10 8 5 4 7 6 6 8 2 2 2 1 North West Corner Rule 0 0 0 Supply Demand 30 10 30 30 10 40 0 0 0 0 Total cost = 30*2 + 10*10 + 30*8 + 30*5 + 10*6 + 40*6 = 930

## Slide 12

### Slide 12 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=? u3=? Supply Demand 30 10 30 30 10 40 v1=? v2=? v3=? v4=? Set u1=0 Basic variables

## Slide 13

### Slide 13 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=? u3=? Supply Demand 30 10 30 30 10 40 v1=2 v2=? v3=? v4=?

## Slide 14

### Slide 14 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=? Supply Demand 30 10 30 30 10 40 v1=2 v2=? v3=? v4=?

## Slide 15

### Slide 15 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=? Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=? v4=?

## Slide 16

### Slide 16 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=? Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=?

## Slide 17

### Slide 17 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=9 Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=?

## Slide 18

### Slide 18 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=9 Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=-1

## Slide 19

### Slide 19 text

10 8 5 4 7 6 6 8 2 2 2 1 Check feasibility u1=0 u2=8 u3=9 Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=-1 -2 -5 -2 3 4 3 Calculate w for all non-basic variables Illegal edges which does not meet the constraint Maximum value → Entering variable

## Slide 20

### Slide 20 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot u1=0 u2=8 u3=9 Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=-1 Specify the loop

## Slide 21

### Slide 21 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot u1=0 u2=8 u3=9 Supply Demand 30 10 30 30 10 40 v1=2 v2=0 v3=-3 v4=-1 Find an odd cell (blue) with the smallest value → 10 Yellow: even cell Blue: odd cell

## Slide 22

### Slide 22 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot u1=0 u2=8 u3=9 Supply Demand 30 10-10 30 30+10 10-10 40 v1=2 v2=0 v3=-3 v4=-1 Yellow: even cell Blue: odd cell 0+10 Update values in the loop

## Slide 23

### Slide 23 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot u1=0 u2=8 u3=9 Supply Demand 30 0 30 40 40 v1=2 v2=0 v3=-3 v4=-1 10 Successfully update the solution! Total cost = 30*2 + 30*8 + 40*5 + 10*7 + 40*8 = 890 ← 930 0 Drop this cell (smallest odd cell) from the basic variables.

## Slide 24

### Slide 24 text

10 8 5 4 7 6 6 8 2 2 2 1 Again, check feasibility Supply Demand 30 30 40 40 10 u1=0 u2=? u3=? v1=? v2=? v3=? v4=? Set u1=0 0

## Slide 25

### Slide 25 text

10 8 5 4 7 6 6 8 2 2 2 1 Again, check feasibility Supply Demand 30 30 40 40 10 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 0

## Slide 26

### Slide 26 text

10 8 5 4 7 6 6 8 2 2 2 1 Again, check feasibility Supply Demand 30 30 40 40 10 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 -2 -5 2 7 -4 -1 Calculate w for all non-basic variables 0 Illegal edges which does not meet the constraint

## Slide 27

### Slide 27 text

10 8 5 4 7 6 6 8 2 2 2 1 Again, check feasibility Supply Demand 30 30 40 40 10 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 -2 -5 2 7 -4 -1 0 Maximum value → Entering variable

## Slide 28

### Slide 28 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot Supply Demand 30 30 40 40 10 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 0 Specify the loop Yellow: even cell Blue: odd cell Find an odd cell (blue) with the smallest value → 0

## Slide 29

### Slide 29 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot Supply Demand 30 30 40 40-0 10+0 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 0-0 Yellow: even cell Blue: odd cell 0+0 Update values in the loop

## Slide 30

### Slide 30 text

10 8 5 4 7 6 6 8 2 2 2 1 Looping pivot Supply Demand 30 30 40 40 10 u1=0 u2=8 u3=5 v1=2 v2=0 v3=-3 v4=3 0 Successfully update the solution! Total cost = 30*2 + 30*8 + 40*5 + 10*7 + 40*8 = 890 ← 890 Not getting worse!

## Slide 31

### Slide 31 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 40 40 10 0 Again, check feasibility u1=0 u2=? u3=? Set u1=0 v1=? v2=? v3=? v4=?

## Slide 32

### Slide 32 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 40 40 10 0 Again, check feasibility u1=0 u2=1 u3=5 v1=2 v2=7 v3=4 v4=3

## Slide 33

### Slide 33 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 40 40 10 0 Again, check feasibility u1=0 u2=1 u3=5 v1=2 v2=7 v3=4 v4=3 5 2 2 -7 3 6 Calculate w for all non-basic variables Maximum value → Entering variable

## Slide 34

### Slide 34 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 40 40 10 0 Looping pivot u1=0 u2=1 u3=5 v1=2 v2=7 v3=4 v4=3 Find an odd cell (blue) with the smallest value → 30

## Slide 35

### Slide 35 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 40 10 10 30 Looping pivot u1=0 u2=1 u3=5 v1=2 v2=7 v3=4 v4=3 Update values in the loop 30

## Slide 36

### Slide 36 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 40 10 10 30 Looping pivot u1=0 u2=1 u3=5 v1=2 v2=7 v3=4 v4=3 30 Successfully update the solution! Total cost = 30*2 + 40*5 + 30*4 + 10*7 + 30*6 + 10*8 = 710 ← 890

## Slide 37

### Slide 37 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 40 10 10 30 u1=0 u2=1 u3=5 v1=2 v2=1 v3=4 v4=3 30 Again, check feasibility -1 2 2 -7 3 -6 Calculate w for all non-basic variables Maximum value → Entering variable

## Slide 38

### Slide 38 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 40 10 10 30 u1=0 u2=1 u3=5 v1=2 v2=1 v3=4 v4=3 30 Looping pivot Find an odd cell (blue) with the smallest value → 10

## Slide 39

### Slide 39 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 10 40 u1=0 u2=1 u3=5 v1=2 v2=1 v3=4 v4=3 30 Looping pivot Update values in the loop 10

## Slide 40

### Slide 40 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 10 40 u1=0 u2=4 u3=5 v1=2 v2=1 v3=1 v4=0 30 Again, check feasibility 10 -1 -1 -1 -3 -3 -4 GREAT! No illegal edges. This is the optimal transportation.

## Slide 41

### Slide 41 text

10 8 5 4 7 6 6 8 2 2 2 1 Supply Demand 30 30 10 40 u1=0 u2=4 u3=5 v1=2 v2=1 v3=1 v4=0 30 Yay! :D 10 Total cost = 30*2 + 30*5 + 40*4 + 10*7 + 30*6 + 10*6 = 680