Академический Документы
Профессиональный Документы
Культура Документы
INDE6372: LECTURE 8
DEGENERACY IN SIMPLEX
& LECTURE 9: CONVEXITY IN LO
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston
Degeneracy
Definition: An LP is degenerate if it has at least one
a tie.
When this happens, one of the tied basic variables will
have the value of 0 in the next iteration.
Degeneracy
Definition: An LP is degenerate if it has at least one
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
Example
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
Example
Degeneracy Example
x1
0
0
1
x2
-7
1
-1
x3
0
0.5
0
x4
5
-0.5
1
0
3
0
Example
Example
Degeneracy Example
Perform
Perform the
the pivot
pivot
Basic
Basic Var.
Var.
ZZ
xx33
xx1
1
Final tableau
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!
A Cycling Example
A Cycling Example
Cycling
Example
Adapted from the textbook, Page 31.
max
(5)
(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
x6 x7
x6 x7
0 0 0
0 0 0
0 0 0
20 00 0 0
02 10 1 0
Cycling Example
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
Cycling Example
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
10
Cycling Example
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
11
Cycling Example
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
12
Cycling Example
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
13
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
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.
Blands Rule
15
Blands Rule
BlandsBlands
Rule
Rules (1977)
16
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.
INDE6372
Arevisit
revisitto
to the
the cycling
cycling example
example
17
Cycling
Example
with
Blands
Rules
xx74 0.5
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
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
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!
19
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.
Introduction:
I
Mathematical
Notation
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
20
Convexity
A linear function is convex.
In LP, all functions are convex.
LP is a convex problem.
Convex
Non-Convex
21
k xk
i, i 0 R
22
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
bination
of istwo
Rset?itself.
subset
also points
contained in
in the
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.
+ = 1, , 0.
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|
Example Set
Convex
Convex Set
Nonconvex Set
25
26
+ = 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 .
27
28
29
linear combinations.
An affine transformation is a function that preserves all
affine combinations.
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
31
32
Theorem
Convex
Hull
Example: the straight line aT x = b is ane.
An ane set is convex.
Convex Hull
Convex Hull
33
34
Convex Set
Si = {x : fi (x) 0};
[0; 1]:
35
form as
where we express the feasible set as the intersection of
an affine subspace
with
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
37
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
38
Halfspace in R3
39
Global
Example
40
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
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
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
43
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 .
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.
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.
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
bT y
AT y = 0
y 0.
46
47
48
Separation Theorem
A polyhedron is the intersection of a finite number of halfspaces
{x n : Ax b, A mn }
Theorem
Proof
of the separation
theorem
Separation
Theorem
49
Proof
Let
P = {x n : Ax b, A mn },
b,
A kn }.
P = {x n : Ax
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.
Continued
50
H = {x : y T Ax bT y}
51
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
52
Strict Complementarity
cT x
Ax = b, x 0,
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
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 .
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
ample
54
min
x1 + 2x2
x1 + x2 2;
2x1 x2 1;
x1 , x2 0.
ample
55
min
x1 + 2x2
x1 + x2 2;
2x1 x2 1;
x1 , x2 0.
Example
56
x1 + 2x2
x1 + x2 2;
x1 , x2 , x3 , x4 0.
57
58
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 LP
TA B L E
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
Objective Function:
Minimize the total cost of shipping from plants to
cities.
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
Powerco Constraints
Supply Constraints: each supply point has a
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
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.
(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
364
TA B L E
c11
A Transportation Tableau
c12
Supply
c1n
s1
c21
c22
c2n
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
30
40
Basic
variables
s
i =1
j =n
j =1
To
From
Warehouse 1
Warehouse 2
Customer 1
Customer 2
Customer 3
$15
$10
$35
$50
$25
$40
Exercise 1, answer.
Supply
Demand
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
12
ij
Let
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
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
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.
2.
3.
Vogels Method
Demand
Supply
2
6
2
Demand
Supply
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
2
3
Demand
X
2
Supply
Exercise 2
Use the Northwest Corner Method to find a BFS for
Exercise 1.
Supply
Demand
Exercise 2, answer.
Supply
Demand
costs.
Goal: get optimal solution in fewer pivots than
Northwest Corner method.
12
10
15
8
3
12
15
8
3
10
15
8
3
15
8
3
5
X
10
8
3
4
X
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
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
80
78
5
15
Demand
Column Penalty
15
15-6=9
78-8=70
Supply
Row Penalty
8-6=2
15
78-15=63
7
5
15
Demand
Column Penalty
80
78
15
15-6=9
Supply
Row Penalty
15
6
0
7
5
8
5
15
80
78
Demand
15
Column Penalty
Supply
Row Penalty
15
6
0
7
5
8
5
15
80
78
15
Demand
Column Penalty
Supply
Row Penalty
Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.
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
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
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
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
364
cm1
cm2
cmn
sm
d1
d2
dn
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
30
40
Basic Variables
Basic Variables
What if x14 enters the basis?
+20
ENTER
-20
+20
-20
LEAVE
+20
-20
10+20
45
0+20
20
20
20-20
(nonbasic)
35
50
10+20
30-20
30
30
40
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
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
Exercise
1,
answer.
SECTION 7.3
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.
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.
(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.
10
35
35
9
10
12
20
13
50
20
14
16
10
45
20
5
30
30
40
30
(5)
- 8 = v 1- 8 = 0
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
-9 = u2+v1-9=0
-12 = u2+v2-12=0
-13 = u2+v3-13=0
0
1
0
0
1
0
0
1
0
0
1
0
-16 = u3+v3-16=0
-5 = u3+v4-5=0
13 = 0+12 10 = 2
24 = 1+1 7 = -5
32 = 4+11 9 = 6
(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.
10
35
35
9
10
12
20
7
50
20
14
9
ENTER
45
13
20
16
10
5
30
30
40
30
(5)
10
35
20
ENTER
45
20
20
50
10
30
30
30
40
EVEN ODD
35
ODD
10
20
ENTER
45
20
20
10
50
30
40
ODD
30
30
EVEN ODD
MIN (ODD) = 10
PIVOT
13
TA B L E
35
Loop Involving
Entering Variable x32
13
10
35
35
14
9
The resulting
bfs will
be:
12
10
13
20
50
20
16
10
30
40
X34=30
TA B L E
36
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
40
30
Final Solution
Based on the reduced cost obtained in the previous slide,
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
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
(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
(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
(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,
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.
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
364
TA B L E
c11
A Transportation Tableau
c12
Supply
c1n
s1
c21
c22
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
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 .
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
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
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
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
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
cmn
11 = u1 + v1 c11 = 0 + 6 (8 + )= -2 - sm
d1
d2
Constraint
(-2 - )
0; -2
dn
Demand
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
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
For whatc range of
values of thec cost of shipping 1
m1
m2
mn
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
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
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
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 $ !
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
13
10
45
Supply
25
45
Plant 3
City 4
10
12
14
City 3
30
40
Basic
variables
9
Plant 2
12
45
7
50
5
14
Plant 3
13
9
10
16
5
30
40
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.
364
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
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
unit, then
New cost=1020+1(0)+1(6)=$1026
364
TA B L E
c11
A Transportation Tableau
c12
Supply
c1n
s1
c21
c22
c2n
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
30
40
Basic
variables
40
New
solution
vj !
City 1
City 2
City 3
City 4
10
8
uui =
! 00
6
12
33
45
TA B L E
41
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
Nonbasiccm1
variable:cm2X11
cmn
sm
S1 S1 + 1
1
D1 D1d+
1
d2
dn
Demand
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
30
40
Basic
variables
364
TA B L E
c11
A Transportation Tableau
c12
Supply
c1n
s1
c21
c22
c2n
cmn
sm
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
30
40
Basic
variables
TA B L E
40
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
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
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
le.
ch the
ch the
he new
he new
medical
to the
e given
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
65
80
10
10
15
10
10
25
10
10
20
20
10
10
Exercise: Sensitivity
Analysis
Answer
55
65
80
0
10
10
20
65
10
80
0
10
15
10
10
0
10
25
10
10
20
20
10
10
65
80
10
0
10 Answer
20
Exercise: Sensitivity
Analysis
10
15
25
0
10
10
20
65
80
!
10
10-!
15
10
10+!
10
25
20
0
10
20
10
10-!
65
80
65
80
0
10-!
20
10
15
25
0
Exercise:
Sensitivity
Analysis
Answer
10
10
20
10
10+!
10
10-!
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
on the job.
Minimize the total setup time.
Time (Hours)
Job1
Job2
Job3
Job4
Machine 1
14
Machine 2
12
Machine 3
Machine 4
10
demands of job j
demands of job j
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
14
12
10
10
10
# lines = 3 < 4, so
continue.
2. Draw lines to
cover all the zeroes.
10
2. Draw lines to
cover all the zeroes.
Smallest, uncovered
nonzero element
k=1
5=4+1
49
10
Machine i
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
49
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
49
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
49
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
49
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
49
10
X12 = 1
0
X24 = 1
Machine i
X41 = 1
0
X33 = 1
4
5
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!
1
2
3
4
5
22
18
26
16
21
18
20
22
30
27
28
25
18
22
28
14
28
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
Job
1
1
6
2
0
3
5
4
4
5
0
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
Job
1
1
6
2
0
3
5
4
4
5
0
5
Column Min
16
18
25
14
Person
1
6
2
0
3
5
4
4
5
0
10
14
4
20
14
Person
12
12
20
5
14
Person
12
12
20
5
14
Person
X210= 1
12
X350= 1
X530= 1
0= 1
X44
12
21
35
44
53
Transshipment Problem
Transportation Problem setup: ONLY DIRECT
Transshipment: Widgetco
Step 2
FIGURE
Memphis
New York
Los
Angeles
Denver
Chicago
Boston
A Transshipment
Problem
7. 6 Transshipment Problems
401
Transshipment: Widgetco
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
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
17
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
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
Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.
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
Transshipment: Widgetco
Step 2
FIGURE
Memphis
New York
Los
Angeles
Denver
Chicago
Boston
A Transshipment
Problem
7. 6 Transshipment Problems
401
Transshipment: Widgetco
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
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
17
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
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
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
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.
L.A.
28
25
17
16
15
0
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
whom?
HOW will data be supplied/stored/processed
(spreadsheet, database, pdf) INPUT & OUTPUT
HOW MUCH? Data, budget,
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.
parameters.
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.
Readings
Chapter 7 in Text:
Operations Research: Applications and Algorithms (4th
edition). W.L. Winston. Duxbury Press, 2003. ISBN
978-0534380588.
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
4
.
relationships in
projects
social networks
www.bonkersworld.net/
organizational-charts/
6
.
Overview
Networks and graphs are powerful modeling tools
Most OR models have networks or graphs as a major
7
.
through a network
Transportation problem (already discussed)
Transshipment problem
8
.
9
.
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
11
.
Basic Definitions
Chain: A sequence of arcs such that every arc has exactly
12
.
Basic Definitions
Path: A path is a chain in which the terminal node of each
13
.
Network Analysis:
Dijkstras Shortest Path Algorithm
In each iteration, the shortest path from the origin to one
when there is a tie. There may also exist multiple shortest paths
from the origin to some nodes.
destination is found.
Assumption: all arc lengths > 0.
14
.
15
.
16
.
origin.
Repeat for n = 1, 2, until the nth nearest node is the
destination.
17
.
18
.
19
.
20
.
7
A
5
D
2
4
1
3
4
E
4
C
22
.
S = {O}.
Iteration 1:
Step 1: Neighboring Nodes = {A, B, C}
Step 2: Shortest path from O to neighboring nodes that traverse
23
.
A
Solved Nodes
O
C
24
.
7
A
(2)
(0)
2
B
C
O
4
25
.
Current Solved
Nodes
A
(2)
B
O
(4)
E
(4)
26
.
27
D
4
1
E
(7)
C
.
(8)
O
28
(0)
(4)
T
7
(4)
(7)
.
(8)
D
4
O
(0)
B
4
T
1
(4)
(13)
E
(7)
29
(4)
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
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
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
.
1
8
12
2
5
4
6
418
5
10
CHAPTER
34
.
8 Network Models
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
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
.
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
37
.
38
.
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
.
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
.
(0,5)
(0,1)
(0,4)
T
(0,1)
(0,7)
(0,6)
B
(0,5)
(0,4)
(0,2)
(0,4)
C
43
.
(0,5)
(0,1)
(0,4)
T
(0,1)
(5,7)
(5,6)
B
(5,5)
(0,4)
(0,2)
(0,4)
44
C
.
(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
.
(4,5)
(1,1)
(1,4)
T
(0,1)
(5,7)
(5,6)
B
(5,5)
(0,4)
(0,2)
(0,4)
46
C
.
(4,5)
(1,1)
(3,4)
T
(0,1)
(7,7)
(5,6)
B
(5,5)
(0,4)
(0,2)
(0,4)
47
C
.
(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
.
(4,5)
(1,1)
(3,4)
T
(1,1)
(7,7)
(6,6)
B
(5,5)
(2,4)
(0,2)
(2,4)
49
C
.
A
1
13
O
D
3
1
6
7
5
2
2
C
50
.
13
51
.
LECTURE 12B
NETWORK MODELS
Mary F. McGuire, Ph.D.
Department of Industrial Engineering
University of Houston
1
.
2
.
Network
Flows: Theory
Networks
Basic elements:
N
A
3
R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.
Network
Flow
Network Flow
DataData
R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.
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.
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
R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.
Dual Problem
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
(i, j) A
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.
Network Definitions
Connected
11
Disconnected
R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.
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
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
e Solution
14
R. J. Vanderbei (2008) Linear Programming: Foundations and Extensions, 3rd Ed., Kluwer. ISBN: 978-0-387-74387-5.
xij = 0
Spanning Trees
Network Definitions
Tree Solution
xij = 0
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.
16
.
17
.
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
.
so
(2)2
(1)3
(1)4
(2)2
(1)1
si
(so,1)
(so,2)
(1,2)
(1,3)
(3,si)
(2,si)
so
(2)2
(1)3
(1)4
(2)2
si
(1)1
(so,1)
(so,2)
(1,2)
(1,3)
(3,si)
(2,si)
so
(2)2
(1)3
(1)4
(2)2
si
(1)1
(so,1)
(so,2)
(1,2)
(1,3)
(3,si)
(2,si)
22
.
23
.
s.t.
xso,1 ! 2
xso,2 ! 3
x12 ! 3
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
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):
max z " x0
s.t.
xso,1 ! 2
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)
29
See figure.
9. Step
4
units
flow alon
1-3-si
Step
2
units
flow alon
2-4-si
Step
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
33
http://www.vertex42.com/ExcelTemplates/excel-gantt-chart.html
.
CPM/PERT: Applications
Scheduling construction projects such as office buildings,
a project
35
.
to end
Critical path is the longest path
36
.
continued
37
.
continued
38
.
continued
39
.
number.
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
.
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
.
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
.
48
.
49
.
CPM: Widgetco
Widgetco is about to introduce a new product. Below find
Duration(days)
6
9
8
7
10
12
F 12
3
A6
5
D7
Dummy
1
B9
E 10
(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)
(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)
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
.
55
.
57
58
.