ECE 307 - Techniques For Engineering Decisions: Networks and Flows

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 109

ECE 307 – Techniques for Engineering

Decisions
Networks and Flows

George Gross
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 1


NETWORKS AND FLOWS
‰ A network is a system of lines or channels
connecting different points
‰ Examples abound in nearly all aspects of life:
 electrical systems
 communication networks
 airline webs
 local area networks
 distribution systems
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 2
NETWORKS AND FLOWS

‰ The network structure is also common to many


other systems that at first glance are not
necessarily viewed as networks
 distribution system consisting of
manufacturing plants, warehouses and retail
outlets
 matching problems such as work to people,
assignments to machines and computer
dating
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 3
NETWORKS AND FLOWS

 river systems with pondage for electricity


generation
 mail delivery networks
 project management of multiple tasks in a
large undertaking such as construction or a
space flight
‰ We consider a broad range of network and
network flow problems
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 4
THE TRANSPORTATION PROBLEM
‰ The basic idea of the transportation problem is

illustrated with the problem of distribution of a

specified homogenous product from several

sources to a number of localities at least cost

‰ We consider a system with m warehouses, n

markets and links between them with the specified

costs of transportation
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 5
THE TRANSPORTATION PROBLEM
supply demand
⎧ ⎫
⎪1 a1 b1

transportation 1 ⎪⎪
⎪ links with ⎪
⎪ ⎪
⎪2
a2 costs
b2 ⎪
warehouses


2⎪

markets
.. ⎪


ci j .. ⎪

. . ⎬
ai bj ⎪
⎪i j⎪
⎪ c i j = ∞ whenever ⎪


.. .. ⎪


. warehouse i cannot . ⎪
⎪m am bn n⎪
⎩ ship to market j ⎪

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 6
THE TRANSPORTATION PROBLEM

 all the supply comes from the m ware-


houses; we associate the index i = 1, 2, … , m
with a warehouse
 all the demand is at the n markets; we
associate the index j = 1, 2, … , n with a
market
 shipping costs c i j for each unit from the
warehouse i to the market j
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 7
THE TRANSPORTATION PROBLEM

‰ The transportation problem is to determine the

optimal shipping schedule that minimizes shipping

costs for the set of m warehouses to the set of

n markets : the quantities shipped from the

warehouse i to each market j


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 8
LP FORMULATION OF THE
TRANSPORTATION PROBLEM
‰ The decision variables are

xij = quanity shipped from warehouse i to market j

i = 1, 2, ... , m
j = 1, 2, ... , n

‰ The objective function is


m n
min ∑ ∑
i =1 j =1
cij xij
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 9
LP FORMULATION OF THE
TRANSPORTATION PROBLEM
‰ The constraints are:
n


j =1
xij ≤ ai i = 1, 2, ... , m


i =1
xij ≥ bj j = 1, 2, ... , n

i = 1, 2, ... , m
xij ≥ 0
j = 1, 2, ... , n
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 10
LP FORMULATION OF THE
TRANSPORTATION PROBLEM
‰ Note that feasibility requires
m n

i =1
ai ≥ ∑
j =1
bj

‰ When
m n

i =1
ai = ∑
j =1
bj

every available unit of supply at the m ware-


houses is shipped to meet all the demands of the
n markets; this problem is known as the standard
transportation problem
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 11
STANDARD TRANSPORTATION
PROBLEM
m n
min ∑
i =1

j =1
cij xij

s .t .
n


j =1
xij = ai
i = 1, ... , m
m

∑ xij = bj
i =1 j = 1, ... , n
xij ≥ 0
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 12
TRANSPORTATION PROBLEM
EXAMPLE
market j
w/h i M1 M2 M3 M4 supplies

x 11 x 12 x 13 x 14
W1 a1
c 11 c 12 c 13 c 14
x 21 x 22 x 23 x 24
W2 a2
c 21 c 22 c 23 c 24
x 31 x 32 x 33 x 34
W3 a3
c 31 c 32 c 33 c 34

demands b1 b2 b3 b4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 13
STANDARD TRANSPORTATION
PROBLEM
‰ The standard transportation problem has

 m n variables x i j

 m + n equality constraints

‰ Since
m n m n
∑ ∑
i =1 j =1
xi j = ∑
i =1
ai = ∑
j =1
bj

there are at most (m + n – 1) independent cons-


traints and consequently at most (m + n – 1)
independent variables x i j
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 14
TRANSPORTATION PROBLEM
EXAMPLE
market j
w/h i M1 M2 M3 M4 ai

W1 3
2 2 2 1

W2 7
10 8 5 4

W3 5
7 6 6 8

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 15
THE LEAST – COST RULE
PROCEDURE
‰ This scheme is used to generate an initial basic

feasible solution which has no more than

(m + n – 1) positive valued basic variables

‰ The key idea of the scheme is to select, at each

step, the variable x i j with the lowest shipping costs

c i j as the next basic variable


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 16
APPLICATION OF THE LEAST – COST
RULE
‰ c 14 is the lowest c i j and we select x 14 as a basic
variable
‰ We choose x 14 as large as possible without
violating any constraints:
min { a 1 , b 4 } = min { 3 , 4 } = 3
‰ We set x 14 = 3 and
x 11 = x 12 = x 13 = 0
‰ We delete row 1 from any further consideration
since all the supplies from W 1 are exhausted
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 17
APPLICATION OF THE LEAST – COST
RULE
market j
w/h i M1 M2 M3 M4 ai

3
W1 3
2 2 2 1

W2 7
10 8 5 4

W3 5
7 6 6 8

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 18
APPLICATION OF THE LEAST – COST
RULE
‰ The remaining demand at M 4 is

4–3 =1

which is the value for the modified demand at M 4

‰ We again apply the criterion selection for the reduced

tableau: c 24 is the lowest-valued c i j with i = 2, j = 4

and we select x 24 as a basic variable


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 19
APPLICATION OF THE LEAST – COST
RULE
‰ We choose x 24 as large as possible without

violating any constraints:

min { a 2 , b 4 } = min { 7 , 1 } = 1

and we set x 24 = 1 and

x 34 = 0

‰ We delete column 4 from any further consi-

deration since all the demand at M 4 is exhausted


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 20
APPLICATION OF THE LEAST – COST
RULE
‰ The remaining supply at W 2 is

7–1 =6,

which is the value for the modified supply at W 2

‰ We repeat these steps until we find the nonzero

basic variables and obtain a basic feasible solution

‰ In the reduced tableau,


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 21
APPLICATION OF THE LEAST – COST
RULE
market j
w/h i M1 M2 M3 ai

4
W2 6
10 8 5

0
W3 5
7 6 6

bj 4 3 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 22
APPLICATION OF THE LEAST – COST
RULE
 pick x 23 to enter the basis
 set
x 23 = min { 6, 4 } = 4
and set x 33 = 0
 eliminate column 3 and reduce the supply at
W 2 to
6–4 = 2
‰ For the reduced tableau
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 23
APPLICATION OF THE LEAST – COST
RULE
market j
M1 M2 ai
w/h i

0
W2 2
10 8

3
W3 5
7 6

bj 4 3
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 24
APPLICATION OF THE LEAST – COST
RULE
 pick x 32 to enter the basis
 set
x 32 = min { 3, 5 } = 3
and set x 22 = 0
 eliminate column 2 in the reduced tableau
and reduce the supply at W 3 to
5–3 = 2
‰ The last reduced tableau is
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 25
APPLICATION OF THE LEAST – COST
RULE
market j
M1 ai
w/h i

2
W2
10

2
2
W3
7

bj 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 26
APPLICATION OF THE LEAST – COST
RULE
 pick x 31 to enter the basis
 set
x 31 = min { 2, 5 } = 2
 reduce the demand at M 1 to
4–2 = 2
 the value of
x 21 = 2
is obtained by default
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 27
INITIAL BASIC FEASIBLE SOLUTION
market j
w/h i M1 M2 M3 M4 ai

3
W1 3
2 2 2 1
2 4 1
W2 7
10 8 5 4
2 3
W3 5
7 6 6 8

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 28
APPLICATION OF THE LEAST – COST
RULE
‰ The feasible solution involves only the basic

variables and results in shipment costs of

3 4
∑ ∑
i =1 j =1
c ij x i j = 1 ⋅ 3 + 4 ⋅ 1 + 5 ⋅ 4 + 6 ⋅ 3 + 7 ⋅ 2 + 10 ⋅ 2

= 79
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 29
THE STANDARD TRANSPORTATION
PROBLEM
‰ The primal problem is
m n

min Z = ∑ ∑
i =1 j =1
cij xij ⎪

s .t . ⎪

n ⎪

ui ↔ ∑ xij = ai ⎬ ( P)
i = 1, ... , m ⎪
j =1

m ⎪

v j ↔ ∑
i =1
xij = bj
j = 1, ... , n ⎪

xij ≥ 0 ⎪⎭
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 30
THE STANDARD TRANSPORTATION
PROBLEM
‰ The dual problem is

m n ⎫
max W = ∑
i =1
a i ui + ∑ b j v j
j =1



s.t . ⎪


ui + v j ≤ c i j i = 1, ... , m ⎬ ( D)
xi j ↔ ⎪

j = 1, ... , n ⎪

u i , v j are unrestricted in sign ⎪
⎪⎭
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 31
THE STANDARD TRANSPORTATION
PROBLEM
‰ The complementary slackness conditions for ( D ) are

i = 1, ... , m
x i*j [ u i* + v *j − c i*j ] = 0
j = 1, ... , n
‰ Due to the equalities in ( P ), the other complemen-

tary slackness conditions fail to provide any additio-

nal useful information


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 32
THE TRANSPORTATION PROBLEM
‰ The complementary slackness conditions obtain

x i*j > 0 ⇒ u i* + v *j = cij

u i* + v *j < c i j ⇒ x i*j = 0

‰ We make use of the duality characteristics to

develop the u – v method for solving the standard

transportation problem
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 33
THE u–v METHOD

‰ The u – v method starts with a basic feasible solution

for the primal problem, obtains the corresponding

dual variables (as if the solution were optimal)

and uses the duals to determine the adjacent basic

feasible solution; the process continues until the

optimality condition is satisfied


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 34
THE u–v METHOD

‰ For a basic feasible solution, we find the dual

variable u i and v j using the complementary

slackness conditions

ui + v j = c i j ∀ basic x i j

with u i and v j being unrestricted in sign


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 35
THE u–v METHOD
‰ We compute using
c i j = c i j − ( u i + v j ) ∀ nonbasic x i j
‰ the step is the analogue of computing c T in the
simplex tableau approach (relative cost improve-
ment vector)
‰ The complementary-slackness-based optimality test
is performed :
if ci j ≥ 0 ∀ nonbasic x i j ⎡⎣ x i j = 0 ⎤⎦ ,
then the basic feasible solution is optimal
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 36
THE u–v METHOD
‰ Otherwise, some nonbasic variable x pq ∋
c pq = c pq − ( u p + vq ) < 0

exists and we determine

c pq = min


pq ∋ x pq
{c } pq

is nonbasic

‰ We, then, select x pq to become a basic variable and


repeat the process for this new basic feasible
solution
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 37
STANDARD TRANSPORTATION
PROBLEM EXAMPLE
‰ We apply the u – v scheme to the example

previously discussed

‰ The basic step from the dual formulation is to

require

ui + v j = c i j ∀ basic x i j
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 38
STANDARD TRANSPORTATION
PROBLEM EXAMPLE
‰ We start with the basic feasible solution and apply
the complementary slackness conditions
u1 + v 4 = 1 = c 14
u 2 + v 4 = 4 = c 24
u2 + v3 = 5 = c 23
u3 + v 2 = 6 = c 32
u3 + v1 = 7 = c 31
u2 + v1 = 10 = c 21
‰ We have 6 equations in 7 unknowns and so there
is an infinite number of solutions
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 39
STANDARD TRANSPORTATION
PROBLEM EXAMPLE
‰ Arbitrarily, we set
v4 = 0
and solve the equations above to obtain
u1 = 1
u2 = 4
v3 = 1
v1 = 6
u3 = 1
v2 = 5
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 40
STANDARD TRANSPORTATION
PROBLEM EXAMPLE
‰ The ci j for the nonbasic variables are

x 11 : c 11 = c 11 − ( u1 + v 1 ) = 2 − (1 + 6) = − 5

x 12 : c 12 = c 12 − ( u1 + v 2 ) = 2 − (1 + 5) = − 4

x 13 : c 13 = c 13 − ( u1 + v 3 ) = 2 − (1 + 1) = 0

x 34 : c 34 = c 34 − ( u 3 + v 4 ) = 8 − (1 + 0 ) = 7

x 33 : c 33 = c 33 − ( u 3 + v 3 ) = 6 − (1 + 1) = 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 41
STANDARD TRANSPORTATION
PROBLEM EXAMPLE
‰ We determine
c pq = min

 = c 11 = − 5
pq ∋ x pq
is nonbasic

and consequently the nonbasic variable x 11 is

introduced into the basis

‰ We determine the maximal value of x 11 by

setting x11 = θ and make use of the tableau


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 42
STANDARD TRANSPORTATION
EXAMPLE
market j
w/h i M1 M2 M3 M4 ai

W1 θ 3–θ 3

W2 2–θ 4 1+θ 7

W3 2 3 5

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 43
STANDARD TRANSPORTATION
EXAMPLE
‰ Therefore,

max θ = min { 2, 3 } = 2

‰ Consequently, x21 = 0 and leaves the basis

‰ We obtain the basic feasible solution

x 14 = 1, x 11 = 2, x 31 = 2, x 32 = 3, x 23 = 4, x 24 = 3

and repeat to solve the u – v problem for this

new basic feasible solution


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 44
STANDARD TRANSPORTATION
EXAMPLE
market j v1 = 2 v2 = 1 v3 = 2 v4 = 1 ai
w/h i

u1 = 0 2 1 3
2 2 2 1
u2 = 3 4 3 7
10 8 5 4
u3 = 5 2 3 5
7 6 6 8
bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 45
STANDARD TRANSPORTATION
EXAMPLE
‰ The complementary slackness conditions of the

nonzero valued basic variables obtain

u 1 + v 1 = c 11 = 2
u 1 + v 4 = c 14 = 1
u 2 + v 3 = c 23 = 5
u 2 + v 4 = c 24 = 4
u 3 + v 1 = c 31 = 7
u 3 + v 2 = c 32 = 6
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 46
STANDARD TRANSPORTATION
EXAMPLE
‰ We set

u1 = 0

and therefore
v3 = 2 v1 = 2

u3 = 5 u3 = 5

v2 = 1 v2 = 0
‰ We compute c i j for each nonbasic variable x i j
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 47
STANDARD TRANSPORTATION
EXAMPLE
c12 = c 12 − ( u1 + v 2 ) = 2 − (0 + 1) = 1
c13 = c 13 − ( u1 + v 3 ) = 2 − (0 + 2) = 0
c21 = c 21 − ( u 2 + v 1 ) = 10 − (3 + 2) = 5
c22 = c 22 − ( u 2 + v 2 ) = 8 − (3 + 1) = 4
c33 = c 33 − ( u 3 + v 3 ) = 6 − (5 + 2) = −1
c34 = c 34 − ( u 3 + v 4 ) = 8 − (5 + 1) = 2
only possible improvement

‰ We introduce x 33 as a basic variable and determine

. its nonnegative value θ in the tableau


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 48
STANDARD TRANSPORTATION
EXAMPLE
market j
w/h i M1 M2 M3 M4 ai

W1 2+θ 1–θ 3

W2 4–θ 3+θ 7

W3 2–θ 3 θ 5

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 49
STANDARD TRANSPORTATION
EXAMPLE
‰ The limiting value of θ is

θ = min { 2, 4, 1 } = 1

‰ Consequently, x14 leaves the basis and x33

enters the basis with the value 1

‰ We obtain the adjacent basic feasible solution in


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 50
STANDARD TRANSPORTATION
EXAMPLE
market j
w/h i v1 = 2 v2 = 1 v3 = 1 v4 = 0 ai

3
u1 = 0 3
2 2 2 1

u2 = 4 3 4
7
10 8 5 4

1 3 1
u3 = 5 8
5
7 6 6

bj 4 3 4 4
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 51
STANDARD TRANSPORTATION
EXAMPLE
‰ We evaluate c i j for each nonbasic variable;

c i j ≥ 0 and so we have an optimal solution with


shipping 3 from W 1 to M 1 with costs 6
shipping 1 from W 3 to M 1 with costs 7
shipping 3 from W 3 to M 2 with costs 18
shipping 1 from W 3 to M 3 with costs 6
shipping 3 from W2 to M 3 with costs 15
shipping 4 from W 2 to M 4 with costs 16
and resulting in the least total costs of 68
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 52
ELECTRICITY DISTRIBUTION
EXAMPLE
‰ We consider in an electric utility system in which

3 power plants are used to supply the demand of

4 cities

‰ The supplies available from the 3 plants are given

‰ The demands of the 4 cities are specified

6
‰ The costs of supplying each 10 kWh are given
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 53
ELECTRICITY COSTS
to city supplies
from
1 2 3 4 (106 kWh)

1 8 6 10 9 35

plant 2 9 12 13 7 50

3 14 9 16 5 40

demands 125
45 20 30 30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 54
ELECTRICITY COSTS
to city supplies
from
1 2 3 4 (106 kWh)

1 balanced
8 6 10 9 35

plant transportation
2 9 12 13 7 50

3 problem
14 9 16 5 40

demands 125
45 20 30 30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 55
ELECTRICITY ALLOCATION EXAMPLE

‰ We note that
3 4
∑ ai = ∑bj
i =1 j =1

and so we have a balanced transportation

problem

‰ We find a basic feasible solution using the least-

cost rule
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 56
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from 1 2 3 4 (106 kWh)

1 0 35
8 6 10 9

plant 2 0 50
9 12 13 7

3 30 40
10
14 9 16 5
demands
45 20 30 30 125
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 57
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
‰ And we set

x 34 = 30

x 14 = 0

x 24 = 0

‰ We compute the supply left at plant 3 and remove

column 4 from further consideration

‰ We continue with the reduced system


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 58
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from (106 kWh)
1 2 3

1 20 35
15
8 6 10

plant 2 0 50
9 12 13

3 0 10
14 9 16
demands
45 20 30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 59
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
and so we set

x 12 = 20

x 22 = 0

x 32 = 0

‰ We recompute the supply left at plant 1 and

remove column 2 from further consideration

‰ The new reduced system obtains


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 60
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from (106 kWh)
1 3

1 15 0 15
8 10

plant 2 50
9 13

3 10
14 16
demands
30
45 30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 61
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
and therefore we set

x 11 = 15

x 13 = 0

and remove row 1 from further consideration

since the supply at plant 1 is exhausted

‰ The operation is repeated for the further reduced

system
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 62
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from (106 kWh)
1 3

2 30 20
50
9 13
plant

3 0 10
14 16

demands
30 30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 63
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
and therefore we set

x 21 = 30

x 31 = 0

and remove column 1 from further consideration

since all the demand in city 1 is satisfied

‰ We are finally left with


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 64
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from (106 kWh)
3

2 20 20
13
plant

3 10 10
16

demands
30
(106 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 65
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
which allows us to set
x 23 = 20
x 33 = 10
‰ The basic feasible solution has the costs
Z = 30 · 5 + 20 · 6 + 15 · 8 + 30 · 9 + 20 · 13 + 10 · 16 = 1080
‰ We improve this solution by using the u – v
scheme
‰ The first tableau corresponding to the initial basic
feasible solution is:
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 66
ELECTRICITY ALLOCATION EXAMPLE:
SOLUTION
to city supplies
from 3 4 (106 kWh)
1 2

1 15 20 35
8 6
plant

2 30 20 50
9 13

3 10 30 40
16 5
demands
45 20 30 30
(10 6 kWh)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 67
STANDARD TRANSPORTATION
EXAMPLE
‰ We compute, the possible improvements at each
nonbasic variable:
c 31 = c 31 − ( u 3 + v 1 ) = 14 − (4 + 8) = 2
c 22 = c 22 − ( u 2 + v 2 ) = 12 − (1 + 6) = 5
c 32 = c 32 − ( u3 + v 2 ) = 9 − (4 + 6) = −1
c 13 = c 13 − ( u1 + v 3 ) = 10 − (0 + 12) = −2
c 14 = c 14 − ( u1 + v 4 ) = 9 − (0 + 1) = 8
c 24 = c 24 − ( u2 + v 4 ) = 7 − (1 + 1) = 5
improvement possible
better possibility
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 68
STANDARD TRANSPORTATION
EXAMPLE
‰ We bring x 13 into the basis and determine the

value of θ using the tableau structure

‰ From the tableau we conclude that

θ = min { 15, 20 } = 15

and therefore x 11 leaves the basis and obtain the

adjacent basic possible solution given in the table


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 69
STANDARD TRANSPORTATION
EXAMPLE
cities
1 2 3 4 ai
plants

1 15 − θ 20 θ 35

2 30 + θ 20 – θ 50

3 10 30 40

bj 45 20 30 30
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 70
STANDARD TRANSPORTATION
EXAMPLE
‰ The adjacent basic feasible solution is

x 21 = 45, x 12 = 20, x 13 = 15, x 23 = 5, x 33 = 10, x 34 = 30

and the new value of Z is

Z = 20 · 6 + 15 · 10 + 45 · 9 + 5 · 13 + 10 · 16 + 30 · 5

= 1050 < 1080

‰ We again pursue a u – v improvement strategy

by starting with the tableau


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 71
STANDARD TRANSPORTATION
EXAMPLE
cities
plants
v1 = 6 v2 = 6 v 3 = 10 v4 = – 1 supplies

u1 = 0 20 15 35
6 10

u2 = 3 45 5 50
9 13

u3 = 6 10 30 40
16 5

demands 45 20 30 30
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 72
STANDARD TRANSPORTATION
EXAMPLE
‰ The complementary slackness conditions obtain
the possible improvements
c 11 = c 11 − ( u1 + v 1 ) = 8 − (0 + 6) = 2
c 31 = c 31 − ( u 3 + v 1 ) = 14 − (6 + 6) = 2
c 22 = c 22 − ( u 2 + v 2 ) = 12 − (3 + 6) = 3
c 32 = c 32 − ( u 3 + v 2 ) = 9 − (6 + 6) = −3
c 14 = c 14 − ( u1 + v 4 ) = 9 − (0 − 1) = 10
c 24 = c 24 − ( u 2 + v 4 ) = 7 − (3 − 1) = 5
only possible improvement
‰ We bring x 32 into the basis and determine its
value θ using
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 73
STANDARD TRANSPORTATION
EXAMPLE
plants
cities
1 2 3 4 ai

1 20 – θ 15 + θ 35

2 45 5 50

3 θ 10 – θ 30 40

bj 45 20 30 30
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 74
STANDARD TRANSPORTATION
EXAMPLE
and so
θ = min { 10, 20 } = 10
‰ The adjacent basic feasible solution is, then,
x 21 = 45 x 12 = 10 x 32 = 10
x 13 = 25 x 23 = 5 x 34 = 30
and the value of Z becomes

Z = 45 · 9 + 10 · 6 + 10 · 9 + 25 · 10 + 5 · 13 30 · 5 =1,020
‰ You are asked to prove, using complementary
slackness conditions, that this is the optimum
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 75
NONSTANDARD TRANSPORTATION
PROBLEM
‰ The nonstandard transportation problem arises

when supply and demand are unbalanced: either

supply exceeds demand or vice versa

‰ We solve by transforming the nonstandard

problem into a standard one

‰ The approach is to create a fictitious entity and

thereby restore the problem to balanced status


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 76
NONSTANDARD TRANSPORTATION
PROBLEM
‰ For the case
m n

i =1
ai > ∑
j =1
bj
   
supply demand

we create the fictitious market Mn+1 to absorb all


⎛ m n ⎞
the excess supply ⎜⎜ a i − ∑ ∑ b j ⎟⎟ ; we set c i, n+1 = 0,
⎝ i =1 j =1 ⎠
∀ i = 1, 2, ... , m since M n+1 does not exist in reality

The problem is then in standard form with j = 1, …

, n+1, an augmented number of markets


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 77
NONSTANDARD TRANSPORTATION
PROBLEM
‰ For the case
n m

j =1
bj > ∑
i =1
ai
   
demand supply
the problem is not , in effect, feasible since all the
demands cannot be met and therefore the least-
cost shipping schedule is that which will supply
as much as possible of the demands of the
markets
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 78
NONSTANDARD TRANSPORTATION
PROBLEM
‰ For the overdemand case, we introduce the

fictitious warehouse W m+1 to supply the shortage;


⎡ n m ⎤

.⎢ b j
⎢⎣ j =1
− ∑
i =1
ai ⎥ we set c m+1, j = 0
⎥⎦

for j = 1, 2, … , n and the problem is in standard

form with i = 1, … , m + 1 (augmented number of

warehouses)
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 79
NONSTANDARD TRANSPORTATION
PROBLEM
‰ Note that the variable x m+1, j is the shortage at

market j and is the shortfall in the demand b j

experienced by the market M j due to inadequate

supplies

‰ For each market j , x m+1, j is a measure of the

infeasibility of the problem


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 80
EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ This problem is concerned with the schedule of 2
plants A and B in the purchase of the raw
supplies from 3 growers

grower availability (ton) price ( $ / ton )

Smith 200 10

Jones 300 9

Richard 400 8

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 81


EXAMPLE: CANNING OPERATIONS
SCHEDULING
and shipping costs in $ / ton given by

to plant
from A B

Smith 2 2.5

Jones 1 1.5

Richard 5 3

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 82


EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ The plants’ labor costs and capacity limits are

plant A B

capacity
450 550
( ton )

labor costs
25 20
( $ / ton )

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 83


EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ The selling price for canned goods is 50 $ / ton
and the company can sell all it produces
‰ The problem is to determine the maximum profit
schedule
‰ Note that this is an unbalanced problem since
supply = 200 + 300 + 400 = 900 tons
demand = 450 + 550 = 1000 tons > 900 tons
‰ Clearly, the decision variables are the amounts
purchased from each grower and shipped to each
plant
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 84
EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ The objectives is formulated as
⎡ ⎤ ⎡ ⎤
max Z = ⎢ 50 − 25 − 10 − 2 ⎥ x ⎢ 50 − 25 − 9 − 1 ⎥ x

SA + 
⎥ JA
⎢ ⎥ ⎢
⎣ 13 ⎦ ⎣ 15 ⎦

⎡ ⎤ ⎡ ⎤
+ ⎢ 
50 − 25 − 8 − 5 ⎥x + ⎢ 50 − 20 − 10 − 2.5 ⎥ x

⎥ RA ⎢ 
⎥ SB
⎣ 12 ⎦ ⎣ 17.5 ⎦

⎡ ⎤ ⎡ ⎤
+ ⎢ 
50 − 20 −
9 − 1.5 ⎥ x + ⎢ 50 − 20 − 8 − 3 ⎥ x

⎥ JB
⎢ ⎢ 
⎥ RB
⎣ 19.5 ⎦ ⎣ 19 ⎦
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 85
EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ The supply constraints are
x SA + x SB ≤ 200

x JA + x JB ≤ 300

x RA + x RB ≤ 400
‰ The demand constraints are
x SA + x JA + x RA ≤ 450

x SB + x JA + x RB ≤ 550
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 86
EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ Clearly, all decision variables are nonnegative

‰ The unbalanced nature of the problem requires the

introduction of a fictitious grower F with the

supply 100 corresponding to the supply shortage;

in this way the nonstandard problem becomes

standard

‰ We set up the standard transportation problem


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 87
EXAMPLE: CANNING OPERATIONS
SCHEDULING
plant j A B supply
grower i
S 200
13 17.5
J 300
15 19.5
R 400
12 19
F 100
0 0
demand 450 550
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 88
EXAMPLE: CANNING OPERATIONS
SCHEDULING
‰ Please note that the objective is a maximization

rather than a minimization

‰ We therefore recast the mechanics of the u-v

scheme for the maximization problem

‰ As a homework exercise, show that the duality

complementary slackness conditions allow us to

change the u – v algorithm in the following way:


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 89
EXAMPLE: CANNING OPERATIONS
SCHEDULING
 the selection of the nonbasic variable x i j to
enter the basis is from those x i j where the
corresponding
c i j > ui + v j
and we evaluate and focus on all c i j > 0 so
that x i j is a candidate to enter the basis
 we pick x pq
c pq = max
 
pq ∋ x pq
{c } pq

is nonbasic
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 90
EXAMPLE SOLUTION

plant j A B supply
grower i
S 200 0 200
13
J 250 50 300
15 19.5
R 0 400 400
19
F 0 100 100
0 0
demand 450 550
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 91
EXAMPLE SOLUTION

‰ We construct the u – v relations for this solution

u 1 + v 1 = 13 u 2 + v 2 = 19.5

u 2 + v 1 = 15 u 3 + v 2 = 19

u4 +v 2 = 0

‰ We arbitrarily set u 1 = 0 and compute

v 1 = 13, u 2 = 2, v 2 = 17.5, u 3 = 1.5, u 4 = – 17.5


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 92
EXAMPLE SOLUTION
‰ We evaluate the ci j corresponding to the

nonbasic variables

c 31 = c 31 − ( u 3 + v 1 ) = 12 − (1.5 + 13) = − 2.5

c 41 = c 41 − ( u 4 + v 1 ) = 0 − ( −17.5 + 13) = 4.5

c 12 = c 12 − ( u1 + v 2 ) = 17.5 − (0 + 17.5) = 0
single possible improvement

‰ Thus, x 41 enters the basis and we determine θ


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 93
EXAMPLE SOLUTION

plant j A B supply
grower i
S 200 200
13
J 250 – θ 50 + θ 300
15 19.5
R 400 400
19
F θ 100 – θ 100
0 0
demand 450 550
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 94
EXAMPLE SOLUTION

‰ It follows that

θ = min { 250, 100 } = 100

and so the adjacent basic feasible solution is

x 11 = 200, x 21 = 150, x 41 = 100, x 22 = 150, x 32 = 400

‰ We repeat the u – v procedure to obtain


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 95
EXAMPLE SOLUTION

u 1 + v 1 = 13 u 2 + v 2 = 19.5

u 2 + v 1 = 15 u 3 + v 2 = 19

u4 + v1 = 0

‰ We solve by arbitrarily setting u 1 = 0 and obtain

v 1 = 13 , u 2 = 2 , v 2 = 17.5 , u 3 = 1.5 , u 4 = – 13

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 96


EXAMPLE SOLUTION

‰ We compute the ci j for the nonbasic variables

c 12 = 17.5 − ( 0 + 17.5) = 0

c 31 = 12 − (1.5 + 13) = − 2.5

c 42 = 0 − ( − 13 + 17.5) = − 4.5
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 97
EXAMPLE SOLUTION
‰ Since each c i j is ≤ 0 no more improvement in

the maximization is possible and so the maximum

profits are

Z = (200)13 + (150)15 + (100)0 +(150)19.5 + (400)19

= 15,375 $
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 98
SCHEDULING PROBLEM AS A
STANDARD TRANSPORTATION PROBLEM
‰ The problem is concerned with the weekly
production scheduling over a 4 – week period
 production costs from each item
first two weeks $ 10

last two weeks $ 15

 demands that need to be met are


week 1 2 3 4

demand 300 700 900 800


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 99
SCHEDULING PROBLEM AS A
STANDARD TRANSPORTATION PROBLEM
 weekly plant capacity is 700
€ overtime is possible for weeks 2 and 3 with
- the production of additional 200 units
- additional cost per unit of $ 5
 $ 3 for weekly storage of excess production
 the objective is to minimize the total costs for the
4-week schedule
‰ The decision variables are
xi j = production in week i for use in week j market
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 100
SCHEDULING PROBLEM AS A
STANDARD TRANSPORTATION PROBLEM
demand 1 2 3 4 F supply
production
M is a very large number
1 700
10 13 16 19 0
normal 700
M 10 13 16 0
2 o/t 200
M 15 18 21 0
3,200
normal 700
M M 15 18 0
3 o/t 200
M M
2,700 20 2,700 0
3,200 – 23
4 700
M M M 15 0
demand 300 700 900 800 500
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 101
ASSIGNMENT PROBLEM
‰ We are given
n machines M 1 , M 2 , … , M n↔ i
n jobs J 1 , J 2 ,…, J n
↔ j
c i j = cost of doing job j on machine i
c i j = M̂ if job j cannot be done on machine i
each machine can only do one job and we wish to
determine the optimal match, i.e., the assignment
with the lowest total costs of doing all the jobs j
on the n machines available
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 102
ASSIGNMENT PROBLEM
‰ The brute force approach is simply enumeration:

consider n = 10 and there are 3, 628, 800 possible

choices!

‰ We can, however, introduce categorical decision

variables
⎧1 job j is assigned to machine i

xij = ⎨
⎪0 otherwise

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 103
ASSIGNMENT PROBLEM
and the problem constraints can be stated as
n

j =1
x ij = 1 ∀ i each machine does exactly 1 job
n

i =1
x ij = 1 ∀ j each job is assigned

to only 1 machine

‰ The objective, then, is


n n
min Z = ∑∑
i =1 j =1
c ij x ij
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 104
ASSIGNMENT PROBLEM

‰ This assignment problem is a standard

transportation problem with

ai = 1 ∀i

bj = 1 ∀ j
n n

i =1
ai = ∑
j =1
bj

© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 105
NONSTANDARD ASSIGNMENT
PROBLEM
‰ Suppose we have m machines and n jobs with

m ≠ n

‰ We may convert this into an equivalent standard

assignment problem with equal number of machines

and jobs

‰ The conversion requires the introduction of

either fictitious jobs or fictitious machines


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 106
NONSTANDARD ASSIGNMENT
PROBLEM
‰ In the case m > n :
we create ( m – n ) fictitious jobs and we have
m machines and n + m – n = m jobs; we assign
the machinery costs for the fictitious goods to
be 0 : note that there is no change in the
objective function since a fictitious job
assigned to a machine is, in effect, a machine
that is idle
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 107
NONSTANDARD ASSIGNMENT
PROBLEM
‰ For the case n > m :

we create ( n – m ) fictitious machines with

machine costs of 0 and the solution

obtained has the ( n – m ) jobs that cannot be

done due to lack of machines


© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 108
NONSTANDARD ASSIGNMENT
PROBLEM
‰ In principle, any assignment problem may be
solved using the transportation problem
technique; in practice , this is not good since
there exists degeneracy in every basic feasible
solution
‰ We note that in the standard assignment problem for
m machines with m = n , there are exactly m x i j
that are 1 (nonzero) but every basic feasible
solution of the transportation problem has (2m –
1) basic variables and therefore contains (m – 1)
zero valued basic variables
© 2006-2009 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved. 109

You might also like