Вы находитесь на странице: 1из 376

INDE6372 Advanced Linear Optimization

INDE6372: LECTURE 8
DEGENERACY IN SIMPLEX
& LECTURE 9: CONVEXITY IN LO
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

INDE6372 Advanced Linear Optimization

Degeneracy
Definition: An LP is degenerate if it has at least one

basic feasible solution in which a basic variable = 0.


Degeneracy occurs when the minimum ratio test produces

a tie.
When this happens, one of the tied basic variables will
have the value of 0 in the next iteration.

INDE6372 Advanced Linear Optimization

Degeneracy
Definition: An LP is degenerate if it has at least one

basic feasible solution in which a basic variable = 0.


Degeneracy occurs when the minimum ratio test produces

a tie.
When this happens, one of the tied basic variables will
have the value of 0 in the next iteration.
Degeneracy is NOT a problem unless it leads to

cycling. This is where the simplex algorithm gets stuck in


a feasible solution, but never reaches an optimal solution.
(degenerate pivot).

Example

INDE6372 Advanced Linear Optimization

Example

Degeneracy Example
max
2x2x
1 ++
2
max 5x5x
1

(1)
(1)

x1x++
x2x6;6;

(2)
(2)

x1x, 1x,2x
0.
2 0.

(4)
(4)

x1x
x 0;
1 2x2 0;

(3)
(3)

Initial
Tableau
Initial
Tableau
Initial
Tableau
Basic
Var. x1x1
Basic
Var.
Z Z
-5 -5
x3 x3
11
x4 x4
11

x2x2
-2-2
11
-1-1

x3x3
00
11
00

x4x4
0 0 00
0 0 66
1 1 00

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

Example

Degeneracy Example

Perform the pivot


Basic Var.
Z
x3
x1

x1
0
0
1

x2
-7
1
-1

x3
0
0.5
0

x4
5
-0.5
1

0
3
0

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

Example
Example

Degeneracy Example

Perform
Perform the
the pivot
pivot
Basic
Basic Var.
Var.
ZZ

xx33
xx1
1
Final tableau

xx1 xx2 xx3


xx4
1
2
3
4
00
-7
00
55 00
-7
00
11
0.5
0.5 -0.5
-0.5 33
11
-1
00
11 00
-1

Basic Var. x1 x2
Z
0 0
x2
0 1
x1
1 0
Final Solution: x1

x3
x4
3.5 1.5 21
0.5 -0.5 3
0.5 0.5
3
= 3, x2 = 3!

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

A Cycling Example

INDE6372 Advanced Linear Optimization

A Cycling Example

Cycling
Example
Adapted from the textbook, Page 31.

Adapted from the textbook, Page 31.


max

max

10x1 57x2 9x3 24x4

(5)

10x1 57x2 9x3 24x4

(5)

0.5x
5.5x2 2.5x3 + 9x4 0;
1
0.5x
1 5.5x2 2.5x3 + 9x4 0;

(6)(6)

x1x
1;1;
1

(8)(8)

0.5x
1.5x220.5x
+ xx44 0;0;
1
0.5x
0.5x33 +
1 1.5x

(7)(7)

0.
x1x, 1x,2x,2x,3x,3x, 4x40.

(9)(9)

Initial
Tableau
Initial
Tableau
Initial
Tableau
x

x1 1
Z
-10
Z
-10
x5
1
x5x6 1 1
x6 x7 1 1
x7
1

x2 2
57
57
-11
-11-3
-30
0

x33 x44 x55


9 24 0
9 24 0
-5 18 2
-5-1 18
20
2
-10 20 00
0
0
0

x6 x7
x6 x7
0 0 0
0 0 0
0 0 0
20 00 0 0
02 10 1 0

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

A Cycling Example: Continuation

Cycling Example

Update the pivot


x1
Z
0
x1
1
x6 0
x7
0

x2
-53
-11
8
11

x3
-41
-5
4
5

x4
204
18
-16
-9

x5
20
2
-2
-2

x6
0
0
2
0

x7
0
0
0
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

A Cycling Example: Continuation


A Cycling Example: Continuation

Cycling Example

Update the pivot


Update the pivot
x1 x2 x3
x4
x5
x2 -41
x3 204
x4 20
x5
Z
0x1 -53
-53 -5
-41 18
204 220
x1Z
10 -11
18 -22
x61 0 1 8-11 4-5 -16
-16 -2-2
x
54 -9
7 x6 0 0 118
x7
0
11
5
-9
-2
One more iteration
x1 x 2 x3 x4
x5
Z
0 0 -14.5 98 27/4
x1 1 0
0.5
-4 -3/4
x2
0
1
0.5
-2 -1/4
x7
0 0
-0.5
4
3/4

x6 x7
0x6 0x7
00 00
20 00
02 10
0 1
x6
53/4
11/4
1/4
-11/4

0
00
00
10
1
x7
0
0
0
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 8 Degeneracy in Simplex

10

INDE6372 Advanced Linear Optimization

A Cycling Example: Continuation

Cycling Example

One more iteration


x1
Z
29
x3
2
x2 -1
x7
1

x2
0
0
1
0

x3
0
1
0
0

x4
18
-8
2
0

x5
-15
-1.5
0.5
0

x6
93
5.5
-2.5
0

x7
0
0
0
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

11

INDE6372 Advanced Linear Optimization

A Cycling Example: Continuation


A Cycling Example: Continuation

Cycling Example

One more iteration


One more iteration
x1 x2 x3 x 4
x4
Z
29x1 0x2 0x3 18
x3Z
229 00 10 18
-8
xx32 -1 2 10 01 2-8
x
-1
1 0
2
x7 2 1
0 0
0
x7
1
0 0
0
Continuing
x1
x 2 x3 x 4
Z
20
9
0 0
x3
-2
4
1 0
x4
-0.5 0.5 0
1
x7
1
0
0 0

x5
x6
x7
x5
x6 x07
-15
93
-15
93
-1.5
5.5
00
-1.5 5.5 0
0.5
-2.5 0
0.5 -2.5 0
0
0
1
0
0
1
x5
-10.5
0.5
1/4
0

x6
70.5
-4.5
-5/4
0

x7
0
0
0
1

0
00
00
0
1
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 8 Degeneracy in Simplex

12

INDE6372 Advanced Linear Optimization

A Cycling Example: Continuation

Cycling Example

One more iteration


x1
x2
Z
-22
93
x5
-4
8
x4 0.5 -1.5
x7
1
0

x3
21
2
-0.5
0

x4
0
0
1
0

x5
0
1
0
0

x6
-24
-9
1
0

x7
0
0
0
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

13

INDE6372 Advanced Linear Optimization

Cycling Example: Continuation


AA Cycling
Continuation

Cycling Example

One more
more iteration
iteration
One
xx2
xx3 xx4 xx5 xx6
xx11
2
3
4
5
6
Z
-22
93
21
Z
-22
93
21 00 00 -24
-24
-4
88
22
00 11
-9
xx55
-4
-9
xx4 0.5
0.5 -1.5
-0.5
11 00
11

-1.5
-0.5
4
x7
1
0
0
0 0
0
x7
1
0
0
0 0
0
Continuing
x1
x2
x3
x4 x5 x 6
Z
-10
57
9
24 0 0
x5 0.5 -5.5 -2.5 9
1 0
x6
0.5
-1.5 -0.5
1 0
1
x7
1
0
0
0
0 0
Back to the initial tableau!

xx7
7
00
00
00
1
1

00
00
00
1
1

x7
0
0
0
1

0
0
0
1

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

14

One Theorem

Cycle Theorem
Theorem 3.1: If the simplex method fails to terminate, then it
must cycle.
Proof: Consider a canonical form of an LP. Suppose we have n
number of variables and m constraints. Then the total number of
possible simplex iteration will be

n
,
m
which is finite. Therefore, if the simplex method loops infinitely, it
must revisit the same dictionary more than once. Thus, the
simplex algorithm must cycle.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

INDE6372 Advanced Linear Optimization

Blands Rule

15

Blands Rules (1977)


Bland (1977) proposed the following two rules:
1.

Entering variable selection: If more than one non-basic


variables are positive (or negative) for maximization (or
minimization) problem, choose the one with the lowest index.
Note that the slack (or surplus) variables have a lower priority
than the main variables;

INDE6372 Advanced Linear Optimization

Blands Rule
BlandsBlands
Rule
Rules (1977)

16

Bland (1977) proposed the following two rules:


1.

Bland
(1977)variable
proposedselection:
the following
twothan
rules:one non-basic
Entering
If more
positive
(or negative)
maximization
(or
variables
Entering are
variable
selection:
If more for
than
one non-basic
minimization)
problem,
the for
onemaximization
with the lowest
variables are positive
(orchoose
negative)
(or index.
Note
that the slack
(or surplus)
variables
have
lower priority
minimization)
problem,
choose the
one with
thea lowest
index.
than
main
Notethe
that
the variables;
slack (or surplus) variables have a lower priority
than
the main variables;
2.

Leaving variable selection: If a tie occurs in M.R.T. test,


choose the variable with the lowest index. Note that the slack
(or surplus) variables have a lower priority than the main
variables. If there is no tie in the M.R.T., just choose the
variable with the minimum ratio.

INDE6372
Arevisit
revisitto
to the
the cycling
cycling example
example

17

Advanced Linear Optimization

Cycling
Example
with
Blands
Rules

Blands rule applied


Blands rule applied
x1
-22
x1
Z
Zx5
-22
-4
x5 x4 0.5
-4

xx74 0.5
1

to the following tableau:


to the following tableau:
x2
x3 x 4 x5 x 6
x2
x3 0x4 0x5 -24x6
93
21
93
21
8
2
00 10 -9-24
8
2
-1.5
-0.5
10 01 1-9
-1.5
-0.5
0
0
0 1 00 0 1

x7
1
0
Update the tableau
x1 x2
Z
0 27
x5
0 -4
x1
1 -3
x7 0
3

0
x3
-1
-2
-1
1

0
x4
44
8
2
-2

0
x5
0
1
0
0

x7
0 x7
00
00
10

0
00
00
10

0
x6
20
-1
2
-2

x7
0
0
0
1

0
0
0
1

iming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 8 Degeneracy in Simplex

x1
Z
-22
x5
-4
x4 0.5
Bolands rule
x7 works!
1
Update
the tableau
the current
tableau
the current tableau
x1
Z
0x1
x5 Z
00
x1x5 10
x
1
x71 0

Jiming Peng

x2
93
8
-1.5
0

x3
x 4 x5 x 6 x 7
21 Advanced
0 Linear
0 Optimization
-24 0
INDE6372
2
0 1
-9
0
-0.5 1 0
1
0
0
0 0
0
1

018
0
0
1

Cycling Example with Blands Rules


x2 x3 x4 x5 x6
x2 -1
x3 x44
x5 0 x6 20x7
4
27
27
-1
-4
-2 448 0 1 20 -1 0
-4
-2
-3
-1 8 2 1 0 -1 2 0
-3
-1
2 0
2 0
3
1
-2 0 -2

x7
0
00
00
0
1

0
0
0
1

x7 0
3
1
-2 0 -2 1 1
the final tableau
x1 x2 x3 x4 x5 x 6 x 7
Z Engineering
0 30University
0 of42
0 Lecture
18 81 Degeneracy
1
Department of Industrial
Houston
INDE6372:
in Simplex
x5
0 2
0
4
1 -5 2 2
x1
1
0 0
0 0
0 1 1
x3 0
3
1 -2 0 -2 1 1
Optimal solution x1 = 1, x2 = 0, x3 = 1, x4 = 0, optimal
objective value 1!

INDE6372 Advanced Linear Optimization

19

Blands Rules (1977)


Using Blands rules, the simplex method terminates in a
finite number of iterations.

Bland, Robert G. (May 1977). "New finite pivoting rules for the simplex
method". Mathematics of Operations Research 2 (2): 103107. doi:10.1287/
moor.2.2.103. JSTOR 3689647. MR 459599.

INDE6372 Advanced Linear Optimization

Introduction:
I
Mathematical

Notation

A mathematical optimization problem has the following form


min

f0 (x)

s.t.

fi (x) bi , i = 1, , m;
x 0.

Let define
X = {x : fi (x) bi , i = 1, , m; x 0}.
Then we can rewrite the problem as
min f (x).

xX

A solution x X is said to be optimal if


f0 (x ) f0 (x), x X .
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

20

INDE6372 Advanced Linear Optimization

Convexity
A linear function is convex.
In LP, all functions are convex.
LP is a convex problem.

Convex

Non-Convex

21

ng called a conic combination.

k xk

i, i 0 R

INDE6372 Advanced Linear Optimization

22

t i s sum up to 1, it is called an ane combinatio


Definitions

i, iLet R, be the set


i of=real
1 numbers.
i

alled a
combination.
Aconvex
set is called
affine iff for any two points in the set, the
line through them is contained in the set. For any 2 points

in the set, their affine combinations are in the set itself.


i, i 0 R,
i = 1
i

A set is called convex iff any convex


combination of a
2

bination
of istwo
Rset?itself.
subset
also points
contained in
in the

In n-dimensional space, the positive orthant consists of

all vectors with non-negative coordinates.

ints in the set, the line through them is contained

INDE6372 Advanced Linear Optimization

23

Convexity

Convexity
For LP, all the functions are linear (or ane). For a linear function
f (x), it holds
f (x + y ) = f (x) + f (y ),

+ = 1, , 0.

The point x + y is called a convex combination of x and y .


We say a function f is convex if
f (x + y ) f (x) + f (y ),

+ = 1, , 0.

Observation: a linear function is convex. In LP, all the functions


are convex.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

24

Example

Examples of convexity
The univariate function f (x) = x 2 is convex.
The absolute function |x| is convex.
The sum of two convex functions is still convex.
More examples?

f(x)=|x|

And, the sum of 2 convex functions is still convex.

INDE6372 Advanced Linear Optimization

Example Set
Convex

Convex Set

Nonconvex Set

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

25

INDE6372 Advanced Linear Optimization

26

Ane and Convex Set

Convex and Affine Sets


Consider a convex combination
y = x 1 + x 2 ,

+ = 1, , 0.

We can write
y = x 1 + (1 )x 2 = x 2 + (x 1 x 2 ).
A set S is said to be convex if for any two points x 1 , x 2 S, the
convex combination x 1 + (1 )x 2 S for any [0, 1].
A set S is said to be ane if for any two points x 1 , x 2 S, the
data point x 1 + (1 )x 2 S for any .

INDE6372 Advanced Linear Optimization

27

Affine Space & Subspace


An affine space is a geometric structure that generalizes

certain properties of parallel lines in Euclidean space.


EX: a linear subspace of a vector space that has been
translated away from the origin.
An affine space is nothing more than a vector space
whose origin we try to forget about, by adding translations
to the linear maps.
An affine subspace of a vector space V is a subset

closed under affine combinations of vectors in the space.

INDE6372 Advanced Linear Optimization

28

Subspaces: Linear vs affine


In R3, the origin, lines and planes through the origin and

the whole space are linear subspaces.

In R3,the points, lines and planes in general as well as the

whole space are the affine subspaces.

NOTE: A linear subspace is an affine subspace containing

the origin, or, equivalently, a subspace that is closed


under linear combinations.

INDE6372 Advanced Linear Optimization

29

Transformations: Linear vs affine


A linear transformation is a function that preserves all

linear combinations.
An affine transformation is a function that preserves all
affine combinations.

INDE6372 Advanced Linear Optimization

30

Affine transformation
An affine transformation is any transformation that
preserves
collinearity (i.e., all points lying on a line initially still lie on
a line after transformation) and
ratios of distances (e.g., the midpoint of a line segment
remains the midpoint after transformation).
Note: While an affine transformation preserves proportions on lines, it
does not necessarily preserve angles or lengths. Any triangle can be
transformed into any other by an affine transformation, so all triangles
are affine and, in this sense, affine is a generalization of congruent and
similar.
http://mathworld.wolfram.com/AffineTransformation.html

Ane and Convex Set

INDE6372 Advanced Linear Optimization

31

Affine Set is Convex


Theorem
An ane set is convex.
Example: the straight line aT x = b is ane.
The convex hull of a set S is defined by
Hull(S) = {1 x 1 + + k x k |1 + + k = 1, i
Hull(S) is the smallest convex set containing S.

INDE6372 Advanced Linear Optimization

32

Theorem

Convex
Hull
Example: the straight line aT x = b is ane.
An ane set is convex.

The convex hull of a set S is defined by


Hull(S) = {1 x 1 + + k x k |1 + + k = 1, i 0}.
Example
Hull(S) is the smallest convex set containing S.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

Convex Hull

Convex Hull

INDE6372 Advanced Linear Optimization

33

Intersection of 2 Convex Sets


Theorem
The intersection of two convex sets S1 S2 is convex.
Question: How about the union of two convex sets?

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

34

Convex Set

Convex functions and convex sets


Theorem

Suppose S = {x : fi (x) 0; i = 1; ; m}. If all the functions


fi (x) are convex, then S is convex.
Let us define

Si = {x : fi (x) 0};

because fi (x) is a convex function, for any pair x 1 ; x 2 Si , we have


fi ( x 1 + (1 )x 2 ) fi (x 1 ) + (1 )fi (x 2 ) 0;

[0; 1]:

Therefore Si is a convex set. Because S = Si , thus S is convex


too.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

35

So how do we generalize LO?


The linear optimization model can be written in standard

form as
where we express the feasible set as the intersection of

an affine subspace
with

, the non-negative orthant (all vectors with nonnegative coordinates)

INDE6372 Advanced Linear Optimization

36

Non-negative orthant
An orthant is the analogue in n-dimensional Euclidean
space of a quadrant in the plane or an octant in three
dimensions.
In R2, there are 4
orthants (quadrants).
I is the nonnegative orthant.

Cone

INDE6372 Advanced Linear Optimization

37

Non-negative orthant Cone


A set S is called a cone if for every x S and 0, we have
x S.
Example: the set X = {x n : x1 , x2 , , xn 0} is a cone.
Such a cone is also called the nonnegative orthant, denoted by n+ .
The set

S = {x 3 : x12 + x22 x3 }
is a cone, the ice-cream cone!

http://www.convexoptimization.com/wikimization/index.php/Positive_semidefinite_cone
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

Hyperplane and Halfspace


INDE6372 Advanced Linear Optimization

38

Hyperplane and Halfspace


A hyperplane is a set of the form
{x : aT x = b},
where a n , b Re.
The feasible set in standard LP is the intersection of the
nonnegative orthant and some hyperplanes.
The set {x : aT x b} is called halfspace.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

Halfspace in R3

39

INDE6372 Advanced Linear Optimization

Global
Example

vs local max / min

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

40

INDE6372 Advanced Linear Optimization

41

Local
and Global
Minimum
Local
Minimum
To describe a local minimizer of an optimization problem, we
define the neighborhood of a data point:
N(x, r ) = {y : y x r }.
Consider the convex optimization problem
min f (x)

xX

We say x is a local minimal solution to the problem if there exists


a neighborhood with a small r such that
f (x ) f (x),

x N(X , r ) X .

Theorem
If f (x) is convex and the constrained set X is also convex, then a
local minimal solution to the problem is also a global minimal

Consider the convex optimization problem

INDE6372 Advanced Linear Optimization

42

min f (x)

xX

Global
We say x isMinimum
a local minimal solution to the problem if there exists
a neighborhood with a small r such that
f (x ) f (x),

x N(X , r ) X .

Theorem
If f (x) is convex and the constrained set X is also convex, then a
local minimal solution to the problem is also a global minimal
solution.
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

43

Proof of the Theorem

Global Minimum: Proof of Theorem

Suppose to the contrary that x is not the global minimal solution, then there exists another y X satisfying
f (y ) < f (x ). Now let us consider the convex combination x + (y x ) for [0, 1]. Since X is
convex, we have

x , y X = x + (y x ) X , [0, 1].
Because f (x) is convex, it follows
f (x

+ (y

x )) (1 )f (x ) + f (y ) f (x ),

and the inequality holds strictly if 0 < 1. Recall that for small , we have
(y

x ) = y

x .

For fixed x , y , we can choose a very small parameter such that


y

x r.

This shows that the point x + (y x ) is in the neighborhood of x , but with a smaller objective value. This
violates our basic assumption that x is a local minimum. In this way, we have derived a contradiction. Thus we
can conclude that x must be a global minimal solution.

INDE6372 Advanced Linear Optimization

44

Farkas Lemma
Only 1 of these statements is true:
A vector is in a given convex cone
There exists a (hyper)plane separating the vector from the

cone.

INDE6372 Advanced Linear Optimization

45

Farkas Lemma

Farkas Lemma
Lemma
The system Ax b has no solutions if and only if there is a y such
that
AT y = 0, y 0, b T y < 0.
Proof: consider the primal LP
max

0
Ax b

and its dual


min

bT y
AT y = 0
y 0.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

Proof of Farkas Lemma: Continuation

46

Farkas Lemma: Proof


Clearly the dual is feasible. Thus if the primal is feasible, then the
dual is bounded. This implies that if the primal is infeasible, then
the dual is unbounded. It remains to show that the dual is
unbounded if and only if the relations in the lemma hold (recall the
definition of unbounded LP). This finishes the proof of Farkas
Lemma.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

Polyhedra and halfspaces

47

INDE6372 Advanced Linear Optimization

48

The separation theorem

Separation Theorem
A polyhedron is the intersection of a finite number of halfspaces
{x n : Ax b, A mn }

Theorem

Let P and P are two disjoint nonempty polyhedra in n . Then

there exist disjoint halfspaces H and H such that P H, P H.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

Proof
of the separation
theorem
Separation
Theorem

49

Proof

Let
P = {x n : Ax b, A mn },

b,
A kn }.
P = {x n : Ax

Since these two polyhedra have no intersections, thus the set


b}

P = {x : Ax b, Ax
has no feasible points. From the Farkas lemma, there exists (y , y)
satisfying the following
AT y + AT y = 0,

, b T y + bT y < 0,

(y , y) 0.

From the second inequality, we have either b T y < 0 or bT y < 0


(or both). Without loss of generality, we assume that b T y < 0.
Because P is nonempty, thus AT y = 0.

Continued

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

50

Proof of the separation theorem: Cont.

Separation Theorem Proof


Define
H = {x : y T Ax b T y }

H = {x : y T Ax bT y}

Clearly these two sets are halfspaces. Moreover, there is no


intersection between them, otherwise, we have
b T y y T Ax bT y = b T y + bT y 0,
which yields a contradiction.
Because
Next we show P H and P H.
P = {x : Ax b}, y 0, therefore, for every x P, we have
y T Ax b T y which implies x H. Thus P H. The case P H
follows similarly.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

51

Separation Theorem Example

Example

Note: The separation theorem does not hold for nonconvex sets.
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

52

Strict Complementarity

Strict Complementary Conditions


Consider the primal
min

cT x
Ax = b, x 0,

and its dual


max

bT y
AT y + s = c, s 0.

Theorem
If both the primal and its dual are feasible, then there exists an
optimal solution x to the primal problem, and optimal solution
(y , s ) to the dual problem such that x + s > 0.
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

53

Proof of Complementarity
the Strict Complementary Conditions
Strict
Proof
Now let us consider the following problem
min

xj

Ax = b, x 0
c T x z .

Thus the optimal solution to the above problem is 0. From the


strong duality theory, we know its dual
max

bT y z

AT y c ej , x0 0
has optimal value 0. Here ej is the vector with zero elements
except for 1 at its j-th position. If (
y , = 0) is the optimal
solution, then it is easy to see that y + y is also an optimal
solution to the original dual with a slack variable sj > 0.
If > 0, then it must hold b T y = z , thus the point y/ is an
optimal solution to the original dual with a slack variable sj > 0.
Jiming Peng Department of Industrial Engineering University of Houston
INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

ample

54

Strict Complementarity Example


Which algorithm should be used to solve this problem?
Primal or dual simplex?

min

x1 + 2x2
x1 + x2 2;

2x1 x2 1;
x1 , x2 0.

Which algorithm should we use to solve the above problem?


Answer: Dual simplex, since if we write out the standard form for
the above problem, then we have a solution which is feasible for
the dual problem.
What is the solution to the dual problem?

INDE6372 Advanced Linear Optimization

ample

55

Strict Complementarity Example


Which algorithm should be used to solve this problem?
Primal or dual simplex?

min

x1 + 2x2
x1 + x2 2;

2x1 x2 1;
x1 , x2 0.

Which algorithm should we use to solve the above problem?


Answer: Dual simplex, since if we write out the standard form for
ANSWER: Dual Simplex, because standard form
the above problem, then we have a solution which is feasible for
gives a feasible solution for the dual problem.
the dual problem.
What is the solution to the dual problem?

Example

INDE6372 Advanced Linear Optimization

56

Strict Complementarity Example


min

x1 + 2x2
x1 + x2 2;

Solution to Example in Standard


2x1 x2 Form
1;
x1 , x2 0.

Which algorithm should we use to solve the above problem?


Answer: Dual simplex, since if we write out the standard form for
the above Form
problem, then we have a solution which is feasible for
Standard
x1 + 2x2 + 0x3 + 0x4
the dual problem. min
+ xproblem?
What is the solution to thex1dual
2 + x3 = 2;
2x1 + x2 + x4 = 1;

x1 , x2 , x3 , x4 0.

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

Solution to the primal problem x1 = 0.5, x2 = 0, x3 = 1.5, x4 = 0!


Solution to the dual problem is

Solution to Example in Standard Form

INDE6372 Advanced Linear Optimization

57

Strict Complementarity Example


min

x1 + 2x2 + 0x3 + 0x4


x1 + x2 + x3 = 2;
2x1 + x2 + x4 = 1;
x1 , x2 , x3 , x4 0.

Solution to the primal problem x1 = 0.5, x2 = 0, x3 = 1.5, x4 = 0!


Solution to the dual problem is
y1 = 0, y2 = 0.5, s1 = 0, s2 = 2.5, s3 = 0, s4 = 0.5.
Check for the above solutions, we do have x + s > 0!

Jiming Peng Department of Industrial Engineering University of Houston


INDE6372: Lecture 9 Convexity in LO

INDE6372 Advanced Linear Optimization

58

Midterm Exam (30% of Final Grade)


Thursday, October 15, 2015 @ 4pm in CBB 124
Closed book (no books, papers, phones, calculators,

computers). Bring your pens and pencils. All paper will be


provided.
60 minutes.
Chapters 1 6, textbook (Operations Research:
Applications and Algorithms (4th edition). W.L. Winston.
Duxbury Press, 2003. ISBN 978-0534380588.)
Lectures 1 13.
Material covered in Assignment 1 and Quizzes 1 and 2.
See UH BlackBoard for Midterm Exam Review Outline.
GOOD LUCK!

INDE6372 Advanced Linear Optimization

LECTURE 11A
TRANSPORTATION, ASSIGNMENT
AND TRANSSHIPMENT PROBLEMS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

Outline
The Transportation Problem
Algorithms
Northwest Corner Method
Minimum Cost Method
Vogels Method
Simplex for Transportation Problem
Sensitivity Analysis
Assignment and Transshipment Problems

Transportation Problem
Find the best way
to deliver product to n demand points
from m supply points
given the variable cost of shipping the product
from one supply point to a demand point

Powerco

Powerco

Powerco has three electric power plants that supply the


electric needs of four cities.
The cost of sending 1 million kwh of electricity from a plant
to a city depends on the distance the electricity must travel.

Powerco LP
TA B L E

Shipping Costs, Supply, and Demand for Powerco


To
From

City 1

City 2

City 3

City 4

Plant 1
Plant 2
Plant 3

$8
$9
$14
45

$6
$12
$9
20

$10
$13
$16
30

$9
$7
$5
30

Demand
(million kwh)

Supply
(million kwh)

35
50
40

1 to the four cities cannot exceed 35 million kwh. Each variable with first
resents a shipment of power from plant 1, so we may express this restric
constraint
x11 ! x12 ! x13 ! x14 " 35

Powerco LP
Decision Variables:
How much electricity is sent from each plant to each

city;
Let Xij = Amount of electricity produced at plant i and
sent to city j
EXAMPLE: X14 = Amount of electricity produced at plant 1

and sent to city 4

Objective Function:
Minimize the total cost of shipping from plants to

cities.

Powerco LP: Objective Function


TA B L E

Shipping Costs, Supply, and Demand for Powerco


To
From

City 1

City 2

City 3

City 4

Plant 1
Plant 2
Plant 3

$8
$9
$14
45

$6
$12
$9
20

$10
$13
$16
30

$9
$7
$5
30

Demand
(million kwh)

Supply
(million kwh)

35
50
40

Minimize Z = 8X11+6X12+10X13+9X14
1 to the four cities
cannot
exceed +13X
35 million+7X
kwh. Each variable with first
+9X
+12X
22
24
resents a shipment of21
power from
plant 23
1, so we
may express this restric
+14X31+9X32+16X33+5X34
constraint
x11 ! x12 ! x13 ! x14 " 35

Identify Supply Constraints


Supply Constraints: each supply point has a
limited production capacity.
X11+X12+X13+X14 35
X21+X22+X23+X24 50
X31+X32+X33+X34 40

Identify Demand Constraints

Demand Constraints: The total electricity


received by each city needs to meet its demand.
X11+X21+X31 45
X12+X22+X32 20
X13+X23+X33 30
X14+X24+X34 30

Powerco Constraints
Supply Constraints: each supply point has a

limited production capacity;


X11+X12+X13+X14 35
X21+X22+X23+X24 50
X31+X32+X33+X34 40
Demand Constraints: The total electricity
received by each city needs to meet its demand;
X11+X21+X31 45
X12+X22+X32 20
PLUS non-negativity
X13+X23+X33 30
constraints on all
X14+X24+X34 30
variables

Powerco LO Model
Min Z = 8X11+6X12+10X13+9X14+9X21+12X22+13X23+7X24
+14X31+9X32+16X33+5X34
S.T.: X11+X12+X13+X14 35
(Supply Constraints)
X21+X22+X23+X24 50
X31+X32+X33+X34 40
X11+X21+X31 45
(Demand Constraints)
X12+X22+X32 20
X13+X23+X33 30
X14+X24+X34 30
Xij 0 (i= 1,2,3; j= 1,2,3,4) (Non-negative Constraints)

IGURE

Powerco Network (with optimal soln.)


Supply points

Demand points

City 1

d1 = 45

City 2

d2 = 20

City 3

d3 = 30

City 4

d4 = 30

x11 = 0
s1 = 35

x14 = 0

Graphical
resentation of
Problem and
timal Solution

x12 = 10

Plant 1

x21 = 45
s1 = 50

x13 = 25

x22 = 0
x23 = 5

Plant 2

x24 = 0
x31 = 0
s1 = 40

Plant 3

x32 = 10
x33 = 0
x34 = 30

s.t.

x11 ! x21 ! x31 ! x34 " 45

(Demand constraints)

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

Powerco
Transportation
Tableau
Shipping Costs, Supply,
and Demand for Powerco
TA B L E

s2

To
From
Plant 1
Plant 2
Plant 3 d1
Demand
Demand

cm1

(million kwh)

City 1

cm2

$8
$9
$14d2
45

City 2

City 3

$6
$12
$9
20

$10
$13
$16
30

City 4
cmn

$9
$7
dn $5
30

Supply
(million kwh)
sm 35

50
40

Optimal
solution City 1
3
City 2
City 3
City 4
Supply
exceed 35 million kwh. Each variable with first subscript 1 repTransportation Tableau 1 to the four cities cannot
8
6
9
10
for Powerco resents a shipment of power from plant 1, so we may express this restriction by the LP
10
35
25
Plant 1
constraint
TA B L E

9
Plant 2

12

13

x ! x14 " 35
x11 ! x12 !
5 13

45

50

In a similar fashion, we can find constraints that reflect plant 2s and plant 3s capacities.
14
9
16
5
Basic
Because power is supplied by the power plants, each is a supply point.
Analogously, a
Plant 3
40
10
30
constraint that ensures that the total quantity shipped from a plant doesvariables
not exceed plant
capacity is a supply
constraint.
The LP30formulation30of Powercos problem contains the
45
20
Demand
following three supply constraints:
CHAPTER

!x

!x

!x

" 35

11 Assignment,
12 and 13
14 Problems
7 Transportation,
Transshipment

(Plant 1 supply constraint)

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

Powerco Transportation Tableau


s2

Row Plant 1: 10 + 25= 35


Row Plant 2: 45+5
= 50 cm2
cm1
Row Plant 3: 10 + 30 = 40

cmn
sm

d1 = 45
d2
Col City 1: 45
Col City
2: 10 + 10 = 20
Demand
Col City 3: 30 = 30

Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

dn

City 1

City 2

6
10

Plant 1

9
Plant 2

CHAPTER

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

Balanced Transportation Problem


If total supply = total demand, the problem is
said to be a balanced transportation problem:
i =m

s
i =1

j =n

j =1

In this case, all constraints MUST be binding.


Powerco is a balanced transportation problem.
Basic feasible solutions are relatively simple to

find, so try to formulate a transportation problem


as balanced.

require 30 units. The company has two warehouses.


Warehouse 1 has 40 units available, and warehouse 2 has 30
units available. The costs of shipping 1 unit from warehouse
to customer are shown in Table 7. There is a penalty for each
unmet customer unit of demand: With customer 1, a penalty
cost of $90 is incurred; with customer 2, $80; and with
customer 3, $110. Formulate a balanced transportation
problem to minimize the sum of shortage and shipping costs.

Exercise 1 (text, p. 371)

2 Referring to Problem 1, suppose that extra units could


A company supplies goods to be
3 customers,
each
require
30
purchased andwho
shipped
to either
warehouse
for a total
units.
cost of $100 per unit and that all customer demand must be
met. Warehouse
Formulate a balanced
problem to
The company has 2 warehouses.
1 has 40transportation
units
minimize the sum of purchasing and shipping costs.

available, and warehouse 2 has 30 units available. The costs of


3 to
A customer
shoe company
forecasts
the in
following
during
shipping 1 unit from warehouse
are
shown
Table demands
7.
the next six months: month 1200; month 2260; month
There is a penalty for each unmet
customer
unit ofmonth
demand:
With
3240;
month 4340;
5190;
month 6150. It
costs is
$7incurred;
to produce with
a paircustomer
of shoes with
labor
customer 1, a penalty cost of $90
2,regular-time
$80;
and $11 with overtime labor (OT). During each month,
and with customer 3, $110. (RT)
regular production is limited to 200 pairs of shoes, and
Formulate a balanced transportation problem to minimize the sum of
shortage and shipping costs.
TA B L E

To
From
Warehouse 1
Warehouse 2

Customer 1

Customer 2

Customer 3

$15
$10

$35
$50

$25
$40

Exercise 1, answer.
Supply

Demand

General Transportation Problem


A set of m supply points from which goods are

shipped. Supply point i can supply at most si units.


A set of n demand points to which the goods are
shipped. Demand point j must receive at least di
units of the goods.
Shipping one unit of the good from supply point i
to demand point j incurs a variable cost of cij.

Powerco example, m # 3, s1 # 35, s2 # 50, and s3 # 40.


i units.
d3 #most
30, sand
d4In#the30.

A set of n demand points to which the good is shipped. Demand point j must receive
3 Each
unit
produced
at supply
i and shipped
point
in
at least
dj units
of the shipped
good. point
In the Powerco
example, to
n #demand
4, d1 # 45,
d2 #j 20
cost of
cij30,
. Inand
thed4 Powerco
example, c12 # 6.
d3 #
# 30.
2

Let

Each unit produced


at supply point i and shipped
to demand point j incurs a variable
General
Transportation
Problem
cost of c . In the Powerco example, c # 6.
3

12

ij

Let

xij # number of units shipped from supply point i to demand p

xij # formulation
number of unitsof
shipped
from supply point
i to demand
then the general
a transportation
problem
is point j
then the generali#m
formulation
of a transportation problem is
j#n

cijxij
!
!
mini#1
! j#1
!c x

min

i#m j#n

ij ij

j!n

s.t.

xij " si
!
j!1

(i ! 1, 2, . . . , m)

(Supply constraints)

(1

i!m

7 Transportation, Assignment, and Transshipment Problems

7
s.t. Transportation,
dj ( j !and1,Transshipment
2, . . . , n) Problems
(Demand constraints)
! xij #Assignment,

CHAPTER

CHAPTER

i#1 j#1

i!1

xij # 0 (i ! 1, 2, . . . , m; j ! 1, 2, . . . , n)

f a problem has the constraints given in (1) and is a maximization problem, then it is stil
a transportation problem (see Problem 7 at the end of this section). If
i!m

j!n

! si ! ! dj

Total Supply < Total Demand?


There is NO feasible solution.
One or more of the demands will be unmet, and
there will likely be penalty costs.
See Exercise 1 (previous).

Total Supply > Total Demand?


Solution: Balance the problem by adding a dummy
demand point.
Since shipments to the dummy demand point are
not real, they have a cost of zero.

Solving Transportation Problems

If a set of values for the xijs satisfies all but one of the
constraints of a balanced transportation problem,
then the values for the xijs will automatically satisfy the
other constraint.
So can omit one constraint (usually the first supply
constraint.)
In a balanced transportation problem with m supply
points and n demand points, the cells corresponding to
a set of m + n 1 variables contain no loop if and only
if the m + n 1 variables yield a basic solution.

Solving Transportation Problems


Methods to find a Basic Feasible Solution (BFS):
1.

Northwest Corner Method

2.

Minimum Cost Method

3.

Vogels Method

Northwest Corner Method

Begin in the upper left


(northwest) corner of the
transportation tableau
Set x11 as large as
possible and min (s1,
d1).

Northwest Corner Method


5
6
2

Demand

Supply

Set x11=3 (meaning demand of demand point 1 is


satisfied by supply point 1).
5
6
2
3

2
6
2

Demand

Supply

Check the east and south cells. Still can go east


(meaning supply point 1 still has capacity to fulfill
some demand).
3

2
6
2

X
6

Demand

2
X

Supply

Next, go south.
3

X
6
2

3
2

Demand

Supply

Continue
3

2
3

X
2

1
2

2
3

3
X

X
2

Demand

Supply

Northwest Corner Method BFS


Finally, we will have the following bfs, which is:

x11=3, x12=2, x22=3, x23=2, x24=1, x34=2

2
3

Demand

X
2

Supply

Northwest Corner Method critique


It does not use shipping costs.
Therefore, it can give an initial bfs with a very

high total shipping cost.


Determining an optimal solution may require
several pivots.

Exercise 2
Use the Northwest Corner Method to find a BFS for
Exercise 1.
Supply

Demand

Exercise 2, answer.

Supply

Demand

Minimum Cost Method


Uses shipping costs to find BFS with lower total

costs.
Goal: get optimal solution in fewer pivots than
Northwest Corner method.

Minimum Cost Method Approach


Find the decision variable with the smallest

shipping cost (xij) and give it the largest possible


value min (si , dj)
Continue similar to the Northwest Corner Method:
Cross out row i and column j.
Reduce the supply or demand of the noncrossed-out

row or column by the value of xij.


Then choose the cell with the minimum cost of shipping
from the cells that do not lie in a crossed-out row or
column
Repeat.

Minimum Cost Method


Step 1: Select the cell with minimum cost.

12

10

15

Step 2: Cross-out column 2


2

8
3

12

15

Step 3: Find the new cell with minimum


shipping cost and cross-out row 2
2

8
3

10

15

Step 4: Find the new cell with minimum


shipping cost and cross-out row 1
2

8
3

15

Step 5: Find the new cell with minimum


shipping cost and cross-out column 1
2

8
3

5
X

10

Step 6: Find the new cell with minimum


shipping cost and cross-out column 3
2

8
3

4
X

Step 7: Finally assign 6 to last cell. The bfs is


found as: X11=5, X21=2, X22=8, X31=5, X33=4
and X34=6
2

8
3

4
X

6
X

Exercise 3
Use the Minimum Cost Method to find a BFS for Exercise
1.
Supply

Demand

Vogels Method
Compute a penalty for each row and column.
Penalty = the difference between the two smallest

shipping costs in the row or column.


Identify the row or column with the largest penalty.
Find the first basic variable which has the smallest
shipping cost in that row or column.
Then assign the highest possible value to that variable,
and cross-out the row or column as in the previous
methods.
Compute new penalties and repeat the procedure.

An example for Vogels Method


Step 1: Compute the penalties.

Demand
Column Penalty

15

80

78

15

15-6=9

80-7=73

78-8=70

Supply

Row Penalty

10

7-6=1

15

78-15=63

Step 2: Identify the largest penalty and assign the


highest possible value to the variable.

80

78

5
15

Demand
Column Penalty

15

15-6=9

78-8=70

Supply

Row Penalty

8-6=2

15

78-15=63

Step 3: Identify the largest penalty and assign the


highest possible value to the variable.

7
5

15

Demand
Column Penalty

80

78

15

15-6=9

Supply

Row Penalty

15

Step 4: Identify the largest penalty and assign the


highest possible value to the variable.

6
0

7
5

8
5

15

80

78

Demand

15

Column Penalty

Supply

Row Penalty

15

Step 5: Finally the bfs is found as X11=0, X12=5, X13=5,


and X21=15

6
0

7
5

8
5

15

80

78

15
Demand

Column Penalty

Supply

Row Penalty

Next class: Simplex for TP

Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.

INDE6372 Advanced Linear Optimization


1

LECTURE 11B
TRANSPORTATION, ASSIGNMENT
AND TRANSSHIPMENT PROBLEMS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

Outline
The Transportation Problem
Algorithms
Northwest Corner Method
Minimum Cost Method
Vogels Method
Simplex for Transportation Problem
Sensitivity Analysis
Assignment and Transshipment Problems

Transportation Problem
Find the best way
to deliver product to n demand points
from m supply points
given the variable cost of shipping the product
from one supply point to a demand point

Simplex for the Transportation Problem

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

Powerco
Transportation
Tableau
Shipping Costs, Supply,
and Demand for Powerco
TA B L E

s2

To
From
Plant 1
Plant 2
Plant 3 d1
Demand
Demand

cm1

(million kwh)

City 1

cm2

$8
$9
$14d2
45

City 2

City 3

$6
$12
$9
20

$10
$13
$16
30

City 4
cmn

$9
$7
dn $5
30

Supply
(million kwh)
sm 35

50
40

Optimal
solution City 1
3
City 2
City 3
City 4
Supply
exceed 35 million kwh. Each variable with first subscript 1 repTransportation Tableau 1 to the four cities cannot
8
6
9
10
for Powerco resents a shipment of power from plant 1, so we may express this restriction by the LP
10
35
25
Plant 1
constraint
TA B L E

9
Plant 2

12

13

x ! x14 " 35
x11 ! x12 !
5 13

45

50

In a similar fashion, we can find constraints that reflect plant 2s and plant 3s capacities.
14
9
16
5
Basic
Because power is supplied by the power plants, each is a supply point.
Analogously, a
Plant 3
40
10
30
constraint that ensures that the total quantity shipped from a plant doesvariables
not exceed plant
capacity is a supply
constraint.
The LP30formulation30of Powercos problem contains the
45
20
Demand
following three supply constraints:
CHAPTER

!x

!x

!x

" 35

11 Assignment,
12 and 13
14 Problems
7 Transportation,
Transshipment

(Plant 1 supply constraint)

Performing the Pivot


Based on the transportation tableau, the following steps

should be performed.
Step 1. Select the variable to enter the basis. (Use a
criterion such as the Northwest Corner Method)
Step 2. Find the unique loop that includes this entering
variable and some of the basic variables.
Step 3. Count only the cells in the loop, starting with 0
(even) at the entering variable. Label them as even cells
or odd cells on the loop away from the entering variable
based on the count.

Definition: Loop
An ordered sequence of at least four different cells is called
a loop if
1. Any two consecutive cells lie in either the same row or
same column
2. No three consecutive cells lie in the same row or
column
3. The last cell in the sequence has a row or column in
common with the first cell in the sequence

Performing the pivot


Step 4.
The variable to leave the basis will be the variable with
the minimum value, , in the odd cells.
Pivot
Odd cell odd cell .
Even cell even cell + .

The variables that are not in the loop remain unchanged.

Performing the pivot


Step 4 Notes.
If =0, the entering variable =0 , and an odd variable that
has a current value of 0 will leave the basis. In this case a
degenerate bfs existed before and will result after the
pivot.
If more than one odd cell in the loop equals , you may
arbitrarily choose one of these odd cells to leave the
basis; again a degenerate bfs will result.

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

Powerco
Transportation
Tableau
Shipping Costs, Supply,
and Demand for Powerco
TA B L E

s2

To
From
Plant 1
Plant 2
Plant 3 d1
Demand
Demand

cm1

(million kwh)

City 1

cm2

$8
$9
$14d2
45

City 2

City 3

$6
$12
$9
20

$10
$13
$16
30

City 4
cmn

$9
$7
dn $5
30

Supply
(million kwh)
sm 35

50
40

Starting
Tableau City 1
3
City 2
City 3
City 4
Supply
exceed 35 million kwh. Each variable with first subscript 1 repTransportation Tableau 1 to the four cities cannot
8
6
9
10
for Powerco resents a shipment of power from plant 1, so we may express this restriction by the LP
10
35
25
Plant 1
constraint
TA B L E

9
Plant 2

12

13

x ! x14 " 35
x11 ! x12 !
5 13

45

50

In a similar fashion, we can find constraints that reflect plant 2s and plant 3s capacities.
14
9
16
5
Because power is supplied by the power plants, each is a supply point. Analogously, a
Plant 3
40
10
30
constraint that ensures that the total quantity shipped from a plant does not exceed plant
capacity is a supply
constraint.
The LP30formulation30of Powercos problem contains the
45
20
Demand
following three supply constraints:
CHAPTER

!x

!x

!x

" 35

11 Assignment,
12 and 13
14 Problems
7 Transportation,
Transshipment

(Plant 1 supply constraint)

364

cm1

cm2

cmn
sm

d1

d2

dn

Powerco: Northwest Corner Method


Demand

Starting
Tableau
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

CHAPTER

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

What is a BFS for this, using NWC method?

30

40

Powerco: Start with NWC

Basic Variables

Powerco: Select enter variable

Basic Variables
What if x14 enters the basis?

Powerco: Evaluate for leaving variable

What if x14 enters the basis?

Powerco: Evaluate for leaving variable

Min ODD cell: x23

What if x14 enters the basis?

Powerco: Select leaving variable

Min ODD cell: x23


LEAVES BASIS

What if x14 enters the basis?

Powerco: Select leaving variable

Min ODD cell: x23


LEAVES BASIS

What if x14 enters the basis?

Powerco: = value of leaving variable

Min ODD cell: x23


LEAVES BASIS.
= 20

What if x14 enters the basis?

Powerco: Modify cells with

+20
ENTER

-20

+20

-20
LEAVE

+20

-20

Powerco: Modify cells with


35-20

10+20

45

0+20

20

20

20-20
(nonbasic)

35

50

10+20

30-20

30

30

40

Powerco: BFS #2 after pivot


35-20
15

10+20
30

45

0+20
20

20
20

20

20-20
0
(nonbasic)
non-basic

35

50

10+20
30

30-20
10

30

30

40

The solution is FEASIBLE.


There is NO LOOP in the solution, so it is also a BFS.

Transportation Pivot Notes

Since each row has as many +s as s, the


new solution will satisfy each supply and demand
constraint.
By choosing the smallest odd variable to leave
the basis, all variables will remain nonnegative.
Each pivot involves only additions or subtractions.
If all the supplies and demands for a
transportation problem are integers, then the
transportation problem will have an optimal
solution in which all the variables are integers.

In this case, the LP Divisibility Assumption


can be ignored.

Exercise 1.
Use the Transportation Simplex to find a BFS for the
warehouse problem from the previous lecture (text, p.
371). Start with the BFS from the NWC Method:

Supply

Demand

out rows and columns we choose the variable to enter


the basis to be the "best" variable in the row or
column with the largest penalty. Of course in a max
problem, "best" variable means the variable with
largest objective function coefficient

Exercise
1,
answer.
SECTION 7.3

1. We begin with the bfs obtained in Section 7.2


v's
15
35
25
u's
15
35
25
0
30
10
40
10
50
40
15
20
10
30
90
80
110
85
20
20
30
30
30
_
Since c32=40 we enter x32 into basis. The loop involving
x32 and some of the basic variables is (3, 2) - (2, 2) (2, 3) - (3, 3). x33 exits yielding the following bfs

v's

15

35

25

10
15

0 15

4025
20
10
30 40
10
90
80
110
10
50
40
20
20
20
10
30
30
30
30

30

85

15

50
35

90
80
110
_
85
20 The loop
20 involving
Since c32=40 we enter x32 into basis.
30the basic 30
x32 and some of
variables 30
is (3, 2) - (2, 2) (2, 3)
_ - (3, 3). x33 exits yielding the following bfs

Exercise 1, answer.

Since c32=40 we enter x32 into basis. The loop involving


x32 and some of the basic variables is (3, 2) - (2, 2) (2, 3) - (3, 3). x33 exits yielding the following bfs
v's

15

35

25

u's
15
0

30

v's

15 10

15
u's

0 45

35
10

35 50

90
15

30

30
10

20
10

25

13
30

2540

40
30

80
35

11025

30 50

30 40

2040

_
0
30
30
Since c21=20 we enter x21 into the basis. The loop
involving x21 and some of the basic variables is
(2,1)-(1,1)-(1,2)-(2,2). After
x22 exits we obtain the following bfs:

15

v's
u's

15

35

45

13
90
45

80

110

20
30

20
30

30

_
Since c21=20 we enter x21 into the basis. The loop
involving x21 and some of the basic variables is
(2,1)-(1,1)-(1,2)-(2,2). After
x22 exits we obtain the following bfs:

Exercise 1, answer.
v's

15

35

45

u's
15
0

30

35
10

40

10
-5

25

50

40
30

90
45

80

30
110

20
30

20
30

30

_
Now c13=20 so we enter x13. The relevant loop is (1, 3) (2, 3) - (2, 1) - (1, 1). After x11 exits we obtain the
following bfs:
v's
-5
35
25
u's
15
35
25
0
10
30
40
10
50
40
15
30
0
30

u's
15
0

30

35
10

40

10
-5

25

50

40
30

90 answer.
80
Exercise
1,
45
20
30

30

30
110
20
30

_
Now c13=20 so we enter x13. The relevant loop is (1, 3) (2, 3) - (2, 1) - (1, 1). After x11 exits we obtain the
following bfs:
v's
-5
35
25
u's
15
35
25
0
10
30
40
10
50
40
15
30
0
30
90
80
110
45
20
20
30
30
30
This is an optimal tableau. Thus 10 units should be
sent from Warehouse 1 to Customer 2, 30 units from
Warehouse 1 to Customer 3, 30 units from Warehouse 2 to
customer 1. 20 units of Customer 2's demand will be
unsatisfied.

-5

30
90

45

80

30
110

20
30

20
30

30

_
Now c13=20 so we enter x13. The relevant loop is (1, 3) (2, 3) - (2, 1) - (1, 1). After x11 exits we obtain the
following bfs:
v's
-5
35
25
u's
15
35
25
0
10
30
40
10
50
40
15
30
0
30
90
80
110
45
20
20
30
30
30

Exercise 1, answer.

This is an optimal tableau. Thus 10 units should be


sent from Warehouse 1 to Customer 2, 30 units from
Warehouse 1 to Customer 3, 30 units from Warehouse 2 to
customer 1. 20 units of Customer 2's demand will be
unsatisfied.

Transportation Problem NBV Pricing


Let BV = the set of basic variables in a BFS.
Assume that the first supply constraint in the original LP
has been dropped.
Then the coefficient of the variable Xij (call it ij) in the
tableaus row 0 ) is given by
ij = cBV B-1aij cij
Where cij is the objective function coefficient for xij and aij is
the column for Xij in the original LP minimization problem.

Transportation Problem NBV Pricing

This is a minimization problem.


Note that the first constraint has been dropped.
If all the ijs are 0, then the current bfs is optimal
Otherwise, we enter into the basis the variable with
the most positive ij.

Calculate cBVB-1. It will have m+n-1 elements:


cBVB-1= [u2 u3um v1 v2vn]
u2 u3um = m-1 supply constraints
v1 v2vn = n demand constraints

Transportation Problem NBV Pricing


Each basic variable Xij must have ij=0 in any tableau.
Thus for each of the m+n-1 variables in BV:
cBV B-1aij cij=0

cBVB"1aij " cij ! 0

(4)

For a transportation problem, the equations in (4) are very easy to solve. To illustrate the
olution of (4), we find cBVB"1 for (5), by applying the northwest corner method bfs to
he Powerco problem.

Powerco BFS via NWC Method


11

10

35

35
9

10

12
20

13

50

20

14

16
10

45

20

5
30

30

40
30

For each of the m+n-1 variables in BV:


cBV B-1aij cij=0
HAPTER

7 Transportation, Assignment, and Transshipment Problems

(5)

Powerco NBV Pricing


For each of the m+n-1 variables in BV:
cBV B-1aij cij=0
Powerco NWC bfs
BV={X11, X21, X22, X23, X33, X34}.
0
11= [u2 u3 v1 v2 v3 v4] 0

1
Supply | Demand 0

0

0

- 8 = v 1- 8 = 0

1
0

1

0
0

0
1
0

0

1
0

0

Powerco NBV Pricing


21= [u2 u3 v1 v2 v3 v4]

22= [u2 u3 v1 v2 v3 v4]

23= [u2 u3 v1 v2 v3 v4]

1
0

0

0
1

0

-9 = u2+v1-9=0

-12 = u2+v2-12=0

-13 = u2+v3-13=0

Powerco NBV Pricing

33= [u2 u3 v1 v2 v3 v4]

34= [u2 u3 v1 v2 v3 v4]

0
1

0

0
1

0

0
1

0

0
1

0

-16 = u3+v3-16=0

-5 = u3+v4-5=0

Powerco NBV Pricing


For each basic variable Xij (i 1), the previous
equations reduce to
ui+vj=cij
Where ui is supply and vj is demand.
If u1=0, solve following system of m+n equations.

Powerco NBV Pricing


u1=0
u1+v1=8
u2+v1=9
u2+v2=12
u2+v3=13
u3+v3=16
u3+v4=5
By solving the system above we obtain:
v1=8, u2=1, v2=11,v3=12, u3=4, v4=1

Powerco NBV Pricing


For each nonbasic variable, compute
ij = ui+vj cij
Result:
12 = 0+11 6 = 5
14 = 0+1 9 = -8
31 = 4+8 14 = -2

13 = 0+12 10 = 2
24 = 1+1 7 = -5
32 = 4+11 9 = 6

Since 32 = Max ij >0, X32 enters the basis.


Each unit of X32 entered into the basis will decrease
Powercos cost by $6.

cBVB"1aij " cij ! 0

(4)

For a transportation problem, the equations in (4) are very easy to solve. To illustrate the
olution of (4), we find cBVB"1 for (5), by applying the northwest corner method bfs to
he Powerco problem.

Initial Powerco BFS from NWC Method


8

10

35

35
9

10

12
20

7
50

20

14

9
ENTER

45

13

20

16
10

5
30

30

40
30

From previous calculations, select X32 to enter the


basis.
HAPTER

7 Transportation, Assignment, and Transshipment Problems

(5)

Powerco NBV Pricing


35

10

35

20

ENTER
45

20

20

50

10

30

30

30

40

Identify the loop with X32 and some of the basic


variables. [ (3,2), (3,3), (2,3), (2,2)]
EVEN ODD

EVEN ODD

Powerco NBV Pricing


35

35

ODD
10

20

ENTER
45

20

20

10

50

30

40

ODD
30

30

Identify the loop with X32 and some of the basic


variables. [ (3,2), (3,3), (2,3), (2,2)]
EVEN ODD

EVEN ODD

MIN (ODD) = 10
PIVOT

13

TA B L E

35

Loop Involving
Entering Variable x32

13

10

35

35

Powerco NBV Pricing

14
9
The resulting
bfs will
be:

12

10

13

20

50

20

16

10

30

40

X11=35, X32=10, X21=10, X22=10, X23=30 and

X34=30

TA B L E

36

x32 Has Entered the Basis,


and x12 Enters Next

88

45

30

20

vvj j "
=

88

11
11

8
uuii ="00

77
10

35

35

10

12
10

!2
2

13

50

16

10
45

30

14

CHAPTER

12
12

9
11

30

5
30

20

30

7 Transportation, Assignment, and Transshipment Problems

40
30

Powerco NBV Pricing


The uis and vjs for the new bfs were obtained by
solving
u1=0
u2+v2=12
ui
u3+v4=5
8
6
10
9
0
u1+v1=8
9
12
13
7
1
14
9
16
5
-2
u2+v3=13
8
11
12
7
u2+v1=9
vj
u3+v2=9

Final Solution
Based on the reduced cost obtained in the previous slide,

we can see that X13 should enter the basis. We then


follow a similar process until an optimal solution is found.
The optimal solution for Powerco is X12=10, X13=25,
X21=45, X23=5, X32=10 and X34=30.
As a result of this solution the objective function value
becomes:
Z=6(10)+10(25)+9(45)+13(5)+9(10)+5(30)=$1020

Simplex for TP in Tableau

We now illustrate how the Simplex for TP works in the tableau form.
Take the Powerco problem for example.
S.1: Use a method to find a BFS (NWC method is used in the example)
(35, 8,0)
(10,9,0)

(20,12,0)

(20,13,0)
(10,16,0)

(30, 5,0)

S.2: Calculate the values of the dual variables (start with u1=0)
(35, 8,0)
(10,9,0)
8

0
(20,12,0)
11

(20,13,0)

(10,16,0)

(30, 5,0)

12

Simplex for TP in Tableau: Cont.

S.3: Fill the cells for non-basic variables where Xij=0, and the reduced
cost is defined by -Cij+Ui+Vj.
(35, 8,0)

(0,6,5)

(0,10,2)

(0,9,-8)

(10,9,0)

(20,12,0)

(20,13,0)

(0,7,-5)

(0,14,-2)

(0,9,6)

(10,16,0)

(30, 5,0)

11

12

S.4: Choose a variable (X32) to enter the basis. Find a loop and determine
how to update the variables (=10) in the loop.
(35, 8,0)

(0,6,5)

(0,10,2)

(0,9,-8)

(10,9,0)

(20,12,0)

(20,13,0)

(0,7,-5)

(0,14,-2)

(0,9,6)

(10,16,0)

(30, 5,0)

11

12

Simplex for TP in Tableau: Cont.


After updating the loop, we obtain a new BFS (X32 entered the basis, and
X33 left).
We then repeat steps 2,3,4 and obtain the following tableau.
Based on the reduced cost, X12 should enter the basis. We thus get a loop
consisting of four cells X11, X12, X22, X21.

(35, 8,0)

(0,6,5)

(0,10,2)

(0,9,-2)

(10,9,0)

(10,12,0)

(30,13,0)

(0,7,1)

(0,14,-8)

(10,9,0)

(0,16,-6)

(30, 5,0)

-2

11

12

Simplex for TP in Tableau: Cont.


After updating all the variables in the loop, we get a new BFS (X12
entered the basis and X22 left).
Then we repeat steps 2,3,4 and obtain the following tableau.
Based on the new reduced cost, we see that X13 should enter the basis.
We find a loop and determine the value of =25.

(25, 8,0)

(10,6,0)

(0,10,2)

(0,9,-7)

(20,9,0)

(0,12,-5)

(30,13,0)

(0,7,-4)

(0,14,-7)

(10,9,0)

(0,16,-1)

(30, 5,0)

12

Simplex for TP in Tableau: Cont.


Based on the new BFS , we calculate the dual variables Ui and Vj, and the
reduced cost for NBVs
Then we recalculate the dual variables, and update the reduced cost.
From the following tableau, all the reduced costs are non-positive. Thus
the current solution (X12=10, X13=25, X21=45, X23=5, X32=10 and X34=30)
is optimal.
(0, 8,-2)

(10,6,0)

(25,10,0)

(0,9,-7)

(45,9,0)

(0,12,-4)

(5,13,0)

(0,7,-2)

(0,14,-5)

(10,9,0)

(0,16,-3)

(30, 5,0)

10

Final Solution
The optimal solution for Powerco is X12=10, X13=25,

X21=45, X23=5, X32=10 and X34=30.


As a result of this solution the objective function value
becomes:
Z=6(10)+10(25)+9(45)+13(5)+9(10)+5(30)=$1020

Next Session
Sensitivity Analysis
Assignment and Transshipment Problems

Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.

Group Project: December 3, 2015 - 15 %


All Short Proposals have been reviewed. Only those

needing rewrites were notified. Resubmissions should be


in by now.
Status Report 1 Due: October 29, 2015 4 pm *
* (Printed copy in class; pdf copies by email to instructor & TA:

mmcguire2@uh.edu | mmcguir2@central.uh.edu &


aida.khayatian@gmail.com)

Please identify the Group Manager in Status Reports. The

Manager is responsible to compile and submit the groups


status reports and results.

INDE6372 Advanced Linear Optimization


1

LECTURE 11C
TRANSPORTATION, ASSIGNMENT
AND TRANSSHIPMENT PROBLEMS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

Outline
The Transportation Problem
Algorithms
Northwest Corner Method
Minimum Cost Method
Vogels Method
Simplex for Transportation Problem
Sensitivity Analysis
Assignment and Transshipment Problems

Transportation Problem
Find the best way
to deliver product to n demand points
from m supply points
given the variable cost of shipping the product
from one supply point to a demand point

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

Powerco
Transportation
Tableau
Shipping Costs, Supply,
and Demand for Powerco
TA B L E

s2

To
From
Plant 1
Plant 2
Plant 3 d1
Demand
Demand

cm1

(million kwh)

City 1

cm2

$8
$9
$14d2
45

City 2

City 3

$6
$12
$9
20

$10
$13
$16
30

City 4
cmn

$9
$7
dn $5
30

Supply
(million kwh)
sm 35

50
40

Optimal
solution City 1
3
City 2
City 3
City 4
Supply
exceed 35 million kwh. Each variable with first subscript 1 repTransportation Tableau 1 to the four cities cannot
8
6
9
10
for Powerco resents a shipment of power from plant 1, so we may express this restriction by the LP
10
35
25
Plant 1
constraint
TA B L E

9
Plant 2

12

13

x ! x14 " 35
x11 ! x12 !
5 13

45

50

In a similar fashion, we can find constraints that reflect plant 2s and plant 3s capacities.
14
9
16
5
Basic
Because power is supplied by the power plants, each is a supply point.
Analogously, a
Plant 3
40
10
30
constraint that ensures that the total quantity shipped from a plant doesvariables
not exceed plant
capacity is a supply
constraint.
The LP30formulation30of Powercos problem contains the
45
20
Demand
following three supply constraints:
CHAPTER

!x

!x

!x

" 35

11 Assignment,
12 and 13
14 Problems
7 Transportation,
Transshipment

(Plant 1 supply constraint)

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

Powerco Final Solution

c2n
s2

cm1
cmn
The optimal solution
forcm2Powerco is X12=10,
X13=25, X21=45,
sm
X23=5, X32=10 and X34=30.
d1

d2

dn

Objective
Demandfunction value:
Z=6(10)+10(25)+9(45)+13(5)+9(10)+5(30)=$1020
Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

CHAPTER

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

TP Sensitivity Analysis
Consider
1. Changing the objective function coefficient of a
non-basic variable.
2. Changing the objective function coefficient of a
basic variable.
3. Increasing a single supply by and a single
demand by .

1. Changing the objective function coefficient


of a nonbasic variable.
Changing the objective function coefficient of a

nonbasic variable Xij will leave the right hand


side of the optimal tableau unchanged.
The current basis will still be feasible.

1. Changing the objective function coefficient


of a nonbasic variable.
Changing the objective function coefficient of a

nonbasic variable Xij will leave the right hand


side of the optimal tableau unchanged. Thus the
current basis will still be feasible.
Since cBVB-1 is unchanged, the uis and vjs remain
unchanged.
In row 0, only the coefficient of the nonbasic Xij
will change.
Thus as long as the coefficient of Xij in the optimal
row 0 < 0, the current basis remains optimal as
well as feasible.

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
1. Powerco: Changing the objective
function
coefficient of a nonbasic variable.
2

c cost
Reduced
m1

cm2

cmn
sm

For what range of values of the cost of shipping 1


d1

d2

dn

million
Demand kwh of electricity from plant 1 to city 1 will
the current basis remain optimal?
Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

CHAPTER

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
1. Powerco: Changing the objective
function
coefficient of a nonbasic variable.
2

Let c11 ccm111 + =cm28 +

cmn

11 = u1 + v1 c11 = 0 + 6 (8 + )= -2 - sm
d1
d2
Constraint
(-2 - )
0; -2

dn

Demand

c11 8 + (-2) 6
Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

Demand

CHAPTER

35
7
50

5
9

20

16

5
30

30

7 Transportation, Assignment, and Transshipment Problems

13

10
45

Supply

25

45

Plant 3

City 4

10

12

14

City 3

30

40

Basic
variables

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
1. Powerco: Changing the objective
function
coefficient of a nonbasic variable.
2

Let c11 ccm111 + =cm28 +

cmn

11 = u1 + v1 c11 = 0 + 6 (8 + )= -2 - sm
d1
d2
Constraint
(-2 - )
0; -2

dn

Demand

c11 8 + (-2) 6 CURRENT BASIS STILL OPTIMAL


Optimal
solution
TA B L
E 3
Transportation Tableau
for Powerco

C11 6

City 1

City 2

6
10

Plant 1

9
Plant 2

Demand

CHAPTER

35
7
50

5
9

20

16

5
30

30

7 Transportation, Assignment, and Transshipment Problems

13

10
45

Supply

25

45

Plant 3

City 4

10

12

14

City 3

30

40

Basic
variables

2. Changing the objective function coefficient


of a basic variable.
Since cBVB-1 is changed, the coefficient of

each nonbasic variable in row 0 may change.


To determine whether the current basis
remains optimal, find the new uis and vjs
Use the new uis and vjs to price out all
nonbasic variables.
The current basis remains optimal as long as
all nonbasic variables price out < 0.

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
2. Powerco: Changing the objective
function
coefficient of a basic variable.
2

c
For whatc range of
values of thec cost of shipping 1
m1

m2

mn

million kwh of electricity from plant 1s to city 3 will


d
d
d
the Demand
current
basis
remain optimal?
m

Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

Demand

CHAPTER

35
7
50

5
9

20

16

5
30

30

7 Transportation, Assignment, and Transshipment Problems

13

10
45

Supply

25

45

Plant 3

City 4

10

12

14

City 3

30

40

Basic
variables

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
2. Powerco: Changing the objective
function
coefficient of a basic variable.
2

c = 10 +
Let c13 c c13 +
m1

cmn

m2

sm

13 = u1 + v3 = 10 +
d1

d2

dn

Demandsolve the equations for u , v


Next,
i
j

Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

Demand

CHAPTER

35
7
50

5
9

20

16

5
30

30

7 Transportation, Assignment, and Transshipment Problems

13

10
45

Supply

25

45

Plant 3

City 4

10

12

14

City 3

30

40

Basic
variables

ermine for the Powerco problem the range of values of the cost
from plant 1 to city 3 for which the current basis remains opti
we change
c13 from 10
to 10 $ the
!. Then
the equation
2. Powerco:
Changing
objective
function
!c13 " 0 c
0 to u1 coefficient
$ v3 " 10 of
$ a!.basic
Thus, variable.
to find the uis and vjs, we must
ions:
u2 $ u1 " 0

u3 $ v2 " 90 $ !

u2 $ v1 " 9
u1 $ v2 " 6
u2 $ v3 " 13

u1 $ v3 " 10 $ !
u3 $ v4 " 50 $ !
u1 $ v3 " 10 $ !

vers topics that may be omitted with no loss of continuity.

ansportation, Assignment, and Transshipment Problems

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

s
2. Powerco: Changing the objective
function
coefficient of a basic variable.
2

c = 10 +
Let c13 c c13 +
m1

cmn

m2

sm

13 = u1 + v3 = 10 +
d1

d2

dn

Demand
Solution:
u1=0, v2=6, v3=10+, v1=6+, u2= 3-,

u3=3, v4=2

Optimal
solution
3

TA B L E

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

Demand

CHAPTER

35
7
50

5
9

20

16

5
30

30

7 Transportation, Assignment, and Transshipment Problems

13

10
45

Supply

25

45

Plant 3

City 4

10

12

14

City 3

30

40

Basic
variables

2. Powerco: Changing the objective function


coefficient of a basic variable.
Solution: u1=0, v2=6, v3=10+, v1=6+, u2= 3-,
u3=3, v4=2
Next, price out reduced costs for each nonbasic
variable.
The current basis will remain optimal as long as
each nonbasic variable has a coefficient <0 in row
0.

9
Plant 2

12

45

7
50

5
14

Plant 3

13

9
10

16

5
30

40

2. Powerco: Changing the objective function


Demand
30
30
coefficient of45a basic20 variable.
Solution:
u1=0,wevobtain
=6+,
Solving
these equations,
0, v2 ! 6, v3 v
!110
" #, v1 u
!26="3-,
#, u2 ! 3 $
2=6,u1v!3=10+,
#, u3 ! 3, and v4 ! 2.
uWe
v4=2out each nonbasic variable. The current basis will remain optimal as long
3=3,
now price
as each nonbasic variable has a nonpositive coefficient in row 0.
c!11 ! u1 " v1 $ 8 ! # $ 2 % 0
c!14 ! u1 " v4 $ 9 ! $7
c!22 ! u2 " v2 $ 12 ! $3 $ # % 0
c!24 ! u2 " v4 $ 7 ! $2 $ # % 0
c!31 ! u3 " v1 $ 14 ! $5 " # % 0

for # % 2$
for # & $3
for # & $2
for # % 5$

c!33 ! u3 " v3 $ 16 ! # $ 3 % 0
for # % 3$
Thus, the current basis remains optimal for $2 % # % 2, or 8 ! 10 $ 2 % c13 % 10 "
2 ! 12.

Increasing Both Supply si and Demand dj by !


Observe that this change maintains a balanced transportation problem. Because the uis
and vjs may be thought of as the negative of each constraints shadow prices, we know

364

as each nonbasic variable has a nonpositive coefficient in row 0.


TA B L E

c11

c12

c!11 ! u1 " v1 $ 8 ! # $ 2 % 0
c!14 ! u1 " v4 $ 9 ! $7
c
c
c!2221 ! u2 " v222$ 12 ! $3 $ # % 0

A Transportation Tableau

c1n

Supply

for # % 2$
s1

c2n

for # & $3

s
2. Powerco:
Changing
the
objective
function
c! ! u " v $ 7 ! $2 $ # % 0
for # & $2
c! !of
u a
" vbasic
$ 14 ! $5
"#%0
for # % 5$
coefficient
variable.
24

31

c!33 ! u3 " v3 $ 16 ! # $ 3 % 0
for # % 3$
cm1
cm2
cmn
Thus, the current basis remains optimal for $2 % # % 2, or 8 !
10 $ 2 % c13 % 10 "
sm
2 ! 12.
d1

d2

dn

Demand

Optimal
solution
withdcurrent
basis for range:
Increasing Both
Supply
si andstays
Demand
j by !
8 c13 12

Observe
this changeCitymaintains
aCitybalanced
transportation
problem.
Because
the uis
Optimal
solution
3 that
1
2
City 3
City
4
Supply
andTableau
vjs may be thought of as8 the negative
of each constraints
shadow
prices, we know
Transportation
6
9
10
for Powerco
from
(37')Plant
of1 Chapter 6 that if the current
basis 25
remains optimal,
10
35
TA B L E

New 9z-value ! old


z-value "13#ui " #vj
12

50 (new cost)
45 plant 1s supply and city
5 2s demand by 1 unit, then
Plant 2if we increase
For example,
! 1,020 " 1(0) " 1(6) ! $1,026.
14
9
16
5
Basic
We may
also
find
the
new
values
of
the
decision
variables
as
follows:
Plant 3
40
10
30
variables
1 If xij is a basic variable in the optimal solution, then increase xij by #.
Demand

45

20

30

30

If xij is a nonbasic variable in the optimal solution, then find the loop involving xij and
some of the basic variables. Find an odd cell in the loop that is in row i. Increase the value
C H A P T E R 7 Transportation, Assignment, and Transshipment Problems
of this odd
cell by # and go around the loop, alternately increasing and then decreasing
2

3. Increasing Supply Si and Demand Dj by


Changing both supply and demand by the same amount

will maintain the balance of the transportation problem.


uis and vjs may be thought of as the negative of each
constraints shadow price.
If the current basis remains optimal
New Z value = old Z value + ui + vj

Powerco: Increase plant 1s supply & city 2s demand by 1

unit, then
New cost=1020+1(0)+1(6)=$1026

3. Increasing Supply Si and Demand Dj by


Finding new values of the decision variables:
1. If Xij is a basic variable in the optimal solution,
increase Xij by .
2. If Xij is a nonbasic variable in the optimal
solution, find the loop involving Xij and some of
the basic variables.
Find an odd cell in the loop that is in row i.
Increase the value of this odd cell by and go around the loop,

alternately increasing & decreasing current basic variables in the


loop by .

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

3. Powerco: Increasing Supply Ssi and


Demand Dj by
2

Basic variable:
X12 cm2
cm1

cmn
sm

S1 S1 + 2
1
D2 D2d+
2

d2

dn

Demand

Original
TA B L
E 3
Optimal
solution

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

CHAPTER

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

3. Powerco: Increasing Supply Si and


Demand Dj by
Basic variable: X12
S1 S1 + 2
D2 D2 + 2
Z = 1020 + 2u1 + 2v2 = 1032
TA B L E

40
New

al Tableau for PowercoOptimal


If
! 35 " 2 ! 37 and
d2 ! 20 " 2 ! 22
Plant 1

solution
vj !

City 1

City 2

City 3

City 4

10

8
uui =
! 00

6
12

33

45

TA B L E

41

al Tableau for Powerco If


! 35 " 1 ! 36 and

vj !

13

7
50

5
9

16

10

Demand

37

12

14
Plant 3

25

9
Plant 2

10

Supply

5
30

40

45

22

30

30

City 1

City 2

City 3

City 4

10

Supply

Basic
variables

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

3. Powerco: Increasing Supply Ssi and


Demand Dj by
2

Nonbasiccm1
variable:cm2X11

cmn
sm

S1 S1 + 1
1
D1 D1d+
1

d2

dn

Demand

Find Loop with X11


Original
TA B L
E 3
Optimal
solution

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

CHAPTER

9
35

13

7
50

5
9

16

10
45

Supply

25

45

Plant 3

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

364

TA B L E

c11

A Transportation Tableau

c12

Supply

c1n
s1

c21

c22

c2n

3. Powerco: Increasing Supply Ssi and


Demand Dj by
2

Have Loopcm1with X11cm2

cmn
sm

Row 1 odd cell in Loop is X13


d1
d2
Calculate
new optimal
solution: dn
Demand
X13 X13+ 1; X21 X21+1; X23 X23 1

Original
TA B L
E 3
Optimal
solution

Transportation Tableau
for Powerco

City 1

City 2

6
10

Plant 1

9
Plant 2

45

Supply

9
35

X13
13

7
50

5
9

16

10

Plant 3

CHAPTER

25

45

City 4

10

12

14

Demand

City 3

20

5
30

30

7 Transportation, Assignment, and Transshipment Problems

30

40

Basic
variables

TA B L E

40

Tableau for Powerco If


35 " 2 ! 37 and
! 20 " 2 ! 22

vj !

City 1

City 2

City 3

City 4

10

Supply

8
6
10
9
3. Powerco:
Increasing
Supply
S
and
i
u =0
12
25
37
Demand Dj by
9
12
13
7
Plant 1

ui ! 0

33
Plant 2
Calculate
new45optimal solution 5with current basis:50
5
X13 X13+ 1; X21 14X21+1; X239 X23 116
Plant 3

10

30

40

Demand Z = 1020+ 45
30
New
u1 + v1 =221026 (note:
typo30in text)
TA B L E

41New

Tableau for Powerco IfOptimal solution


vj !
35 " 1 ! 36 and
! 45 " 1 ! 46
Plant 1

City 1

City 2

City 3

City 4

10

uuii =!00

6
10

33

Demand

36

12

46

13

7
50

4
14

Plant 3

26

9
Plant 2

10

Supply

33

16

10
46

5
30

20

30

40

Basic
variables

30

basic variables. The loop is (1, 1)(1, 3)(2, 3)(2, 1). The odd cell in the loop and row
1 is x13. Thus, the new optimal solution will be obtained by increasing both x13 and x21

le.

ch the

ch the

he new

he new

medical
to the
e given

Exercise: Sensitivity Analysis


a The companys goal is to minimize the cost of meet Two plants
supply demands.
three customers
with medical
ing customers
Find two optimal
bfs for supplies.
this
transportation
problem. from the plants to the
The unit
costs of shipping
b Suppose
that
customer
2s demand
by one
customers,
along
with
the supplies
andincreased
demands,
are
unit. By how much would costs increase?

given below:
TA B L E

42
To

From
Plant 1
Plant 2
Demand

Customer 1

Customer 2

Customer 3

Supply

$55
$10
10

$65
$15
10

$80
$25
10

35
50

signment, and Transshipment Problems

le.

ch the

ch the

he new

he new

medical
to the
e given

Exercise: Sensitivity Analysis


a The companys goal is to minimize the cost of meet A. The
goal is toFind
minimize
the cost
of meeting
ingcompanys
customers demands.
two optimal
bfs for
this
transportation
problem.
customers
demands.
Find two optimal bfs for this
b Supposeproblem.
that customer 2s demand increased by one
transportation
unit. By how much would costs increase?
B. Suppose that customer 2s demand increased by one

unit. By how much would costs increase?


TA B L E

42

To
From
Plant 1
Plant 2
Demand

Customer 1

Customer 2

Customer 3

Supply

$55
$10
10

$65
$15
10

$80
$25
10

35
50

signment, and Transshipment Problems

Exercise: Sensitivity Analysis Answer


A. The companys goal is to minimize the cost of meeting
customers demands. Find two
18 optimal bfs for this
2(3) - 2(10) =problem.
994.
transportation

5a. Using the transportation simplex we found the


following optimal tableau (z = 950)
OPTIMAL SOLUTION 1
55
10

65

80

10

10

15
10

10

25

10
10

20
20

10

10

The degeneracy of this solution allows us to pivot in


x13 and find a second optimal solution:
OPTIMAL SOLUTION 2

5a. Using the transportation simplex we found the


following optimal tableau (z = 950)
OPTIMAL SOLUTION 1

Exercise: Sensitivity
Analysis
Answer
55
65
80
0
10

10

20

A. The companys goal


minimize25the cost0of meeting
10 is to 15

customers demands. Find


bfs for this
10 two optimal
10
20
10
10
10
10
transportation problem.

The degeneracy of this solution allows us to pivot in


x13 and find a second optimal solution:
OPTIMAL SOLUTION 2
55

65

10

80
0

10

15
10

10

0
10

25

10
10

20
20

10

10

If we increase customer 2's demand by ! OPTIMAL


SOLUTION 1 becomes

x13 and find a second optimal solution:


OPTIMAL SOLUTION 2
55

65

80

10
0
10 Answer
20
Exercise: Sensitivity
Analysis
10
15
25
0
10

10

20

B. Suppose that customer


2s demand
by one
10
10
10 increased
10

unit. By how much would costs increase?

If we increase customer 2's demand by ! OPTIMAL


SOLUTION 1 becomes
55
10

65

80

!
10

10-!
15

10
10+!

10

25

20
0

10

20
10

10-!

Setting ! = 1 yields new optimal solution x11 = 10, x12


=1, x14 = 9, x22 = x23 = 10, z = 1015.
If we try to increase customer 2's demand by !, then
OPTIMAL SOLUTION 2 becomes
55

65

80

If we increase customer 2's demand by ! OPTIMAL


SOLUTION 1 becomes
55
10

65

80

0
10-!

20

10
15
25
0
Exercise:
Sensitivity
Analysis
Answer
10
10
20
10

10+!

10

10-!

B. Suppose that customer 2s demand increased by one


Setting
! = 1much
yields
new costs
optimal
solution
unit.
By how
would
increase?

x11 = 10, x12

=1, x14 = 9, x22 = x23 = 10, z = 1015.

If we try to increase customer 2's demand by !, then


OPTIMAL SOLUTION 2 becomes
55

65

10

80
!

10
10

10-!

15
10+!
10+!

25
10-!
10

20
0
20

10-!

19
For !>0, this tableau is
no longer optimal (x12 must
enter the basis!). This is because the problem is no
longer degenerate, and pivoting in x12 will now decrease
z.
SECTION 7.5

Assignment Problems
An assignment problem is a balanced

transportation problem in which all supplies and


demands are equal to 1.
The Cost Matrix = cost of assigning each supply
point to each demand point.
All supplies and demands are integer.
Since RHS = 1, Xij = 0 or 1.
An assignment problem are a special case of
transportation problem for which the transportation
simplex is often very inefficient. Solutions have a
high degree of degeneracy.
Instead, alternate algorithms are used.

Machineco: Assignment Problem


Machineco needs to assign 4 jobs to 4 machines.
Each machine does 1 job (no switching).
Setup time for each machine varies, depending

on the job.
Minimize the total setup time.

Machineco: Assignment Problem


Setup times
(Also called the cost matrix)

Time (Hours)
Job1

Job2

Job3

Job4

Machine 1

14

Machine 2

12

Machine 3

Machine 4

10

Machineco: Assignment Problem Model


min Z = 14 X 11 + 5 X 12 + 8 X 13 + 7 X 14 + 2 X 21 + 12 X 22 + 6 X 23 + 5 X 24
+ 7 X 31 + 8 X 32 + 3 X 33 + 9 X 34 + 2 X 41 + X 42 + 6 X 43 + 10 X 44
s.t. X 11 + X 12 + X 13 + X 14 = 1
X 21 + X 22 + X 23 + X 24 = 1
X 31 + X 32 + X 33 + X 34 = 1
X 41 + X 42 + X 43 + X 44 = 1
X 11 + X 21 + X 31 + X 41 = 1
X 12 + X 22 + X 32 + X 42 = 1
X 13 + X 23 + X 33 + X 43 = 1
X 14 + X 24 + X 34 + X 44 = 1
Xij = 0orXij = 1

Machineco: Assignment Problem Model


Xij=1 if machine i is assigned to meet the

demands of job j

Xij=0 if machine i is not assigned to meet the

demands of job j

Assignment Problem: Hungarian Method


Step1.
Find a bfs.
Find the minimum element in each row of the m x m cost
matrix.
Construct a new matrix by subtracting from each cost the
minimum cost in its row.
For this new matrix, find the minimum cost in each
column.
Construct a new matrix (reduced cost matrix) by
subtracting from each cost the minimum cost in its
column.

Assignment Problem: Hungarian Method


Step2. Draw the minimum number of lines (horizontal and/or
vertical) that are needed to cover all the zeros in the reduced
cost matrix.
If m lines are required, an optimal solution is available
among the covered zeros in the matrix. If fewer than m lines
are required, proceed to step 3.
Step3. Find the smallest nonzero element (call its value k)
in the reduced cost matrix that is uncovered by the lines drawn
in step 2.
Now subtract k from each uncovered element of the reduced
cost matrix and add k to each element that is covered by two
lines.
Return to Step 2.

Assignment Problem: Machineco Hungarian Method


Time (Hours)
Job1

Job2

Job3

Job4

Machine 1

14

Machine 2

12

Machine 3

Machine 4

10

Cost matrix: 4 x 4
(m x m)

1. Row min
14

12

10

Assignment Problem: Machineco Hungarian Method

1a. Row min

14

12

10

1a. Subtract row i minimum from each cell in row i .


9

10

1b. Column min

1b. Subtract column j minimum from each cell in


column j.

Assignment Problem: Machineco Hungarian Method


9

10

# lines = 3 < 4, so
continue.

2. Draw lines to
cover all the zeroes.

Assignment Problem: Machineco Hungarian Method

10

2. Draw lines to
cover all the zeroes.
Smallest, uncovered
nonzero element
k=1

3a. Subtract k=1 from each uncovered element;


add k=1 to each twice covered element.
10=9+1

5=4+1

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

Machine i

3b. 4 lines now required to cover all zeroes.


Thus,
we havesolution
found the
optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
optimal
exists.
Of course, this agrees with the result obtained by the transportation simplex.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

X12 = 1

Machine i

X33 = 1

4
5

3c.
X33 = 1, since it is the only covered 0 in col 3.
Thus,
we have found the optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
X12 = 1,
it is
thethe
only
covered
0 in
Of course,
thissince
agrees
with
result
obtained
by col
the 2.
transportation simplex.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

X12 = 1

0
X24 = 1

Machine i

0
X33 = 1

4
5

3c.
Row 1 & Col 2 complete.
Thus, we have found the optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
Col 4 covered
= X24the
. result obtained by the transportation simplex.
Of course,
this agrees0 with
Set X24 = 1.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

X12 = 1

0
X24 = 1

Machine i

0
X33 = 1

4
5

3d.
X24 = 1.
Thus,
we have found the optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
Row 2this
& Col
4 complete.
Of course,
agrees
with the result obtained by the transportation simplex.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

X12 = 1

0
X24 = 1

Machine i

X41 = 1

0
X33 = 1

4
5

3e.
Select X41 = 1.
Thus, we have
found the optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
Of course, this agrees with the result obtained by the transportation simplex.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

Assignment Problem: Machineco Hungarian Method


Job j
TA B L E

49

Four Lines Required; Optimal


Solution Is Available

10

X12 = 1

0
X24 = 1

Machine i

X41 = 1

0
X33 = 1

4
5

3f. OPTIMAL ASSIGNMENT of machine i to job j.


X12 = 1.
Thus, we have found the optimal assignment x12 ! 1, x24 ! 1, x33 ! 1, and x41 ! 1.
X24course,
= 1. this agrees with the result obtained by the transportation simplex.
Of
X33 = 1.
X41 = 1.
Intuitive Justification of the Hungarian Method

To give an intuitive explanation of why the Hungarian algorithm works, we need to discuss the following result: If a constant is added to each cost in a row (or column) of a

h 1..10). Then edit line 3 to indicate that there are 8 jobs. Finally, in line 12,
pe the 80 entries of your cost matrix, following COST! and you would
oll!

iscussion of the Machineco example, it is unnecessary to force the ASSIGN(I,J) to


his will happen automatically!

Exercise: Hungarian Method

5 employees are available to perform 4 jobs.


The time it takes each person to perform each job is given below.
Determine the assignment of employees to jobs that minimizes the total

time required to perform the four jobs.


Hints: use a cost of M to rule out forbidden assignments and add a
dummy job (Job 5) to balance the problem. Assigning a person to the
rm four jobs.dummy
The job Thas
A BaL0Ecost.
50
ch job is given in
Time (hours)
employees to jobs
Person
Job 1
Job 2
Job 3
Job 4
perform the four

r a relay team for


swim 100 meters
or freestyle. Doc
he times given in

1
2
3
4
5

22
18
26
16
21

18

20
22

30
27
28

25

18
22
28
14
28

Note: Dashes indicate person cannot do that particular job.

balance the problem. Assigning a person to the


dummy job has a 0 cost.

Exercise: Hungarian Method - Answer


1
22

Job
2
18

3
30

4
18

5
0

Row Min
0

18

27

22

26

20

28

28

16

22

14

21

25

28

1
2
Person
3
4
5
Column Min

16

18

25

14

Since all Row minima are 0 we proceed to the column


minima. The reduced cost matrix is

Job
1

1
6

2
0

3
5

4
4

5
0

balance the problem. Assigning a person to the


dummy job has a 0 cost.

Exercise: Hungarian Method - Answer


1
22

Job
2
18

3
30

4
18

5
0

Row Min
0

18

27

22

26

20

28

28

16

22

14

21

25

28

1
2
Person
3
4
5
Column Min

16

18

25

14

Since all Row minima are 0 we proceed to the column


minima. The reduced cost matrix is

Job
1

1
6

2
0

3
5

4
4

5
0

5
Column Min

16

18

25

14

Since all Row minima are 0 we proceed to the column


minima. The reduced cost matrix is

Exercise: Hungarian Method - Answer


Job

Person

1
6

2
0

3
5

4
4

5
0

10

14

4
20

14

Only 4 lines (we have used Row 1, Row 4, Col. 3 and


Reduced
Matrix,all
after0's
subtracting
Col. 5) are
neededCost
to cover
in this column
matrix.minima.
The
Only 4 lines
are needed
to we
cover
all 0's in
smallest uncovered
element
is 2 so
subtract
2 this
frommatrix.
all uncovered
and uncovered
add 2 to all
twice
covered
Thecosts
smallest
element
is 2
so we subtract 2
costs. The resulting
matrix
is
from all uncovered costs and add 2 to all twice covered
Job
costs.
1
2
3
4
5
1
6
0
7
4
2

Person

12

12

20
5

14

Only 4 lines (we have used Row 1, Row 4, Col. 3 and


Col. 5) are needed to cover all 0's in this matrix. The
smallest uncovered element is 2 so we subtract 2 from
all uncovered costs and add 2 to all twice covered
costs. The resulting matrix is
Job
1
2
3
4
5
1
6
0
7
4
2

Exercise: Hungarian Method - Answer

Person

12

12

5 lines are needed to cover the 0's so an optimal


Resulting Reduced Cost Matrix
solution is available: x12=1, x21=1, x35=1, x44=1, x53=1.
53lines
nowassigned
required atojob
cover
optimal
Thus Person
is not
andalla zeroes.
total time
of
18+18+14+25=75
timeexists.
units is required to complete all
solution
the jobs.
2. Applying the Hungarian Method yields
Free Breast Fly
Back
3
3
0
2
Hall
0
6
1
1
Spitz
0
3
4
6
Montgomery

20
5

14

Only 4 lines (we have used Row 1, Row 4, Col. 3 and


Col. 5) are needed to cover all 0's in this matrix. The
smallest uncovered element is 2 so we subtract 2 from
all uncovered costs and add 2 to all twice covered
costs. The resulting matrix is
Dummy Job 5
Job
1
2
3
4
5
1
6
7
4
2
X0 = 1

Exercise: Hungarian Method - Answer


12

Person

X210= 1

12

X350= 1

X530= 1

0= 1
X44

12

5 lines are needed to cover the 0's so an optimal


Resulting Reduced Cost Matrix
solution is available: x12=1, x21=1, x35=1, x44=1, x53=1.
53lines
nowassigned
required atojob
cover
optimal
Thus Person
is not
andalla zeroes.
total time
of
18+18+14+25=75
timeexists.
units is required to complete all
solution
the jobs. Optimal soln: x =1, x =1, x =1, x =1, x =1.
12

21

35

Person 3 is not assigned a job

2. Applying the Hungarian Method yields


Total
time Breast
= 18+18+14+25=75
Free
Fly
Back
complete
all the
3
3 jobs.
0
2
Hall
0
6
1
1
Spitz
0
3
4
6
Montgomery

44

53

time units is required to

Transshipment Problem
Transportation Problem setup: ONLY DIRECT

supply point demand point.


Transshipment Problem: allows INTERMEDIATE
transshipment points.
Transshipment Problem: can be formulated as a
Transportation Problem.

Convert Transshipment Problem to TP


Step 1. If necessary, add a dummy demand point

to balance the problem. This will have a supply of


0 & a demand = the problems excess supply.
Shipments to the dummy and from a point to itself
= 0.
Let s= total available supply.

Convert Transshipment Problem to TP


Step 2a.
Construct a transportation tableau:
Set up a row in the tableau for each supply point

& for each transshipment point.


Set up a column for each demand point & for
each transshipment point.

Convert Transshipment Problem to TP


Step 2b.
Set up each supply point = original supply.
Set up demand point = original demand.

Convert Transshipment Problem to TP


Step 2c.
Let s = total available supply.
For each transshipment point:
supply = (points original supply) + s
demand =(points original demand) + s

For a transshipment point that is a net supplier:

net outflow = points original supply


For a transshipment point that is a net demander:
net inflow = points original demand
Total amount through transshipment points s.

by solving a transportation problem. Given a transshipment problem, we create a balanced


transportation problem by the following procedure (assume that total supply exceeds total demand):
If necessary, add a dummy demand point (with a supply of 0 and a demand equal
to the problems excess supply) to balance the problem. Shipments to the dummy and from
a point to itself will, of course, have a zero shipping cost. Let s ! total available supply.
Step 1

Transshipment: Widgetco

Construct a transportation tableau as follows: A row in the tableau will be needed


for each supply point and transshipment point, and a column will be needed for each demand point and transshipment point. Each supply point will have a supply equal to its
original supply, and each demand point will have a demand equal to its original demand.
Let s ! total available supply. Then each transshipment point will have a supply equal to
(points original supply) " s and a demand equal to (points original demand) " s. This
ensures that any transshipment point that is a net supplier will have a net outflow equal
to the points original supply, and, similarly, a net demander will have a net inflow equal
to the points original demand. Although we dont know how much will be shipped
through each transshipment point, we can be sure that the total amount will not exceed s.
This explains why we add s to the supply and demand at each transshipment point. By
adding the same amounts to the supply and demand, we ensure that the net outflow at each
transshipment point will be correct, and we also maintain a balanced transportation
tableau.

Step 2

Widgetco manufactures widgets at two factories:

Memphis & Denver.


Memphis factory produces 150 widgets/day
Denver factory produces 200 widgets/day
Widgets are shipped by air to customers in LA and
Boston 130 widgets/day to each location.
Select the air routing to minimize total cost.

FIGURE

Memphis

New York

Los
Angeles

Denver

Chicago

Boston

A Transshipment
Problem

7. 6 Transshipment Problems

401

by solving a transportation problem. Given a transshipment problem, we create a balanced


transportation problem by the following procedure (assume that total supply exceeds total demand):
If necessary, add a dummy demand point (with a supply of 0 and a demand equal
to the problems excess supply) to balance the problem. Shipments to the dummy and from
a point to itself will, of course, have a zero shipping cost. Let s ! total available supply.
Step 1

Transshipment: Widgetco

Construct a transportation tableau as follows: A row in the tableau will be needed


for each supply point and transshipment point, and a column will be needed for each demand point and transshipment point. Each supply point will have a supply equal to its
original supply, and each demand point will have a demand equal to its original demand.
Memphis factory
150 widgets/day
Letproduces
s ! total available
supply. Then each transshipment point will have a supply equal to
(points original
supply)
" s and a demand equal to (points original demand) " s. This
Denver factory produces
200
widgets/day
Total supply s =ensures
350 that any transshipment point that is a net supplier will have a net outflow equal
to the points original supply, and, similarly, a net demander will have a net inflow equal
Widgets are shipped
by air original
to customers
LA andwe
Boston
130how
widgets/day
each
to the points
demand.inAlthough
dont know
much will betoshipped
location.
through each transshipment point, we can be sure that the total amount will not exceed s.
Total demand dThis
= 260
explains why we add s to the supply and demand at each transshipment point. By
adding
the d
same=amounts
to the supply and demand, we ensure that the net outflow at each
Dummy Demand
Point:
s-d = 90
dp
transshipment point will be correct, and we also maintain a balanced transportation
To convert to TP, add s=350 to each transshipment points supply & demand.
tableau.
Step 2

Ignore shipments to dummy & from a point to itself.

FIGURE

Memphis

New York

Los
Angeles

Denver

Chicago

Boston

A Transshipment
Problem

7. 6 Transshipment Problems

401

by solvinghas
a transportation
Given a transshipment
we create
a balanced
York and Chicago)
a net outflowproblem.
of 0; whatever
flows into theproblem,
transshipment
point
problem
by A
thegraphical
followingrepresentation
procedure (assume
total solution
supply exceeds
tomust leavetransportation
the transshipment
point.
of thethat
optimal
to
tal demand):
the Widgetco
example is given in Figure 10.
SupposeStep
that1 weIf modify
theadd
Widgetco
example
allow
necessary,
a dummy
demandand
point
(withshipments
a supply ofbetween
0 and a Memdemand equal
phis and Denver.
This
would
make
Memphis
and
Denver
transshipment
points
and
would
to the problems excess supply) to balance the problem. Shipments to the dummy and from
add columns
for Memphis
and of
Denver
the Table
tableau.cost.
TheLet
Memphis
row
in the supply.
a point
to itself will,
course,tohave
a zero59
shipping
s ! total
available
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have
Step 2 Construct a transportation tableau as follows: A row in the tableau will be needed
for each supply point and transshipment point, and a column will be needed for each demandN.Y.point and transshipment
point.
Each supply
point will
have a supply
equal to its
Chicago
L.A.
Boston
Dummy
Supply
original supply, and each demand point will have a demand equal to its original demand.
8
13
25
28
0
Let s ! total available supply. Then each transshipment point will have a supply equal to
20
130
150
Memphis
(points original supply) " s and a demand equal to (points original demand) " s. This
ensures that any transshipment point that is a net supplier will have a net outflow equal
15
12
26
25
0
to the points original supply, and, similarly, a net demander will have a net inflow equal
70how much will
200 be shipped
to the points original demand. Although 130
we dont know
Denver
through each transshipment point, we can be sure that the total amount will not exceed s.
0
6
16
17
0
This
explains
why
we
add
s
to
the
supply
and
demand
at
each
transshipment
220
130
350 point. By
N.Y.
adding the same amounts to the supply and demand, we ensure that the net outflow at each
transshipment point will be correct, and we also maintain a balanced transportation
6
0
14
16
0
tableau.
350
350

Transshipment: Widgetco
TA B L E

59

Representation of
Transshipment Problem
as Balanced
Transportation Problem

Chicago

Demand

Memphis
FIGUR
E 9

A10Transshipment
Optimal Solution
Problem
Denver
to Widgetco

350

Memphis
130

350

New York

130

New York
130

Los
Angeles

Chicago

Boston

FIGURE

Denver

Chicago

130

90

Los
Angeles

Boston

130

402

CHAPTER

7 Transportation, Assignment, and Transshipment Problems


7. 6 Transshipment Problems

401

York and Chicago) has a net outflow of 0; whatever flows into the transshipment point
Denver. This
make representation
Memphis andofDenver
transshipment
must leavephis
the and
transshipment
point.would
A graphical
the optimal
solution to points and would
the Widgetco
given
in Figureand
10. Denver to the Table 59 tableau. The Memphis row in the
add example
columnsisfor
Memphis
Suppose
that we
modify
thehave
Widgetco
example
and "
allow
between
Mem- row would have
tableau
would
now
a supply
of 150
350shipments
! 500, and
the Denver
phis and Denver. This would make Memphis and Denver transshipment points and would
add columns for Memphis and Denver to the Table 59 tableau. The Memphis row in the
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have
N.Y.
Chicago
L.A.
Boston
Dummy
Supply
T A B L E 59
Representation of
8
13
25
28
0
Problem MemphisN.Y.
130Chicago
150
L.A.
Boston
Dummy
Supply20
T A B Transshipment
L E 59
Representation of as Balanced
8
13
25
28
0
15
12
26 20
25 150
0
Transshipment
Problem Memphis
Transportation
Problem
130
as Balanced
70
130
200
Denver
15
12
26
25
0
Transportation Problem
130
0
6
16 70
17 200
0
Denver
220
130
350

Transshipment: Widgetco

N.Y.

220

N.Y.

Chicago
Chicago
Demand

Memphis

FE
I G10
URE
FIGUR

402

Demand
350

Memphis
130

10

Optimal Solution
Optimal Solution
Denver
to Widgetco
to Widgetco

402

CHAPTER

Denver

6
6

16

130

350

14

14

16

16

350
350

130

0
350

350

350
130

130
130

130

New
130 York

Los
Angeles

Chicago

Chicago

Boston

130

130

New York

350

350

7 Transportation, Assignment, and Transshipment Problems


CHAPTER

17

7 Transportation, Assignment, and Transshipment Problems

130
90

Los
Angeles

Boston

90

York and Chicago) has a net outflow of 0; whatever flows into the transshipment point
must leave the transshipment point. A graphical representation of the optimal solution to
the Widgetco example is given in Figure 10.
Suppose that we modify the Widgetco example and allow shipments between Memphis and Denver. This would make Memphis and Denver transshipment points and would
add columns for Memphis and Denver to the Table 59 tableau. The Memphis row in the
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have

Transshipment: Widgetco
TA B L E

59

N.Y.

Chicago

L.A.

Boston

Dummy

Supply

Representation of
8
13
25
28
0
Transshipment Problem
20 tableau and
130example, this procedure yields the transportation
150its optiFor Memphis
the Widgetco
as Balanced
mal solution given in Table
59. Because
s ! (total
supply) !25150 " 2000! 350 and (total
15
12
26
Transportation Problem

demand) ! 130 " 130 ! 260, the dummy demand point


has a demand
of 350200
# 260 !
70
130
90. TheDenver
other supplies and demands in the transportation tableau are obtained by adding
0
6 supply and
16 demand. 17
0
s ! 350 to each transshipment
points
220 solution to the transportation
130
350
In interpreting
the
problem created from a transshipment
N.Y.
problem, we simply ignore the shipments to the dummy and from a point to itself. From
6
0
14
16
0
Table 59, we find that Widgetco
should
produce
130
widgets
at
Memphis,
ship
350
350them to
Chicago
New York, and transship them from New York to Los Angeles. The 130 widgets produced
at Denver should be350
shipped directly
to Boston.
outflow from
350
130 The net
130
90 each city is
Demand

Memphis
FIGURE

10

Optimal Solution
to Widgetco

402

Denver

Memphis:
220 " 130 " 20 " 220 ! 150
Denver:
220 " 130 " 70 " 220 ! 200
Los
130
130
N.Y.: New York220 " 130 # 130
# 220 ! 0
Angeles
Chicago:
350 # 350 # 130 # 220 ! 0
Chicago 350 # 350 #130
Boston
L.A.:
# 220 ! 0
Boston: 130 350 # 350 #130 # 220 ! 0
Dummy:
#20 # 70 # 130 # 220 ! #90

ddp = s-d = 90

C H A P T net
E R 7outflow
Transportation,
Assignment, and
Problems that each transshipment point (New
A negative
represents
anTransshipment
inflow. Observe
York and Chicago) has a net outflow of 0; whatever flows into the transshipment point

Transportation Problem Limitations


TP generally handles only one product supplied

and demanded at multiple locations unless


special conditions are met.
Difficult to generalize the technique for situations
with nonlinear & concave objective functions, e.g.:
Economy of scale, when the per-unit cost of transportation on a

link decreases with volume.


Fixed + variable transportation. For example, truck rental =
fixed charge + mileage charge.

Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.

Group Project: December 3, 2015 - 15 %


All Short Proposals have been reviewed. Only those

needing rewrites were notified. Resubmissions should be


in by now.
Status Report 1 Due: October 29, 2015 4 pm *
* (Printed copy in class; pdf copies by email to instructor & TA:

mmcguire2@uh.edu | mmcguir2@central.uh.edu &


aida.khayatian@gmail.com)

Please identify the Group Manager in Status Reports. The

Manager is responsible to compile and submit the groups


status reports and results.

INDE6372 Advanced Linear Optimization


1

LECTURE 11D
TRANSPORTATION, ASSIGNMENT
AND TRANSSHIPMENT PROBLEMS
& DEALING WITH PROJECT DATA
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

Outline
The Transportation Problem
Algorithms
Northwest Corner Method
Minimum Cost Method
Vogels Method
Simplex for Transportation Problem
Sensitivity Analysis
Assignment and Transshipment Problems

Transportation Problem
Find the best way
to deliver product to n demand points
from m supply points
given the variable cost of shipping the product
from one supply point to a demand point

Transshipment Problem
Transportation Problem setup: ONLY DIRECT

supply point demand point.


Transshipment Problem: allows INTERMEDIATE
transshipment points.
Transshipment Problem: can be formulated as a
Transportation Problem.

Convert Transshipment Problem to TP


Step 1. If necessary, add a dummy demand point

to balance the problem. This will have a supply of


0 & a demand = the problems excess supply.
Shipments to the dummy and from a point to itself
= 0.
Let s= total available supply.

Convert Transshipment Problem to TP


Step 2a.
Construct a transportation tableau:
Set up a row in the tableau for each supply point

& for each transshipment point.


Set up a column for each demand point & for
each transshipment point.

Convert Transshipment Problem to TP


Step 2b.
Set up each supply point = original supply.
Set up demand point = original demand.

Convert Transshipment Problem to TP


Step 2c.
Let s = total available supply.
For each transshipment point:
supply = (points original supply) + s
demand =(points original demand) + s

For a transshipment point that is a net supplier:

net outflow = points original supply


For a transshipment point that is a net demander:
net inflow = points original demand
Total amount through transshipment points s.

by solving a transportation problem. Given a transshipment problem, we create a balanced


transportation problem by the following procedure (assume that total supply exceeds total demand):
If necessary, add a dummy demand point (with a supply of 0 and a demand equal
to the problems excess supply) to balance the problem. Shipments to the dummy and from
a point to itself will, of course, have a zero shipping cost. Let s ! total available supply.
Step 1

Transshipment: Widgetco

Construct a transportation tableau as follows: A row in the tableau will be needed


for each supply point and transshipment point, and a column will be needed for each demand point and transshipment point. Each supply point will have a supply equal to its
original supply, and each demand point will have a demand equal to its original demand.
Let s ! total available supply. Then each transshipment point will have a supply equal to
(points original supply) " s and a demand equal to (points original demand) " s. This
ensures that any transshipment point that is a net supplier will have a net outflow equal
to the points original supply, and, similarly, a net demander will have a net inflow equal
to the points original demand. Although we dont know how much will be shipped
through each transshipment point, we can be sure that the total amount will not exceed s.
This explains why we add s to the supply and demand at each transshipment point. By
adding the same amounts to the supply and demand, we ensure that the net outflow at each
transshipment point will be correct, and we also maintain a balanced transportation
tableau.

Step 2

Widgetco manufactures widgets at two factories:

Memphis & Denver.


Memphis factory produces 150 widgets/day
Denver factory produces 200 widgets/day
Widgets are shipped by air to customers in LA and
Boston 130 widgets/day to each location.
Select the air routing to minimize total cost.

FIGURE

Memphis

New York

Los
Angeles

Denver

Chicago

Boston

A Transshipment
Problem

7. 6 Transshipment Problems

401

by solving a transportation problem. Given a transshipment problem, we create a balanced


transportation problem by the following procedure (assume that total supply exceeds total demand):
If necessary, add a dummy demand point (with a supply of 0 and a demand equal
to the problems excess supply) to balance the problem. Shipments to the dummy and from
a point to itself will, of course, have a zero shipping cost. Let s ! total available supply.
Step 1

Transshipment: Widgetco

Construct a transportation tableau as follows: A row in the tableau will be needed


for each supply point and transshipment point, and a column will be needed for each demand point and transshipment point. Each supply point will have a supply equal to its
original supply, and each demand point will have a demand equal to its original demand.
Memphis factory
150 widgets/day
Letproduces
s ! total available
supply. Then each transshipment point will have a supply equal to
(points original
supply)
" s and a demand equal to (points original demand) " s. This
Denver factory produces
200
widgets/day
Total supply s =ensures
350 that any transshipment point that is a net supplier will have a net outflow equal
to the points original supply, and, similarly, a net demander will have a net inflow equal
Widgets are shipped
by air original
to customers
LA andwe
Boston
130how
widgets/day
each
to the points
demand.inAlthough
dont know
much will betoshipped
location.
through each transshipment point, we can be sure that the total amount will not exceed s.
Total demand dThis
= 260
explains why we add s to the supply and demand at each transshipment point. By
adding
the d
same=amounts
to the supply and demand, we ensure that the net outflow at each
Dummy Demand
Point:
s-d = 90
dp
transshipment point will be correct, and we also maintain a balanced transportation
To convert to TP, add s=350 to each transshipment points supply & demand.
tableau.
Step 2

Ignore shipments to dummy & from a point to itself.

FIGURE

Memphis

New York

Los
Angeles

Denver

Chicago

Boston

A Transshipment
Problem

7. 6 Transshipment Problems

401

by solvinghas
a transportation
Given a transshipment
we create
a balanced
York and Chicago)
a net outflowproblem.
of 0; whatever
flows into theproblem,
transshipment
point
problem
by A
thegraphical
followingrepresentation
procedure (assume
total solution
supply exceeds
tomust leavetransportation
the transshipment
point.
of thethat
optimal
to
tal demand):
the Widgetco
example is given in Figure 10.
SupposeStep
that1 weIf modify
theadd
Widgetco
example
allow
necessary,
a dummy
demandand
point
(withshipments
a supply ofbetween
0 and a Memdemand equal
phis and Denver.
This
would
make
Memphis
and
Denver
transshipment
points
and
would
to the problems excess supply) to balance the problem. Shipments to the dummy and from
add columns
for Memphis
and of
Denver
the Table
tableau.cost.
TheLet
Memphis
row
in the supply.
a point
to itself will,
course,tohave
a zero59
shipping
s ! total
available
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have
Step 2 Construct a transportation tableau as follows: A row in the tableau will be needed
for each supply point and transshipment point, and a column will be needed for each demandN.Y.point and transshipment
point.
Each supply
point will
have a supply
equal to its
Chicago
L.A.
Boston
Dummy
Supply
original supply, and each demand point will have a demand equal to its original demand.
8
13
25
28
0
Let s ! total available supply. Then each transshipment point will have a supply equal to
20
130
150
Memphis
(points original supply) " s and a demand equal to (points original demand) " s. This
ensures that any transshipment point that is a net supplier will have a net outflow equal
15
12
26
25
0
to the points original supply, and, similarly, a net demander will have a net inflow equal
70how much will
200 be shipped
to the points original demand. Although 130
we dont know
Denver
through each transshipment point, we can be sure that the total amount will not exceed s.
0
6
16
17
0
This
explains
why
we
add
s
to
the
supply
and
demand
at
each
transshipment
220
130
350 point. By
N.Y.
adding the same amounts to the supply and demand, we ensure that the net outflow at each
transshipment point will be correct, and we also maintain a balanced transportation
6
0
14
16
0
tableau.
350
350

Transshipment: Widgetco
TA B L E

59

Representation of
Transshipment Problem
as Balanced
Transportation Problem

Chicago

Demand

Memphis
FIGUR
E 9

A10Transshipment
Optimal Solution
Problem
Denver
to Widgetco

350

Memphis
130

350

New York

130

New York
130

Los
Angeles

Chicago

Boston

FIGURE

Denver

Chicago

130

90

Los
Angeles

Boston

130

402

CHAPTER

7 Transportation, Assignment, and Transshipment Problems


7. 6 Transshipment Problems

401

York and Chicago) has a net outflow of 0; whatever flows into the transshipment point
Denver. This
make representation
Memphis andofDenver
transshipment
must leavephis
the and
transshipment
point.would
A graphical
the optimal
solution to points and would
the Widgetco
given
in Figureand
10. Denver to the Table 59 tableau. The Memphis row in the
add example
columnsisfor
Memphis
Suppose
that we
modify
thehave
Widgetco
example
and "
allow
between
Mem- row would have
tableau
would
now
a supply
of 150
350shipments
! 500, and
the Denver
phis and Denver. This would make Memphis and Denver transshipment points and would
add columns for Memphis and Denver to the Table 59 tableau. The Memphis row in the
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have
N.Y.
Chicago
L.A.
Boston
Dummy
Supply
T A B L E 59
Representation of
8
13
25
28
0
Problem MemphisN.Y.
130Chicago
150
L.A.
Boston
Dummy
Supply20
T A B Transshipment
L E 59
Representation of as Balanced
8
13
25
28
0
15
12
26 20
25 150
0
Transshipment
Problem Memphis
Transportation
Problem
130
as Balanced
70
130
200
Denver
15
12
26
25
0
Transportation Problem
130
0
6
16 70
17 200
0
Denver
220
130
350

Transshipment: Widgetco

N.Y.

220

N.Y.

Chicago
Chicago
Demand

Memphis

FE
I G10
URE
FIGUR

402

Demand
350

Memphis
130

10

Optimal Solution
Optimal Solution
Denver
to Widgetco
to Widgetco

402

CHAPTER

Denver

6
6

16

130

350

14

14

16

16

350
350

130

0
350

350

350
130

130
130

130

New
130 York

Los
Angeles

Chicago

Chicago

Boston

130

130

New York

350

350

7 Transportation, Assignment, and Transshipment Problems


CHAPTER

17

7 Transportation, Assignment, and Transshipment Problems

130
90

Los
Angeles

Boston

90

York and Chicago) has a net outflow of 0; whatever flows into the transshipment point
must leave the transshipment point. A graphical representation of the optimal solution to
the Widgetco example is given in Figure 10.
Suppose that we modify the Widgetco example and allow shipments between Memphis and Denver. This would make Memphis and Denver transshipment points and would
add columns for Memphis and Denver to the Table 59 tableau. The Memphis row in the
tableau would now have a supply of 150 " 350 ! 500, and the Denver row would have

Transshipment: Widgetco
TA B L E

59

N.Y.

Chicago

L.A.

Boston

Dummy

Supply

Representation of
8
13
25
28
0
Transshipment Problem
20 tableau and
130example, this procedure yields the transportation
150its optiFor Memphis
the Widgetco
as Balanced
mal solution given in Table
59. Because
s ! (total
supply) !25150 " 2000! 350 and (total
15
12
26
Transportation Problem

demand) ! 130 " 130 ! 260, the dummy demand point


has a demand
of 350200
# 260 !
70
130
90. TheDenver
other supplies and demands in the transportation tableau are obtained by adding
0
6 supply and
16 demand. 17
0
s ! 350 to each transshipment
points
220 solution to the transportation
130
350
In interpreting
the
problem created from a transshipment
N.Y.
problem, we simply ignore the shipments to the dummy and from a point to itself. From
6
0
14
16
0
Table 59, we find that Widgetco
should
produce
130
widgets
at
Memphis,
ship
350
350them to
Chicago
New York, and transship them from New York to Los Angeles. The 130 widgets produced
at Denver should be350
shipped directly
to Boston.
outflow from
350
130 The net
130
90 each city is
Demand

Memphis
FIGURE

10

Optimal Solution
to Widgetco

402

Denver

Memphis:
220 " 130 " 20 " 220 ! 150
Denver:
220 " 130 " 70 " 220 ! 200
Los
130
130
N.Y.: New York220 " 130 # 130
# 220 ! 0
Angeles
Chicago:
350 # 350 # 130 # 220 ! 0
Chicago 350 # 350 #130
Boston
L.A.:
# 220 ! 0
Boston: 130 350 # 350 #130 # 220 ! 0
Dummy:
#20 # 70 # 130 # 220 ! #90

ddp = s-d = 90

C H A P T net
E R 7outflow
Transportation,
Assignment, and
Problems that each transshipment point (New
A negative
represents
anTransshipment
inflow. Observe
York and Chicago) has a net outflow of 0; whatever flows into the transshipment point

Transshipment: Exercise 1
Sunco Oil produces oil at two wells.
Well 1 produces 150,000 barrels/day.
Well 2 produces 200,000 barrels/day.
Oil can be shipped directly from the wells to Suncos customers in

Los Angeles and New York.


Alternatively, Sunco could transport oil to the ports of Mobile and
Galveston & then ship it by tanker to New York or Los Angeles.
Los Angeles requires 160,000 barrels per day.
New York requires 140,000 barrels per day.
The costs of shipping 1,000 barrels between two points are shown in
the next table.
Formulate a transshipment model (and equivalent transportation
model) that could be used to minimize the transport costs in meeting
the oil demands of Los Angeles and New York.
ONLY CREATE THE TABLEAU DO NOT SOLVE!

00 ! 350 " 550. The new Memphis column would have a demand of 0 !
and the new Denver column would have a demand of 0 ! 350 " 350. Fie that shipments between demand points L.A. and Boston were allowed. This
L.A. and Boston transshipment points and add rows for L.A. and Boston.
or both the L.A. and Boston rows would be 0 ! 350 " 350. The demand for
. and Boston columns would now be 130 ! 350 " 480.

Transshipment: Exercise 1

Sunco Oil produces oil at two wells.


Well 1 produces 150,000 barrels/day.
Well 2 produces 200,000 barrels/day.
Los Angeles requires 160,000 barrels per day.
New York requires 140,000 barrels per day.
nd Detroit and
has shipTvia
A B Mobile
L E 61 or Galveston or direct.
Can
supplies cars to
To ($)
st of shipping a car
From
Well 1
Well 2
Mobile
Galveston
N.Y.
means that a
oduce as many as
Well 1
0

10
13
25
many as 2,900 cars.
Well 2

0
15
12
26
ampa must receive
Mobile

0
6
16
Galveston

6
0
14
ation problem that
g costs incurred in
N.Y.

0
mpa.
L.A.

15
shipments between

shipments between
cost of $5.

Note: Dashes indicate shipments that are not allowed.

L.A.

28
25
17
16
15
0

Transshipment: Exercise 1 Answer


(Supplies and demands are in thousands)
Total SupplyTotal Demand=350300=50
Dummy demand pt. has demand
of 50.
29

The balanced transportation tableau is:


Mobile
10

Galv.
13

NY
25

LA
28

Dummy
0

Well 1

150
15

12

26

25

Well 2

200
0

16

17

14

16

15

Mobile

0+350=350

Galv.

0+350=350

NY

0+350=350
M

LA
Demands

Supplies

15

0
0+350

350

350

140
+350

160
+350

50

Assignment #2: Transshipment


2.1 Solve Exercise 1, using the balanced transportation

tableau from the previous slide.


2.2 Redo Exercise 1. Assume that before being shipped to Los
Angeles or New York, all oil produced at the wells must be
refined at either Galveston or Mobile. To refine 1,000 barrels of
oil costs $12 at Mobile and $10 at Galveston. Assuming that
both Mobile and Galveston have infinite refinery capacity,
formulate AND SOLVE a transshipment and balanced
transportation model to minimize the daily cost of transporting
and refining the oil requirements of Los Angeles and New York.
Assignment #2 Due Thursday November 5, 2015 4 pm *
* (Printed copy in class; pdf copies by email to instructor & TA:

mmcguire2@uh.edu | mmcguir2@central.uh.edu &


aida.khayatian@gmail.com)
You may work solo or in pairs. Remember academic honesty!

Transportation Problem Limitations


TP generally handles only one product supplied

and demanded at multiple locations unless


special conditions are met.
Difficult to generalize the technique for situations
with nonlinear & concave objective functions, e.g.:
Economy of scale, when the per-unit cost of transportation on a

link decreases with volume.


Fixed + variable transportation. For example, truck rental =
fixed charge + mileage charge.

Dealing with Project Data

Real Life Data Preparation


WHO
WHAT
WHEN
WHERE
WHY
HOW HOW MUCH?

Real Life Data Preparation

Notes on Real Life Data Preparation


WHO will make a decision based on the analysis
WHAT
INPUT: What data can be supplied; data ranges & format
INPUT: What data types/units (integer/fraction, etc.)
OUTPUT: What data and information will result
WHEN ..Are data over time? One sample?
WHERE where are data from? How good is source?
WHY ..is the decision based on this data important? To

whom?
HOW will data be supplied/stored/processed
(spreadsheet, database, pdf) INPUT & OUTPUT
HOW MUCH? Data, budget,

1. Collect your data


If at beginning of project, set the parameters for new

(prospective) data collection

Which cases should be included? Excluded?


For quantitative, how good is the measuring device? Data is only

as good as the least sensitive measurement device


Make assumptions clear from the start

If using existing (retrospective) data, document the

assumptions for data collection


Look for patterns in your data
Look for data ranges
Watch for missing data
KEEP BACKUPS OF ALL DATA, FROM ORIGINAL TO
FINAL. KEEP TIME-STAMPED AUDIT TRAIL.

2. Select your model(s)


Which model is best to help support the decision that can

be made?
If there are limited models to choose from (such as using
LP models), is there some way to frame the question or
organize the data so that an existing model can be used?
KEEP BACKUPS OF ALL MODELS, FROM ORIGINAL
TO FINAL. KEEP TIME-STAMPED AUDIT TRAIL.

3. Prepare the Data


A. Clean the data
B. Create necessary variables
C. Format the data

3A. Clean the data


Find & eliminate raw data errors such as:
Impossible or otherwise incorrect values for specific
variables
Cases in the data that met exclusion criteria and shouldnt
be in the study
Duplicate cases
Missing data and outliers (identify or replace)
Skip-pattern or logic breakdowns

3B. Create New Variables


Select and/or create the variables that will support the
decision
Dimensionality Reduction aggregate data as needed
to simplify the model. EX. Instead of daily quantities,
group together data from every month or quarter for
analysis.
This may require some preliminary statistical analysis. For
more than 300 points, can do mean or average; for
fewer, use median (half above & half below).
Other examples:
Creating change scores & indices from scales, combining too-

small-to-use categories of nominal variables, centering predictors.

3C. Format the Variables


Set all missing data codes so missing data are treated as

such( ie, NaN or M in some LP models)


Format date variables as dates, numerical variables as
numbers, etc.
Clearly label all variables and categorical values.

4. Prototype the model with the data


Run a limited model with a subset of the data
Try alternate ways of framing the decision
Finalize the model assumptions and the full data set

parameters.

5. Run Final Model with Complete Data


Run model
Do sensitivity analyses

6. Interpret Model for Decision Maker


Describe the results in terms that the decision maker

understands
1 picture = 1,000 words!
Start with Executive Summary (100-200 words)
Then review Who, What, Whenetc. and how the final
model and data supported the resulting descision.

Using Excel to Clean and Prepare Data


for Analysis
See pdf in Lecture 20 Folder, UH Blackboard.
RJ Weiss & RJ Townsend, Using Excel to Clean and Prepare Data
for Analysis. The Industrial-Organizational Psychologist, 42(3),
2005, 89-96.
Describes a phased approach to data preparation:
1. Create the data file.
2. Clean the data.
3. Process the data.
4. Create an analysis-ready copy of the data.
5. Document the data.

Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.

Group Project: December 3, 2015 - 15 %


Status Report 1 Due TODAY: October 29, 2015 4 pm *
* (Printed copy in class; pdf copies by email to instructor & TA:
mmcguire2@uh.edu | mmcguir2@central.uh.edu &
aida.khayatian@gmail.com)
Please identify the Group Manager in Status Reports. The

Manager is responsible to compile and submit the groups


status reports and results.

UH Grad School Research Day 10/30/15

Date: Friday, October 30th

Time: 10:45 a.m. 6:00 p.m.


Location: Student Center (SC) Ballroom, Theatre, and
Houston Room
RSVP at http://www.uh.edu/graduate-school/events/
research-day/

INDE6372 Advanced Linear Optimization

LECTURE 12A
NETWORK MODELS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

1
.

Outline
Basic introduction to network models/applications
Graph, nodes, arcs
Shortest path problem, maximum flow problem
Algorithms
Applications in production control and project

management

2
.

What is a Network?
In general, a network is a collection of items and the

relationships among those items.


The relationships may be 1-1, 1- many, or many-to-many.
The relationships may be 1-directional, multidirectional, or
non-directional.
The relationships may have a weight or probability
associated with them.
The items may have a weight or probability associated
with them.
Although networks are usually visualized as graphs in 2D,
they can be constructed in nD mathematically.
3
.

Networks are Everywhere


Physical Man made Networks
Road Networks
Railway Networks
Airline Traffic Networks
Electrical Networks, e.g., the power grid

4
.

Networks are Everywhere


Abstract Networks
organizational charts
precedence

relationships in
projects
social networks

www.bonkersworld.net/
organizational-charts/

Networks are Everywhere


Networks in Nature

6
.

Overview
Networks and graphs are powerful modeling tools
Most OR models have networks or graphs as a major

aspect of the data representation of items and their


relationships
Data representation influences how one thinks about how
to solve problems
EX. a row/column spreadsheet encourages thinking in 2D

Major purposes of data representation


efficiency in algorithms
ease of use

7
.

Network Analysis & LP


Several Major Basic Classes of Network Problems
How to recognize and formulate them? What are the features they
can be used to model? What are their limitations?
All can be formulated as an LP
Several important ad-hoc algorithms and their rationales will be
provided
Most efficient transportation of goods, information etc.

through a network
Transportation problem (already discussed)
Transshipment problem

8
.

Network Analysis & LP


1. Shortest path problems
2. Maximum flow problems
3. CPM-PERT project scheduling models
4. Minimum cost network flow problems
5. Minimum spanning tree problems

9
.

Network Analysis & LP


LP: What is the most efficient way to travel from one point

to another in a physical distance network? OR


LP: What is the optimal way to go from one point to
another in an abstract network? EX: a cost network
representing production, inventory, etc.?
Network Analysis: find the shortest path
Limitations: algorithm can sometimes breakdown when side

constraints are added, but can reformulate in LP

10
.

Basic Definitions
A graph or network is defined by two sets of symbols:
Nodes: A set of points or vertices (call it V) are called
nodes of a graph or network.
Nodes
1

Arcs: An arc consists of an ordered pair of vertices and

represents a possible direction of motion that may occur


between vertices.
Arc
1

11
.

Basic Definitions
Chain: A sequence of arcs such that every arc has exactly

one vertex in common with the previous arc is called a


chain.
Common vertex
between two arcs
1

12
.

Basic Definitions
Path: A path is a chain in which the terminal node of each

arc is identical to the initial node of next arc.


For example in the figure below (1,2)-(2,3)-(4,3) is a chain
but not a path; (1,2)-(2,3)-(3,4) is a chain and a path,
which represents a way to travel from node 1 to node 4.
1

13
.

Network Analysis:
Dijkstras Shortest Path Algorithm
In each iteration, the shortest path from the origin to one

of the rest of the nodes is found.


One new solved node is found in each iteration.
More than one such path and node may be found in one iteration

when there is a tie. There may also exist multiple shortest paths
from the origin to some nodes.

The algorithm stops when the shortest path to the

destination is found.
Assumption: all arc lengths > 0.

14
.

Dijkstras Shortest Path Algorithm


For EACH iteration
Let S be the current set of solved nodes (the set of nodes whose

shortest paths from the origin been found).


Let N be the set of all nodes, and N S be the set of unsolved
nodes.

15
.

Dijkstras Shortest Path Algorithm


1. Consider only the neighbors of S that can be

reachable via one direct link or arc.


2. For each of these neighboring nodes, find the shortest
path from the origin via only S and the corresponding
distance from the origin.
3. In general, there exist multiple such neighboring nodes.
Select the one with the shortest distance from the origin.
Call this new node solved node and add to S.
4. Repeat iteration over all nodes.

16
.

Dijkstras Shortest Path Algorithm Details


Goal of the nth iteration: Find the nth nearest node to the

origin.
Repeat for n = 1, 2, until the nth nearest node is the
destination.

17
.

Dijkstras Shortest Path Algorithm Details


Input for the nth Iteration:
(n 1) nearest nodes to the origin (solved for at the
previous iterations).
Their shortest path and distance from the origin.
These nodes plus the origin will be called solved nodes
S; the others are unsolved nodes.

18
.

Dijkstras Shortest Path Algorithm Details


Candidates for the nth nearest node:
Each solved node that is directly connected by a link to
one or more unsolved nodes provides one candidate.
Select the unsolved node with the shortest connecting
link.
Ties provide additional candidate nodes.

19
.

Dijkstras Shortest Path Algorithm Details


Calculation of nth nearest node:
For each solved node and its candidate, add the distance
between them and the distance of the shortest path from
the origin to this solved node.
The candidate with the smallest total distance is the nth
nearest node. Ties provide additional candidates.

20
.

EX. Road System for Seervada Park


Cars are not allowed into the park
There is a narrow winding road system for trams and for

jeeps driven by the park rangers


The road system is shown without curves in the next slide
Location O is the entrance into the park
Other letters designate the locations of the ranger stations
The scenic wonder is at location T
The numbers give the distance of these winding roads in miles

The park management wishes to determine which route

from the park entrance O to station T has the shortest


total distance for the operation of the trams.
21
.

EX. Road System for Seervada Park

7
A
5

D
2

4
1

3
4

E
4

C
22
.

EX. Road System for Seervada Park


Iteration Zero: Shortest distance from node O to Node O.

S = {O}.
Iteration 1:
Step 1: Neighboring Nodes = {A, B, C}
Step 2: Shortest path from O to neighboring nodes that traverse

through the current set of solved nodes S. Min {2,4,5} = 2


(corresponding to node A).
Step 3: The shortest path from O to A has been found with a
distance of 2. S = {O, A}

23
.

EX. Road System for Seervada Park

A
Solved Nodes
O

C
24
.

EX. Road System for Seervada Park


Iteration 2:
Step 1: Neighboring nodes = {B, C, D}
Step 2: Min (Min (2 + 2, 5), 4, (2 + 7)) = 4.
Step 3: Shortest path from B and C has been found. S = {O, A, B,
C}

7
A

Current Solved Nodes

(2)
(0)

2
B

C
O
4

25
.

EX. Road System for Seervada Park


Iteration 3:
Step 1: Neighboring nodes = {D, E}. Only AD, BD, BE, and CE
Step 2: Min(Min(2 + 7, 4+4), Min(4 + 3, 4+4)) = 7
Step 3: The shortest path to E has been found S = {O, A, B, C, E}

Current Solved
Nodes

A
(2)

B
O

(4)

E
(4)

26
.

EX. Road System for Seervada Park


Iteration 4
Step 1: Include (only) Nodes D and T. Include only arcs AD, BD,
ED, & ET
Step 2: Min((min(2+7, 4+4, 7+1), (7+7))) = 8
Step 3: Shortest path from node O to Node D has been found. S =
{O, A, B, C, D, E}
7
(2)
O
(4)

27

Current solved nodes


(4)

D
4
1

E
(7)

C
.

EX. Road System for Seervada Park


Iteration 5
Step 1: Include only node T and include arcs DT and ET
Step 2: Min(8+5, 7+7) = 13 (no other competing nodes)
Step 3: The shortest path from the origin to T, the destination, has
been found, with a distance of 13
A (2)
Current solved nodes

(8)
O

28

(0)

(4)

T
7

(4)

(7)
.

EX. Road System for Seervada Park


Final Solution
Incidentally, we have also found the nth nearest node from
the origin sequentially
(2)

(8)

D
4

O
(0)

B
4

T
1

(4)

(13)

E
(7)

29

(4)

EX. Road System for Seervada Park


n

Solved Nodes
Directly
Connected to
Unsolved Nodes

Closest
Connected
Unsolved
Node

Total
Distance
Involved

Nth
Nearest
Node

Minimum
Distance

Last
Connection

OA

2, 3

O
A

C
B

4
2+2=4

C
B

4
4

OC
AB

A
B
C

D
E
E

2+7=9
4+3=7
4+4=8

BE

A
B
E

D
D
D

2+7=9
4+4=8
7+1=8

D
D

8
8

BD
ED

D
E

T
T

8+5=13
7+7=14

13

DT

6
30

Dijkstras
Algorithm:
All
Shortest
Paths

To find the shortest path from a node to all other nodes, we
divide the problem into several stages, where in stage i, the
shortest path consists of only a path involves at most i arcs.
For example, consider the seervada park example. In stage 1,
we have a vector of shortest distance
[0

The red elements are permanent


31
.

Dijkstras Algorithm
The formula for distance in stage i+1
d(s,t, i+1)=minv [ d(s,v,i)+d(v,t)]
Stage 2: Shortest distance of paths with at most 2
arcs in the path
[0

Stage 3: paths with at most 3 arcs


[0

7 14 ]

32
.

Dijkstras Algorithm
The formula for distance in stage i+1
d(s,t, i+1)=minv [ d(s,v,i)+d(v,t)]
Final Stage 4: paths with at most 4 arcs
[0

7 13 ]

33
.

4 Use Dijkstras algorithm to find the shortest path


node 1 to node 4 in Figure 5. Why does Dijkstras algor
fail to obtain the correct answer?

Exercise: Dijkstras Algorithm


Find the
path4from node 1 to node 5.
F Ishortest
GURE

Network for Problem 2


2

1
8

12

2
5

4
6

418

5
10

CHAPTER

34
.

8 Network Models

4 Use Dijkstras algorithm to find the shortest path


node 1 to node 4 in Figure 5. Why does Dijkstras algor
fail to obtain the correct answer?

Exercise Answer: Dijkstras Algorithm


The shortest
F I Gpath
U R from
E 4node 1 to node 5:
125,Network
length 14.
for Problem 2
2

1
8

12

2
5

4
6

418

5
10

CHAPTER

35
.

8 Network Models

4 Use Dijkstras
algorithm
to find
the shortest
path from
Node
Temporary Label
(* denotes
next
assigned
permanent
node 1 to node 4 in Figure 5. Why does Dijkstras algorithm
label)
fail to obtain the correct answer?
3
min{7} = 7*
5
min{14,6+10} = 14
Now labels are [0* 2* 7* 6* 14]. Since there is no node
joining the newest permanently
F I G U R E 4 labelled node (node 3) to node
5, we may give make node 5 a permanent label. We obtain [0*
Network for Problem 2
2* 7* 6* 14*]. Since c25 = 14 - 2 and c12 = 2 - 0 we find the
shortest path from node 1 to
14).
2 5 to be 1-2-5(length
12

2
1

Exercise as Transshipment Problem


1

418

Node 1
Node 2
Node 3
Node 4

10

3.

8 Network Models
Node 5
Supply
M
1

CHAPTER

Node 2
2

Node 3
8

Node 4

12

10

Demand
36
.

4. We begin by giving node 1 a permanent label [0* 2 1 !].


Next node 3 obtains a permanent label: [0* 2 1*!]. Node 4 now

5 Suppo
annual op
shown in
determine
of owning

Network Analysis:
Maximum Flow Problem
Description
All flow through a directed and connected network originates
at one node (source) and terminates at one another node
(sink).
All the remaining nodes are transshipment nodes.
Flow through an arc is allowed only in the direction indicated
by the arrowhead
The maximum flow = the capacity of that arc.
At the source, all arcs point away from the node.
At the sink, all arcs point into the node

Objective: maximize the total amount of flow from the

source to the sink

(measured as the amount leaving the source or the amount

entering the sink)

37
.

Maximum Flow Problem


Typical applications:
Maximize the flow through a companys distribution network from

its factories to its customers


Maximize the flow through a companys supply network from its
vendors to its factories
Maximize the flow of oil through a system of pipelines
Maximize the flow of water through a system of aqueducts
Maximize the flow of vehicles through a transportation network

38
.

Maximum Flow Algorithm


Some Terminology
The residual network shows the remaining arc capacities for
assigning additional flows after some flows have been assigned to
the arcs
The residual capacity for assigning some flow from node B to node O

The residual capacity for flow from node O to Node B


39
.

Maximum Flow Algorithm


An augmenting path is a directed path from the source to the sink

in the residual network such that every arc on this path has strictly
positive residual capacity
The residual capacity of the augmenting path is the minimum of
these residual capacities (the amount of flow that can feasibly be
added to the entire path)

Basic idea
Repeatedly select some augmenting path and add a flow equal to
its residual capacity to that path in the original network.
This process continues until there are no more augmenting paths,
so that the flow from the source to the sink cannot be increased
further

40
.

Maximum Flow Algorithm


The Augmenting Path Algorithm
Assume that the arc capacities are either integers or rational

numbers (numbers that can be written as fractions a/b)

1. identify an augmenting path by finding some directed

path from the source to the sink in the residual network


such that every arc on this path has strictly positive
residual capacity. If no such path exists, the net flows
already assigned constitute an optimal flow pattern.
2. Identify the residual capacity c* of this augmenting
path by finding the minimum of the residual capacities of
the arcs on this path. Increase the flow in this path by c*
41
.

EX. Maximum Flow for Seervada Park


During the peak season the park management of the Seervada

park would like to determine how to route the various tram trips
from the park entrance (Station O) to the scenic (Station T) to
maximize the number of trips per day.
Each tram will return by the same route it took on the outgoing
trip so the analysis focuses on outgoing trips only.
To avoid unduly disturbing the ecology and wildlife of the
region, strict upper limits have been imposed on the number of
outgoing trips allowed per day in the outbound direction on
each individual road.
For each road the direction of travel for outgoing trips is
indicated by an arrow in the next slide.
The number at the base of the arrow gives the upper limit on
the number of outgoing trips allowed per day.
42
.

EX. Maximum Flow for Seervada Park


Consider the problem of sending as many units from node O to
node T for the following network (current flow, capacity):
(0,3)
A
(0,9)

(0,5)

(0,1)
(0,4)

T
(0,1)

(0,7)

(0,6)

B
(0,5)

(0,4)

(0,2)
(0,4)
C

43
.

EX. Maximum Flow for Seervada Park


Iteration 1: Select the augmenting path OBET, with
residual capacity of min{7, 5, 6} = 5. Assign a flow of 5.
(0,3)
A
(0,9)

(0,5)

(0,1)
(0,4)

T
(0,1)

(5,7)

(5,6)

B
(5,5)

(0,4)

(0,2)
(0,4)

44

C
.

EX. Maximum Flow for Seervada Park


Iteration 2: Assign a flow of 3 to the augmenting path

OADT. The resulting residual network is


(3,3)

(3,9)

(3,5)

(0,1)
(0,4)

T
(0,1)

(5,7)

(5,6)

B
(5,5)

(0,4)

(0,2)
(0,4)

45

C
.

EX. Maximum Flow for Seervada Park


Iteration 3: Assign a flow of 1 to the augmenting path

OABDT. The resulting residual network is


(3,3)
A
(4,9)

(4,5)

(1,1)
(1,4)

T
(0,1)

(5,7)

(5,6)

B
(5,5)

(0,4)

(0,2)
(0,4)

46

C
.

EX. Maximum Flow for Seervada Park


Iteration 4: Assign a flow of 2 to the augmenting path

OBDT. The resulting residual network is


(3,3)
A
(6,9)

(4,5)

(1,1)
(3,4)

T
(0,1)

(7,7)

(5,6)

B
(5,5)

(0,4)

(0,2)
(0,4)

47

C
.

EX. Maximum Flow for Seervada Park


Iteration 5: Assign a flow of 1 to the augmenting path

OCEDT. The resulting residual network is


(3,3)

(7,9)

(4,5)

(1,1)
(3,4)

T
(1,1)

(7,7)

(5,6)

B
(5,5)

(1,4)

(0,2)
(1,4)

48

C
.

EX. Maximum Flow for Seervada Park


Iteration 6: Assign a flow of 1 to the augmenting path

OCET. The resulting residual network is


(3,3)
A
(7,9)

(4,5)

(1,1)
(3,4)

T
(1,1)

(7,7)

(6,6)

B
(5,5)

(2,4)

(0,2)
(2,4)

49

C
.

EX. Maximum Flow for Seervada Park


There are no more flow augmenting paths, so the current

flow pattern is optimal.


3

A
1

13
O

D
3

1
6

7
5

2
2

C
50
.

13

Network Analysis & LP to be continued


1. Shortest path problems
2. Maximum flow problems
3. CPM-PERT project scheduling models
4. Minimum cost network flow problems
5. Minimum spanning tree problems

51
.

Assignment #2: Transshipment


2.1 Solve Exercise 1, using the balanced transportation

tableau from the previous slide.


2.2 Redo Exercise 1. Assume that before being shipped to Los
Angeles or New York, all oil produced at the wells must be
refined at either Galveston or Mobile. To refine 1,000 barrels of
oil costs $12 at Mobile and $10 at Galveston. Assuming that
both Mobile and Galveston have infinite refinery capacity,
formulate AND SOLVE a transshipment and balanced
transportation model to minimize the daily cost of transporting
and refining the oil requirements of Los Angeles and New York.
Assignment #2 Due Thursday November 5, 2015 4 pm *
* (Printed copy in class; pdf copies by email to instructor & TA:

mmcguire2@uh.edu | mmcguir2@central.uh.edu &


aida.khayatian@gmail.com)
You may work solo or in pairs. Remember academic honesty!
52
.

INDE6372 Advanced Linear Optimization

LECTURE 12B
NETWORK MODELS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston

1
.

Network Analysis & LP continued


1. Shortest path problems
2. Maximum flow problems
3. CPM-PERT project scheduling models
4. Minimum cost network flow problems
5. Minimum spanning tree problems

2
.

Network
Flows: Theory
Networks

Basic elements:
N
A
3

Nodes (let m denote number of them).


Directed Arcs

subset of all possible arcs: {(i, j) : i, j N , i = j}.


arcs are directed: (i, j) = (j, i).

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Network
Flow
Network Flow
DataData

bi, i N , supply at node i

cij , (i, j) A, cost of shipping 1 unit along arc (i, j).


Note: demands are recorded as negative supplies.
4

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Network Flow Problem

Network Flow Model


Decision Variables:
xij , (i, j) A,

quantity to ship along arc (i, j).

Objective:
minimize

cij xij

(i,j)A

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Network Flow ProblemCont.

Network Flow Model


Constraints:

Mass conservation (aka flow balance):


inflow(k) outflow(k) = demand(k) = supply(k),

xik
xkj
=
bk ,
kN
i:
(i, k) A

j:
(k, j) A

Nonnegativity:
6

kN

xij 0,

(i, j) A

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Network
Flow Model: Matrix Notation
Matrix Notation
minimize cT x
subject to Ax = b
x 0

where
cT =

1 1
1

A =

11

1
1
1 1

15

16

Notes

1
1
1 1

1
1 1 1

18

1 1 1

0
19

16

33
b=

0
36

A is called node-arc incidence matrix.


A is large and sparse.

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Dual Problem

Network Flow Model: Dual Problem


maximize bT y
subject to AT y + z = c
z0

In network notation:

maximize iN biyi
subject to yj yi + zij = cij
zij 0
8

(i, j) A
(i, j) A

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Complementarity Relations

Network Flow Model: Complementarity


The primal variables must be nonnegative.

Therefore the associated dual constraints are inequalities.

The dual slack variables are complementary to the primal variables:


xij zij = 0,

(i, j) A

The primal constraints are equalities.

Therefore they have no slack variables.

The corresponding dual variables, the yis, are free variables.


No complementarity conditions apply to them.
9

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Definition: Subnetwork

Network Definitions

Network

10

Subnetwork

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Connected vs. Disconnected

Network Definitions

Connected

11

Disconnected

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Cyclic vs. Acyclic

Network Definitions

Cyclic

12

Acyclic

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Trees

Network Definitions

Tree = Connected + Acyclic

13

Not Trees

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

anning Trees

Network Definitions

Spanning TreeA tree touching every node

e Solution
14

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

xij = 0

for (i, j) Tree Arcs

Spanning Trees

Network Definitions

Spanning TreeA tree touching every node

Tree Solution
xij = 0

for (i, j) Tree Arcs

Note: Tree solutions are easy to computestart at the leaves and work inward...
15

R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.

Maximum Flow Network Model


Each arc has a capacity that limits the quantity of a

product that may be shipped through the arc.


Objective: transport the maximum amount of flow from a
starting point (source) to a terminal point (sink).

16
.

Max-Flow Min-Cut Theorem


In a flow network, the maximum amount of flow passing

from the source to the sink is equal to the minimum


capacity that, when removed in a specific way from the
network, causes the situation that no flow can pass from
the source to the sink.
It is a special case of the duality theorem for linear
programs and can be used to derive Menger's theorem
and the KnigEgervry theorem.

17
.

Max-Flow Min-Cut Theorem


A cut is defined as any set of directed arcs containing at

least one arc from every directed path from the source to
the sink.
For any particular cut, the cut value is the sum of the arc
capacities of the arcs of the cut.
The theorem states that, for any network with a single
source and sink, the maximum feasible flow from the
source to the sink equals the minimum cut value for all
cuts of the network.

18
.

Maximum Flow Problem: Sunco


Sunco Oil wants to ship the maximum possible amount of
oil (per hour) via pipeline from node so to node si as shown
in the figure below.
Arc
Capacity
a0
(1)3

so

(2)2

(1)3

(1)4

(2)2

(1)1

si

(so,1)

(so,2)

(1,2)

(1,3)

(3,si)

(2,si)

The arcs represent pipelines of different diameters.


(xij) bij = (possible flow in arcij) maximum flow in arcij
19
.

Maximum Flow Problem: Sunco


Sunco Oil wants to ship the maximum possible amount of
oil (per hour) via pipeline from node so to node si as shown
in the figure below.
Arc
Capacity
a0
(1)3

so

(2)2

(1)3

(1)4

(2)2

si

(1)1

Node so is the source node


Node si is called the sink node
20
.

(so,1)

(so,2)

(1,2)

(1,3)

(3,si)

(2,si)

Maximum Flow Problem: Sunco


Sunco Oil wants to ship the maximum possible amount of
oil (per hour) via pipeline from node so to node si as shown
in the figure below.
Arc
Capacity
a0
(1)3

so

(2)2

(1)3

(1)4

(2)2

si

(1)1

Node so is the source node


Node si is called the sink node
ADD artificial arc a0 from source to sink
21
.

(so,1)

(so,2)

(1,2)

(1,3)

(3,si)

(2,si)

Max-Flow Min-Cut Theorem Example


This network has a value of flow of 7.
The vertex in white and the vertices in grey form the subsets S

and T of an s-t cut, whose cut-set contains the dashed edges.


Since the capacity of the s-t cut is 7, which equals to the value
of flow, the max-flow min-cut theorem tells us that the value of
flow and the capacity of the s-t cut are both optimal in this
network.

22
.

Maximum Flow Problem: Sunco


Objective:
Maximize X0 = total amount of oil entering the sink
Subject to constraints:
1. 0 flow through each arc arc capacity
2. Flow into node i = Flow out of node i (conservation-offlow constraint)

23
.

Maximum Flow Problem: Sunco


Let Xij = Millions of barrels of oil per hour that will pass
through arc(i,j) of pipeline.
For a flow to be feasible:
1. 0 flow through each arc arc capacity
2. Flow into node i = Flow out of node i (conservation-offlow constraint)
Assumption: No flow loss
artificial arc a0 satisfies the conservation-of-flow
constraint for the source & sink
Let X0 = total amount of oil entering the sink
24
.

s.t.

xso,1 ! 2
xso,2 ! 3
x12 ! 3

(Arc capacity constraints)

x ! 2 Flow Problem: Sunco


Maximum
2,si

x13 ! 4

x3,si !
x0 "
xso,1 "
xso,2 # x12 "
x13 # x12 "
x3,si # x2,si "
xij $

1
xso,1 # xso,2
x12 # x13
x2,si
x3,si
x0
0

(Node
(Node
(Node
(Node
(Node

so flow constraint)
1 flow constraint)
2 flow constraint)
3 flow constraint)
si flow constraint)

optimal solution to this LP is z " 3, xso,1 " 2, x13 " 1, x12 " 1, xso,2 " 1, x3,si "
i " 2, x0 " 3. Thus, the maximum possible flow of oil from node so to si is 3 milarrels per hour, with 1 million barrels each sent via the following paths: so12si,
3si, and so2si.
25
.

continued

Maximum Flow Problem: Sunco


One optimal solution:
z=3, xso,1 =2, x13 =1, x12 =1, xso,2 =1, x3,si = 1, x2,si =2, x0 =
3.
Max flow is 3 million barrels per hour
1 million barrels on each of 3 paths: so12si, so13
si, and so2si.
a0
(1)3

so

(2)2

(1)3

(1)4

26
.

2
3

(2)2

(1)1

si

We assume that no oil gets lost while being pumped through the network, so at each
node, a feasible flow must satify (2), the conservation-of-flow constraint. The introduction
of the artificial arc a0 allows us to write the conservation-of-flow constraint for the source
and sink.
If we let x0 be the flow through the artificial arc, then conservation of flow implies that
x0 " total amount of oil entering the sink. Thus, Suncos goal is to maximize x0 subject
to (1) and (2):

Maximum Flow Problem: Sunco

max z " x0
s.t.

xso,1 ! 2

(Arc capacity constraints)

xso,2 ! 3
x12 ! 3
x2,si ! 2
x13 ! 4
x3,si ! 1

27

x0 "
xso,1 "
xso,2 # x12 "
x13 # x12 "
x3,si # x2,si "

xso,1 # xso,2
x12 # x13
x2,si
x3,si
.
x0

(Node
(Node
(Node
(Node
(Node

so flow constraint)
1 flow constraint)
2 flow constraint)
3 flow constraint)
continued
si flow constraint)

Exercise: Maximum Flow Problem


The Hatfields, Montagues, McCoys, and Capulets are

going on their annual family picnic.


Four cars are available to transport the families to the
picnic.
The cars can carry the following number of people: car 1,
four; car 2, three; car 3, three; and car 4, four.
There are four people in each family, and no car can carry
more than two people from any one family.
Draw the maximum-flow network graph that shows the
problem of transporting the maximum possible number of
people to the picnic.
28
.

Exercise Answer: Maximum Flow


Problem
8.

29

See figure.

9. Step
4
units
flow alon
1-3-si
Step
2
units
flow alon
2-4-si
Step

1 unit of flow along so-2-4-3-si


.
Step 4-Add 1 unit along so-2-1-3-si
Cannot label si. Maximum flow = 8 Arcs in cut are

Network Analysis & LP continued


1. Shortest path problems
2. Maximum flow problems
3. CPM-PERT project scheduling models
4. Minimum cost network flow problems
5. Minimum spanning tree problems

30
.

CPM/PERT
CPM: Critical Path Method
Used to determine length of time of a project
Based on known duration of time of each activity
Used to determine slack in project activities
PERT: Project Evaluation and Review Technique
Used to estimate the probability that a project will be completed by
a specific deadline
Used when duration of time of each activity is uncertain
Used in project management
See http://www.pmi.org for PMP certification & PMBOK Guide
(global standard)
31
.

CPM/PERT

PERT chart for a project with five milestones (10 through 50) and
six activities (A through F).
The project has two critical paths: activities B and C, or A, D, and F
giving a minimum project time of 7 months with fast tracking.
Activity E is sub-critical, and has a float of 1 month.
32
.

Wikipedia.org

CPM/PERT: Gantt Chart

33

http://www.vertex42.com/ExcelTemplates/excel-gantt-chart.html
.

CPM/PERT: Applications
Scheduling construction projects such as office buildings,

highways and swimming pools


Developing countdown and hold procedure for the
launching of space crafts
Installing new computer systems
Designing and marketing new products
Completing corporate mergers
Building ships
ALL ARE PROJECTS, with a beginning and an end,
based on specified termination criteria.
34
.

CPM/PERT: Project Planning, Scheduling


and Control
Planning: organized approach to accomplish the goal of

minimizing elapsed time of project


defines objectives and tasks; represents tasks interactions on a

network; estimates time and resources

Scheduling: a time-phased commitment of resources


identifies critical tasks which, if delayed, will delay the projects
completion time.
Control: means of monitoring and revising the progress of

a project

35
.

CPM: Network Representation


Tasks (or activities) are represented by directed arcs
Each task has a duration denoted by tj
Node 0 represents the start and node n denotes the finish of the
project
Precedence relations are shown by arcs
specify what other tasks must be completed before the task in
question can begin.
A path is a sequence of linked tasks going from beginning

to end
Critical path is the longest path

36
.

CPM: Basic technique


First, construct a project model with:
A list of all activities required to complete the project
(typically categorized within a work breakdown structure
or WBS)

The time (duration) that each activity will take to


complete

The dependencies between the activities and,

Logical end points such as milestones or deliverable


items.

continued

37
.

CPM: Basic technique


Then, use CPM to calculate the longest path of planned
activities to logical end points or to the end of the project,
and the earliest and latest that each activity can start and
finish without making the project longer.

continued

38
.

CPM: Basic technique

This process determines which activities are "critical" (i.e.,


on the longest path) and which have "total float" (i.e., can
be delayed without making the project longer).

continued

39
.

CPM: Basic technique

In project management, a critical path is the sequence of


project network activities which add up to the longest
overall duration, regardless if that longest duration has float
or not. This determines the shortest time possible to
complete the project. There can be 'total float or
slack (unused time) within the critical path.
40
.

CPM: Project Network


For each activity there is a set of activities (called the

predecessors of the activity) that must be completed


before the activity begins.
A project network is used to represent the precedence
relationships between activities.
Activities are represented by directed arcs
Nodes represent events: completion of a set of activities
(Activity on arc (AOA) type of network).
1
41

Activity A must be completed before activity B starts


.

CPM: Project Network Rules


Node 1 represents the start of the project. An arc should

lead from node 1 to represent each activity that has no


predecessors.
Include a finish node representing project completion.
Number the nodes in order:
Beginning of activity node number < completion of activity node

number.

An activity is represented by at most one arc


Two nodes can be connected by at most one arc.
To avoid violating the above 2 rules, use a dummy

activity that takes zero time.


42
.

CPM: Formulating the Problem


Input Data:
Precedence relationships and durations
Decision Variable:
ESi: Earliest starting times for each of the tasks, ti
Objective:
Minimize the elapsed time of the project
where node n is the last node in the graph

43
.

CPM: Constraints
If tj is the earliest starting time of a task, ESi is the earliest
starting time of an immediate predecessor and ti is the
duration of the immediate predecessor, then
ESj = ESi + ti for every arc (i, j)

44
.

CPM: Critical Path Definitions


Earliest Start Time (ES) is the earliest time a task can

feasibly start
Earliest Finish Time (EF) is the earliest time a task can
feasibly end
Latest Start Time (LS) is the latest time a task can feasibly
start, without delaying the project at all.
Latest Finish Time (LF) is the latest time a task can
feasibly end, without delaying the project at all

45
.

CPM: Critical Path Method


Forward Pass: used to find ES & EF
Go through the jobs in order
Start each job at the earliest time while satisfying the

precedence constraints
Find the earliest start and finish times
EFi = ESi + ti
Earliest start time for an activity leaving a particular node
is equal to the maximum of the earliest finish times for all
activities entering the node.
46
.

CPM: Critical Path Method


Backward Pass: used to find LS & LF
Set the finish time
Look at tasks in reverse order
Lay out tasks one at a time on a Gantt chart starting at the

finish and working backwards to the start


Start the task at its latest starting time
LSi = LFi - ti
Latest finish time for an activity entering a particular
node is equal to the minimum of the latest start times for
all activities leaving the node.
47
.

CPM: Critical Path


Theorem: The minimum project duration is the length of

the longest path in the schedule. The longest path is


called the critical path.
Look for tasks whose earliest start time and latest start
time are the same. These tasks are critical, and are on a
critical path.

48
.

CPM: Critical Path


Critical paths are found by identifying those tasks where

ES=LS (equivalently, EF=LF)


No flexibility in scheduling tasks on the critical path
The total length (makespan) of the critical path schedule
equals the LF of the final task
Slack is the difference between LS and ES, or LF and EF.
An activity with a slack of zero is on the critical path

49
.

CPM: Widgetco
Widgetco is about to introduce a new product. Below find

the data for CPM.


Activity
Predecessors
A:train workers
B:purchase raw materials
C:produce product 1
A, B
D:produce product 2
A, B
E:test product 2
D
F:assemble products 1&2
C, E
50
.

Duration(days)
6
9
8
7
10
12

CPM: Widgetco Project Diagram


C8

F 12

3
A6

5
D7

Dummy

1
B9

E 10

Node 1 = starting node


Node 6 = finish node
51
.

CPM: Widgetco Forward Pass (ES,EF)

(0,6)

(9,17)
C8

(26,38)
F 12

A6

5
D7

Dummy

1
B9

E 10
(9,16)

(0,9)
Node 1 = starting node
Node 6 = finish node
52
.

(16,26)

CPM: Widgetco Backward Pass (LS,LF)

(3,9)

(18,26)
C8

(26,38)
F 12

A6

5
D7

Dummy

1
B9

E 10
(9,16)

(0,9)
Node 1 = starting node
Node 6 = finish node
53
.

(16,26)

CPM: Widgetco Starts


Compute Slacks:

Activity

ES(i)

LS(i)

Activity A: 3

Activity D: 0

18

Activity C: 9

16

16

26

26

Activity B: 0

Activity E: 0
Activity F: 0

54
.

CPM: Widgetco Critical Path


An activity with a slack of zero is a critical activity
A path from node 1 to the finish node that consists

entirely of critical activities is called a critical path


Widgetco critical path: B-D-E-F, with a Makespan = 38

55
.

LP: Widgetco Critical Path


Decision variable:
Xj: the time that the event corresponding to node j occurs
Since our goal is to minimize the time required to

complete the project, we use an objective function of:


Z=XF-X1
Note that for each activity (i,j), i must occur before j occurs

& activity (i,j) must be completed.


56
.

LP: Widgetco Critical Path


Min Z =X6-X1
S.T. X3 X1+6
X2 X1+9
X5 X3+8
X4 X3+7
X5 X4+10
X6 X5+12
X3 X2

57

(Arc (1,3) constraint)


(Arc (1,2) constraint)
(Arc (3,5) constraint)
(Arc (3,4) constraint)
(Arc (4,5) constraint)
(Arc (5,6) constraint)
(Arc (2,3) constraint)

The optimal solution to this LP is Z=38, X1=0, X2=9, X3=9,


X4=16, X5=26, X6=38
.

Readings on Network Models


Chapter 8, Operations Research: Applications and

Algorithms (4th edition). W.L. Winston. Duxbury Press,


2003. ISBN 978-0534380588.
(optional) R. J. Vanderbei (2008) Linear Programming:
Foundations and Extensions, 3rd Ed., Kluwer. ISBN:
978-0-387-74387-5.
(optional) Bazaraa, Jarvis, and Sherali (1990) Linear
Programming and Network Flows, Wiley.

58
.

Вам также может понравиться