The Transportation and Assignment Problems

Chapter 9
The Transportation and
Assignment Problems
Frederick
S. HillierEducation.
∎ Gerald J. Lieberman
© 2015 McGraw-Hill
All rights reserved.
© 2015 McGraw-Hill Education. All rights reserved.
Introduction
• Transportation problem
– Many applications involve deciding how to
optimally transport goods (or schedule
production)
• Assignment problem
– Deals with assigning people to tasks
• Transportation and assignment problems
– Special cases of minimum cost flow problem
• Presented in Chapter 10
© 2015 McGraw-Hill Education. All rights reserved.
2
9.1 The Transportation Problem
• Prototype example
– P&T Company produces products including
canned peas
– Production occurs at three canneries
– Four distribution warehouses are spread
across the U.S.
– Management initiates a study to reduce
shipping expenses
© 2015 McGraw-Hill Education. All rights reserved.
3
The Transportation Problem
© 2015 McGraw-Hill Education. All rights reserved.
4
The Transportation Problem
• Arrows represent possible truck routes
– Number on arrow: shipping cost per truckload
– Bracketed number: truckloads out
© 2015 McGraw-Hill Education. All rights reserved.
5
The Transportation Problem
• Let Z represent total shipping cost
– xij represents number of truckloads shipped
from cannery i to warehouse j
• Problem: choose values of the 12 decision
variables xij to minimize Z
© 2015 McGraw-Hill Education. All rights reserved.
6
The Transportation Problem
© 2015 McGraw-Hill Education. All rights reserved.
7
The Transportation Problem
© 2015 McGraw-Hill Education. All rights reserved.
8
The Transportation Problem
• The transportation problem model
– Concern: distributing any commodity from
sources to destinations
• The requirements assumption
– Each source has a fixed supply
– Entire supply must be distributed to the
destinations
– Each destination has a fixed demand
– Entire demand must be received from the
sources
© 2015 McGraw-Hill Education. All rights reserved.
9
The Transportation Problem
• The feasible solutions property
– A transportation problem will have feasible
solutions if and only if:
• The cost assumption
– Cost is directly proportional to number of units
distributed
© 2015 McGraw-Hill Education. All rights reserved.
10
The Transportation Problem
• The transportation problem type: any
linear programming problem that fits the
structure in Table 9.6
– Is
© 2015 McGraw-Hill Education. All rights reserved.
11
The Transportation Problem
• Solving the P&T Co. example using a
spreadsheet
– See Figure 9.4 in the text
– Solver uses the general simplex method
• Rather than the streamlined version specifically
designed for the transportation problem
© 2015 McGraw-Hill Education. All rights reserved.
12
9.2 A Streamlined Simplex Method for the
Transportation Problem
• Transportation simplex method
– No artificial variables needed
– Current row zero can be obtained without
using any other row
– Leave basic variable identified in a simple
way
– New BF solution can be identified immediately
• Without algebraic manipulation on simplex tableau
– Almost the entire simplex tableau can be
eliminated
© 2015 McGraw-Hill Education. All rights reserved.
13
A Streamlined Simplex Method for the
Transportation Problem
• Values needed to apply the transportation
simplex method
– Current BF solution
– Current values of ui and vj
– Resulting values of cij − ui − vj for nonbasic
variables xij
• Transportation simplex tableau
– Used to record values for each iteration
© 2015 McGraw-Hill Education. All rights reserved.
14
© 2015 McGraw-Hill Education. All rights reserved.
15
A Streamlined Simplex Method for the
Transportation Problem
• Transportation simplex method is more
efficient
– Especially for large problems
• For transportation problems with m
sources and n destinations:
– Number of basic variables is equal to m+n-1
© 2015 McGraw-Hill Education. All rights reserved.
16
A Streamlined Simplex Method for the
Transportation Problem
• General procedure for constructing an
initial BF solution
– To begin, all source rows and columns of the
transportation simplex tableau are under
consideration for providing a basic variable
1. From the rows and columns still under
consideration, select the next basic variable
according to some criterion
2. Make that allocation large enough to exactly use
up the smaller of the remaining supply in its row
or the remaining demand in its column
© 2015 McGraw-Hill Education. All rights reserved.
17
A Streamlined Simplex Method for the
Transportation Problem
• General procedure (cont’d.)
3. Eliminate that row or column from further
consideration
• If both row and column are the same, arbitrarily
choose the row to eliminate
4. If only one row or column remains under
consideration, complete the procedure by
selecting every remaining variable
associated with that row or column to be
basic with the only feasible allocation
• Otherwise, return to step 1
© 2015 McGraw-Hill Education. All rights reserved.
18
A Streamlined Simplex Method for the
Transportation Problem
• Alternative criteria for step one
– Northwest corner rule
• Select the northwest corner, move one column to
the right and then one row down
– Vogel’s approximation method
• Based on the arithmetic difference between the
smallest and next-to-smallest unit cost cij still
remaining in that row or column
© 2015 McGraw-Hill Education. All rights reserved.
19
A Streamlined Simplex Method for the
Transportation Problem
• Alternative criteria for step one (cont’d.)
– Russel’s approximation method
• For each row still under consideration, determine
largest unit cost 𝑢i still remaining in the row
• For each column still under consideration,
determine largest unit cost 𝑣𝑗 still remaining in the
row
• For each variable xij not previously selected in
these rows and columns, calculate Δij =cij - 𝑢i - 𝑣𝑗
• Select the largest (absolute) negative value of Δij
© 2015 McGraw-Hill Education. All rights reserved.
20
A Streamlined Simplex Method for the
Transportation Problem
• Next step
– Check whether the initial solution is optimal by
applying the optimality test
• Optimality test
– A BF solution is optimal if and only if
𝑐𝑖𝑗– 𝑢𝑖 – 𝑣𝑗 ≥ 0
for every (i,j) such that xij is nonbasic
• If the current solution is not optimal, go to
an iteration
© 2015 McGraw-Hill Education. All rights reserved.
21
A Streamlined Simplex Method for the
Transportation Problem
• An iteration
– Find the entering basic variable
• See Page 343 in the text
– Find the leaving basic variable
• See Pages 343-344 in the text
– Find the new BF solution
• See Pages 344-345 in the text
© 2015 McGraw-Hill Education. All rights reserved.
22
9.3 The Assignment Problem
• Special type of linear programming
problem
– Assignees are being asked to perform tasks
– Assignees could be people, machines, plants,
or time slots
• Requirements to fit assignment problem
definition
– The number of assignees and tasks are the
same
• Designated by n
© 2015 McGraw-Hill Education. All rights reserved.
23
The Assignment Problem
• Requirements to fit assignment problem
definition (cont’d.)
– Each assignee is assigned to exactly one task
– Each task is to be performed by exactly one
assignee
– Cost cij is associated with each assignee i
performing task j
– Objective: determine how n assignments
should be made to minimize the total cost
© 2015 McGraw-Hill Education. All rights reserved.
24
The Assignment Problem
• If problem does not fit requirement 1 or 2
– Dummy assignees and dummy tasks may be
constructed
• Prototype example
– The Job Shop Co. problem
– Assign new machines to locations to minimize
total cost of materials handling
© 2015 McGraw-Hill Education. All rights reserved.
25
The Assignment Problem
© 2015 McGraw-Hill Education. All rights reserved.
26
The Assignment Problem
• xij can have only
values zero or one
– One if assignee i
performs task j
– Zero if not
© 2015 McGraw-Hill Education. All rights reserved.
27
The Assignment Problem
© 2015 McGraw-Hill Education. All rights reserved.
28
The Assignment Problem
• Can use simplex method or transportation
simplex method to solve
• Recommendation: use specialized solution
procedures for the assignment problem
– Will be more efficient for large problems
• Example: Pages 353-356 of the text
© 2015 McGraw-Hill Education. All rights reserved.
29
9.4 A Special Algorithm for the Assignment
Problem
• Summary of the Hungarian algorithm
1. Subtract the smallest number in each row
from every number in the row. Enter the
results in a new table.
2. Subtract the smallest number in each
column of the new table from every number
in the column. Enter the results in another
table.
© 2015 McGraw-Hill Education. All rights reserved.
30
A Special Algorithm for the Assignment
Problem
• Summary of the Hungarian algorithm
(cont’d.)
3. Test whether an optimal set of assignments
can be made. To do this, determine the
minimum number of lines needed to cross
out all zeros
• If the minimum number of lines equals the
number of rows, an optimal set of assignments is
possible. Proceed with step 6.
• If not, proceed with step 4.
© 2015 McGraw-Hill Education. All rights reserved.
31
A Special Algorithm for the Assignment
Problem
• Summary of the Hungarian algorithm
(cont’d.)
4. If the number of lines is less than the
number of rows, modify the table as follows:
• Subtract the smallest uncovered number from
every uncovered number in the table
• Add the smallest uncovered number to the
numbers at intersections of covering lines
• Numbers crossed out but not at intersections of
cross-out lines carry over unchanged to the next
table
© 2015 McGraw-Hill Education. All rights reserved.
32
A Special Algorithm for the Assignment
Problem
• Summary of the Hungarian algorithm
(cont’d.)
5. Repeat steps 3 and 4 until an optimum set of
assignments is possible
6. Make assignments one at a time in positions
that have zero elements. Begin with rows or
columns with only one zero. Cross out both
row and column after each assignment is
made. Move on, with preference given to
any row with only one zero not crossed out.
© 2015 McGraw-Hill Education. All rights reserved.
33
A Special Algorithm for the Assignment
Problem
• Summary of the Hungarian algorithm
(cont’d.)
6. (cont’d.) Continue until every row and
column has exactly one assignment and so
has been crossed out. This will be an
optimal solution for the problem
© 2015 McGraw-Hill Education. All rights reserved.
34
9.5 Conclusions
• General simplex method is a powerful
algorithm
– Simplified approaches are available when
problem fits the special structure
• Transportation problem
• Assignment problem
• Both problem types studied in this chapter:
– Have a number of common applications
© 2015 McGraw-Hill Education. All rights reserved.
35