Tải bản đầy đủ

Giao trinh bai tap 07 dynamic 20programming1

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



⎪1



⎪2




⎪i




⎪m


supply

demand

a1

b1

a2

..
.
..
.

transportation
links with
costs

b2

ci j

bj

ai
c i j = ∞ whenever

am

warehouse i cannot
ship to market j

bn

..
.
..
.

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


1 ⎪⎪



2⎪




j⎪




n⎪



markets

warehouses

THE TRANSPORTATION PROBLEM

6


THE TRANSPORTATION PROBLEM
 all the supply comes from the m warehouses; 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
min

m

n

cij xij


i =1 j =1

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

9


LP FORMULATION OF THE
TRANSPORTATION PROBLEM
‰ The constraints are:
n

xij

j =1
m

xij

i =1

≤ ai

i = 1, 2, ... , m

≥ 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

ai

i =1



n

bj

j =1

‰ When
m

ai

i =1

=

n

bj

j =1

every available unit of supply at the m warehouses 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
min

m

n

cij


i =1
j =1

xij

s .t .
n

xij

j =1

=

i = 1, ... , m

m

xij

i =1

ai

=

bj

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

W1
W2
W3
demands

M1

M2

M3

M4

x 11

x 12

x 13

x 14

c 11

x 21

c 12

x 22

c 21

x 31

x 23

x 32

x 33

x 24
c 24

x 34

c 33

c 32

b2

c 14

c 23

c 22

c 31

b1

c 13

b3

supplies

c 34

a1
a2
a3

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

xi j


i =1 j =1

=

m

ai

i =1

=

n

bj

j =1

there are at most (m + n – 1) independent constraints 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

W1

2

10

W3

M3

M4

ai
3

2

W2

bj

M2

2

1

5

8

4

7
5

7

4

3

8

6

6

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
3

W1
2

W2

2

2

10

W3
bj

ai

1

4

5

8

3
7
5

7

4

6

6

3

4

8

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 consideration 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

M1

w/h i

M2

M3

ai

4

W2

6
8

10

5

0
W3

5
6

7

bj

4

3

6

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

10

8

2

3
W3

5
7

bj

4

6

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


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×