Lecture (Distribution Models)
Lecture (Distribution Models)
Transportation Problem
The transportation problem arises frequently in planning for
the distribution of goods and services from several supply
locations to several demand locations.
Three-Month
Origin Plant Production Capacity
(units)
1 Cleveland 5,000
2 Bedford 6,000
3 York 2,500
TOTAL 13,500
EXAMPLE 1
The firm distributes its generators through four regional distribution
centers located in Boston, Chicago, St. Louis, and Lexington; the
three-month forecast of demand for the distribution centers is as
follows:
Distribution Three-Month Demand
Destination
Center Forecast (units)
1 Boston 6,000
2 Chicago 4,000
3 St. Louis 2,000
4 Lexington 1,500
TOTAL 13,500
Destination
Origin Boston Chicago St. Louis Lexington
Cleveland 3 2 7 6
Bedford 7 5 2 3
York 2 5 4 5
EXAMPLE 1 Distribution Centers
Plants (Origins) (destination)
1 6000
1 3 Boston
5000 Cleveland 2
7
6
2
Chicago 4000
7
2 5
6000 Bedford 2
3
3 2000
2 St. Louis
5
3 4
2500 York 5
4 1500
Lexington
Supplies Demands
Linear Programming Model
For the general linear programming model of a transportation
problem with m origins and n destinations, we use the
following notation:
To Destination
Source
D1 D2 … Dj … Dn
Supply
From Source
S1 C11 C12 C1n a1
x11 x12 x1n
S2 C21 C22 C2n a2
x21 x22 x2n
… Si … Cij … ai …
xij
Sm Cm1 Cm2 Cmn am
xm1 xm2 xmn
sum of ai
Destination
b1 b2 … bj … an
Requirements
sum of bi
ASSUMPTIONS
The Requirements Assumption
Each source has a fixed supply of units, where this entire supply
must be distributed to the destinations. (We let si denote the
number of units being supplied by source i, for i = 1, 2, . . . , m)
Similarly, each destination has a fixed demand for units, where this
entire demand must be received from the sources. (We let dj
denote the number of units being received by destination j, for
j = 1, 2, . . . , n.)
ASSUMPTIONS
The Cost Assumption
The cost of distributing units from any particular source to any
particular destination is directly proportional to the number of units
distributed. Therefore, this cost is just the unit cost of distribution
times the number of units distributed. (We let cij denote this unit
cost for source i and destination j.)
ASSUMPTIONS
The model: Any problem (whether involving transportation
or not) fits the model for a transportation problem if it can be
described completely in terms of a parameter table and it
satisfies both the requirements assumption and the cost
assumption. The objective is to minimize the total cost of
distributing the units. All the parameters of the model are
included in this parameter table.
PROPERTIES
The feasible solutions property
A transportation problem will have feasible solutions if and
only if
Unacceptable Routes
Establishing a route from every origin to every destination may not
be possible. To handle this situation, we simply drop the
corresponding arc from the network and remove the
corresponding variable from the linear programming formulation.
SOLVING TRANSPORTATION MODEL
TRANSPORTATION ALGORITHM
The transportation algorithm follows the exact steps of the
simplex method. However, instead of using the regular simplex
tableau, we take advantage of the special structure of the
transportation model to organize the computations in a more
convenient form.
TRANSPORTATION ALGORITHM
STEP 1
Determine a starting basic feasible solution, and go to step 2
STEP 2
Use the optimality condition of the simplex method to determine
the entering variable from among all the nonbasic variables. If the
optimality condition is satisfied, stop. Otherwise, go to step 3.
STEP 3
Use the feasibility condition of the simplex method to determine
the leaving variable from among all the current basic variables , and
find the new basic solution. Return to step 2.
ILLUSTRATION
SunRay Transport Company ships truckloads of grain from three
silos to four mills. The supply (in truckloads) and the demand (also
in truckloads) together with the unit transportation cost per
truckload on the different routes are summarized below. The unit
transportation costs, cij are in hundreds of dollars. The model seeks
the minimum-cost shipping schedule xij between silo i and mill j.
Mill Supply
1 2 3 4
1 10 2 20 11 15
X11 X12 X13 X14
Silo 2 12 7 9 20 25
X21 X22 X23 X24
3 4 14 16 18 10
X31 X32 X33 X34
Demand 5 15 15 15
DETERMINATION OF THE STARTING
SOLUTION
A general transportation model with m sources and n
destinations has m+n constraint equations, one for each
source and each destination. However, because the
transportation model is always balances, one of these
equations is redundant. Thus, the model has m+n-1
independent constraint equations, which means that the
starting basic solution consists of m+n-1 basic variables.
DETERMINATION OF THE STARTING
SOLUTION
The special structure of the transportation problems allows
securing a nonartificial starting basic solution using one of
three methods:
A. Northwest-corner method
B. Least-cost method
C. Vogel approximation method
DETERMINATION OF THE STARTING
SOLUTION
The three methods differ in the “quality” of the starting basic
solution they produce, in the sense that a better starting
solution yields a smaller objective value. In general, though not
always, the Vogel method yields the best starting basic solution,
and the northwest-corner method yields the worst. The
tradeoff is that the northwest-corner method involves the
least amount of computations.
NORTHWEST-CORNER METHOD
The method starts at the northwest-corner cell (route) of the tableau.
STEP 1: Allocate as much as possible to the selected cell, and adjust the
associated amounts of supply and demand by subtracting the allocated
amount.
STEP 2: Cross out the row or column with zero supply and demand to
indicate the no further assignments can be made in that row or column. If
both a row and a column net to zero simultaneously, cross out one only,
and leave a zero supply (demand) in the uncrossed-out row (column).
1 2 3 4
1 10 2 20 11 15
5 10
2 12 7 9 20 25
Silo 5 15 5
3 4 14 16 18 10
10
Demand 5 15 15 15
LEAST-COST METHOD
The least-cost method finds a better starting solution by concentrating on
the cheapest routes. The method assigns as much as possible to the cell
with the smallest unit cost (ties are broken arbitrarily). Next, the satisfied
row or column is crossed out and the amounts of supply and demand are
adjusted accordingly. If both a row and a column are satisfied
simultaneously, only one is crossed out, the same as in the northwest-
corner method. Next, look for the uncrossed-out cell with the smallest
unit cost and repeat the process until exactly one row or column is left
uncrossed out.
LEAST-COST METHOD
Mill Supply
1 2 3 4
1 10 2 20 11 15
15 0
2 12 7 9 20 25
Silo 15 10
3 4 14 16 18 10
5 5
Demand 5 15 15 15
VOGEL APPROXIMATION METHOD (VAM)
VAM is an improved version of the least-cost method that generally, but
not always, produces better starting solutions.
STEP 2: Identify the row or column with the largest penalty. Break ties
arbitrarily. Allocate as much as possible to the variable with the least unit
cost in the selected row or column. Adjust the supply and demand, and
cross out the satisfied row or column. If a row and a column are satisfied
simultaneously, only one of the two is crossed out, and the remaining row
(column) is assigned zero supply (demand).
VOGEL APPROXIMATION METHOD (VAM)
STEP 3:
a. If exactly one row or column with zero supply or demand remains
uncrossed out, stop.
b. If one row (column) with positive supply (demand) remains uncrossed
out, determine the basic variables in the row (column) by the least-
cost method. Stop.
c. If all the uncrossed out rows and columns have (remaining) zero
supply and demand, determine the zero basic variables by the least-
cost method. Stop.
d. Otherwise, go to step 1.
VOGEL APPROXIMATION METHOD (VAM)
Mill Supply
Row
1 2 3 4
Penalty
1 10 2 20 11 15
10 – 2 = 8
2 12 7 9 20 25 9–7=2
Silo
3 4 14 16 18 10 14 – 4 = 10
5
Demand 5 15 15 15
Column 10 – 4 7–2 16 – 9 18 – 11
Penalty =6 =5 =7 =7
VOGEL APPROXIMATION METHOD (VAM)
Mill Supply
Row
1 2 3 4
Penalty
1 10 2 20 11 15
11 – 2 = 9
15
2 12 7 9 20 25 9–7=2
Silo
3 4 14 16 18 10 16 – 14 = 2
5
Demand 5 15 15 15
Column 7–2 16 – 9 18 – 11
-
Penalty =5 =7 =7
VOGEL APPROXIMATION METHOD (VAM)
Mill Supply
Row
1 2 3 4
Penalty
1 10 2 20 11 15
20 – 11 = 9
15
2 12 7 9 20 25 20 – 9 =11
Silo 15
3 4 14 16 18 10 18 – 16 = 2
5
Demand 5 15 15 15
Column 16 – 9 18 - 11
- -
Penalty =7 =7
VOGEL APPROXIMATION METHOD (VAM)
Mill Supply
Row
1 2 3 4
Penalty
1 10 2 20 11 15
-
15 0
2 12 7 9 20 25 -
Silo 15 10
3 4 14 16 18 10 -
5 5
Demand 5 15 15 15
Column
- - - -
Penalty
EXAMPLE
Given a transportation problem with the following costs,
supply, and demand. Find the initial solution using the
northwest-corner rule, least-cost method and Vogel’s
approximation model.
To
From Supply
D E F
A 6 7 4 100
B 5 3 6 180
C 8 5 7 200
STEP 1
Use the simplex optimality condition to determine the entering
variable as the current nonbasic variable that can improve the
solution. If the optimality condition is satisfied, stop. Otherwise, go
to step 2.
STEP 2
Determine the leaving variable using the simplex feasibility condition.
Change the basis, and return to step 1.
ITERATIVE COMPUTATIONS OF THE
TRANSPORTATION ALGORITHM
The incoming arc is the currently unused route (unoccupied
cell) where making a flow allocation will cause the largest per-
unit reduction in total cost. Flow is then assigned to the
incoming arc, and the amounts being shipped over all other arcs
to which flow had previously been assigned (occupied cells) are
adjusted as necessary to maintain a feasible solution. In the
process of adjusting the flow assigned to the occupied cells, we
identify and drop an outgoing arc from the solution.
ITERATIVE COMPUTATIONS OF THE
TRANSPORTATION ALGORITHM
Thus, at each iteration, we bring a currently unused arc
(unoccupied cell) into the solution, and remove an arc to which
flow had previously been assigned (occupied cell) from the
solution.
Note: cij – ui – vj provides the change in total cost per unit that will be obtained by allocating
one unit of flow to the corresponding arc.Thus, we will call this the net evaluation index.
OPTIMALITY TEST
ui multiple of original row i that has been subtracted
(directly or indirectly) from original row 0 by the simplex
method during all iterations leading to the current simplex
tableau
Mill Supply
1 2 3 4
1 10 2 20 11 15
5 10
2 12 7 9 20 25
Silo 5 15 5
3 4 14 16 18 10
10
Demand 5 15 15 15
OPTIMALITY TEST
basic variables satisfies cij = ui + vj
Transportation
Basic variable ui vj
cost
x11 c11 = 10 u1 = 0 v1 = 10
x12 c12 = 2 u1 = 0 v2 = 2
x22 c22 = 7 u2 = 5 v2 = 2
x23 c23 = 9 u2 = 5 v3 = 4
x24 c24 = 20 u2 = 5 v4 = 15
x34 c34 = 18 u3 = 3 v4 = 15
OPTIMALITY TEST
A BF solution is optimal if and only if cij – ui – vj ≥ 0 for every (i, j)
such that xij is nonbasic. After computing for cij – ui – vj, we now
conclude that the starting basic solution is not optimal.
Nonbasic Transportation
ui vj cij – ui – vj
variable cost
x13 c13 = 20 u1 = 0 v3 = 4 16
x14 c14 = 11 u1 = 0 v4 = 15 -4
x21 c21 = 12 u2 = 5 v1 = 10 -3
x31 c31 = 4 u3 = 3 v1 = 10 -9
x32 c32 = 14 u3 = 3 v2 = 2 9
x33 c33 = 16 u3 = 3 v3 = 4 9
ITERATION
Iteration:
STEP 1. Determine the entering basic variable: Select the nonbasic
variable xij having the largest (in absolute terms) negative value of
cij – ui – vj.
1 2 3 4
Demand 5 15 15 15
ITERATION
For STEP 2:
If route xij (the entering variable) ships θ units, then the maximum
value of θ is determined based on two conditions.
FIRST
Construct a closed loop that starts and ends at the entering variable
cell.
Except for the entering variable cell, each corner of the closed loop
must coincide with a basic variable.
ITERATION
STEP 2. Determine the leaving basic variable
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
For STEP 2:
These two conditions determine the maximum value of θ and the
leaving variable in the following manner:
NEXT
Assign the amount θ to the entering variable cell.
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
STEP 2. Determine the leaving basic variable. From the donor cells
(encircled cells), select the basic variable having the smallest value.
In case of ties, break arbitrarily.
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
STEP 3. Determine the new BF solution: Add the value of the
leaving basic variable to the allocation for each recipient cell.
Subtract this value from the allocation for each donor cell.
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
The new transportation tableau
Mill Supply
1 2 3 4
Demand 5 15 15 15
OPTIMALITY TEST
basic variables satisfies cij = ui + vj
Transportation
Basic variable ui vj
cost
x12 c12 = 2 u1 = 0 v2 = 2
x22 c22 = 7 u2 = 5 v2 = 2
x23 c23 = 9 u2 = 5 v3 = 4
x24 c24 = 20 u2 = 5 v4 = 15
x31 c31 = 4 u3 = 3 v1 = 1
x34 c34 = 18 u3 = 3 v4 = 15
OPTIMALITY TEST
A BF solution is optimal if and only if cij – ui – vj ≥ 0 for every (i, j)
such that xij is nonbasic. After computing for cij – ui – vj, we now
conclude that the starting basic solution is still not optimal.
Nonbasic Transportation
ui vj cij – ui – vj
variable cost
x11 c11 = 10 u1 = 0 v1 = 1 9
x13 c13 = 20 u1 = 0 v3 = 4 16
x14 c14 = 11 u1 = 0 v4 = 15 -4
x21 c21 = 12 u2 = 5 v1 = 1 6
x32 c32 = 14 u3 = 3 v2 = 2 9
x33 c33 = 16 u3 = 3 v3 = 4 9
ITERATION
Since the solution is still not optimal, perform another
iteration using your new transportation tableau.
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
Doing Step 1 to 3, we have the following solution:
Mill Supply
1 2 3 4
Demand 5 15 15 15
ITERATION
The new transportation tableau
Mill Supply
1 2 3 4
Demand 5 15 15 15
OPTIMALITY TEST
basic variables satisfies cij = ui + vj
Transportation
Basic variable ui vj
cost
x12 c12 = 2 u1 = 0 v2 = 2
x14 c14 = 11 u1 = 0 v4 = 11
x22 c22 = 7 u2 = 5 v2 = 2
x23 c23 = 9 u2 = 5 v3 = 4
x31 c31 = 4 u3 = 7 v1 = -3
x34 c34 = 18 u3 = 7 v4 = 11
OPTIMALITY TEST
A BF solution is optimal if and only if cij – ui – vj ≥ 0 for every (i, j)
such that xij is nonbasic. After computing for cij – ui – vj, we now
conclude that the starting basic solution is optimal.
Nonbasic Transportation
ui vj cij – ui – vj
variable cost
x11 c11 = 10 u1 = 0 v1 = -3 13
x13 c13 = 20 u1 = 0 v3 = 4 16
x21 c21 = 12 u2 = 5 v1 = -3 10
x24 c24 = 20 u2 = 5 v4 = 11 4
x32 c32 = 14 u3 = 7 v2 = 2 5
x33 c33 = 16 u3 = 7 v3 = 4 5
OPTIMAL SOLUTION
Number of
From SILO To MILL
Truckloads
1 2 5
1 4 10
2 1 10
2 3 15
3 1 5
3 4 5
Optimal Cost = $435
EXAMPLE 1
Factory
W1 W2 W3
Capacity
F1 20 18 25 24
F2 12 11 33 6
F3 17 17 40 11
Warehouse
15 10 10
Requirement
EXAMPLE 2
Plant
W1 W2 W3 W4
Capacity
P1 75 50 50 150 250
P2 90 120 140 75 200
Warehouse
125 110 110 165
Demand
EXAMPLE 3
Plant
W1 W2 W3
Capacity
P1 11 13 16 65
P2 10 7 9 120
P3 16 11 12 100
Warehouse
110 95 80
Demand
EXAMPLE 4
ABC Company supplies clothing materials to customers in three main
cities in the country. The company stores their products in two
warehouses: Warehouse A and Warehouse B. Demand forecasts for the
coming Christmas season are: Manila, 400 units; Davao, 200 units;
and Cebu, 300 units. Contracts to provide the following quantities have
been written: Warehouse A, 500 units; and Warehouse B, 400 units.
The distribution costs per unit (in thousands of pesos) are as follows:
TO
FROM
Manila Davao Cebu
Warehouse A 10 20 15
Warehouse B 12 15 18
QUESTIONS:
1. What is the initial cost of the problem using Northwest corner
method?
2. The initial solution is not yet optimal because cost can still
decrease by ______ per unit?
3. In the first tableau, the leaving variable is ______?
4. In the second tableau, how many units from Warehouse A should
be shipped to Cebu?
5. In the second tableau, how many units from Warehouse B should
be shipped to Davao?
6. What is the total cost of the second tableau?
7. In the third tableau, how many units from Warehouse B should be
shipped to Manila?
8. In the third tableau, how many units from Warehouse B should be
shipped to Cebu?
9. What is the total cost of the third tableau?
Assignment Problem
The assignment problem arises in a variety of decision-making
situations; typical assignment problems involve assigning jobs
to machines, agents to tasks, sales personnel to sales
territories, contracts to bidders, and so on.
Client
Project Leader
1 2 3
Terry 10 15 9
Carle 9 18 5
McClymonds 6 14 3
EXAMPLE
Project Leaders Clients
(Origins) (destination)
1 1 10 Client 1
Terry 15 1
9
9
2 18 Client
1 Carle 2 1
5
6
14
3 Client
McClymonds 3 3
1 1
Supplies Demands
Linear Programming Model
To show the general linear programming model for an
assignment problem with m agents and n tasks, we use the
following notation:
Unacceptable assignments
If one or more assignments are unacceptable, the corresponding
decision variable can be removed from the linear programming
formulation. This situation could happen, for example, if an agent did
not have the experience necessary for one or more of the tasks.
SOLVING ASSIGNMENT MODELS
THE ASSIGNMENT MODEL
The general assignment model with n workers and n
jobs is as follows:
Jobs
1 2 … n
…
n cn1 cn2 … cnn 1
1 1 … 1
THE ASSIGNMENT MODEL
The element cij represents the cost of assigning
worker i to job j where i, j = 1,2,…,n.
Maximization
For the original cost matrix, identify each row’s maximum,
and subtract all the entries of the row from this value.
HUNGARIAN METHOD
STEP 2
For the matrix resulting from step 1, identify each
column’s minimum, and subtract it from all the entries of
the column.
STEP 3
Identify the optimal solution as the feasible assignment
associated with the zero elements of the matrix obtained
in step 2.
HUNGARIAN METHOD
If no feasible assignment (with all zero entries) can be
secured
Chores
1 1 1
EXAMPLE 1
STEP 1
For the original cost matrix, identify each row’s minimum, and subtract
it from all the entries of the row.
Row
Mow Paint Wash
Minimum
John $15 $10 $9 p1 = 9
John 6 1 0
Karen 0 6 1
Terri 2 4 0
Column
q1 = 0 q2 = 1 q3 = 0
Minimum
EXAMPLE 1
STEP 3
Identify the optimal solution as the feasible assignment associated
with the zero elements of the matrix obtained in step 2.
John 6 0 0
Karen 0 5 1
Terri 2 3 0
EXAMPLE 1
The cells with encircled zero entries provide the
optimum solution.
1 $1 $4 $6 $3 p1 = 1
2 $9 $7 $10 $9 p2 = 7
Child
3 $4 $5 $11 $7 p3 = 4
4 $8 $7 $8 $5 p4 = 5
EXAMPLE 2
Chore
1 2 3 4
1 0 3 5 2
2 2 0 3 2
Child
3 0 1 7 3
4 3 2 3 0
Column Minimum q = 0 q2 = 0 q3 = 3 q3 = 0
1
EXAMPLE 2
Chore
1 2 3 4
1 0 3 2 2
2 2 0 0 2
Child
3 0 1 4 3
4 3 2 0 0
No feasible assignment
EXAMPLE 2
Chore
1 2 3 4
1 0 3 2 2
2 2 0 0 2
Child
3 0 1 4 3
4 3 2 0 0
EXAMPLE 2
Chore
1 2 3 4
1 0 2 1 1
2 3 0 0 2
Child
3 0 0 3 2
4 4 2 0 0
EXAMPLE 3
You work as a sales manager for a toy manufacturer, and you
currently have three salespeople on the road meeting buyers.
Your salespeople are in Austin, TX; Boston, MA; and Chicago, IL.
You want them to fly to three other cities: Denver, CO;
Edmonton, Alberta; and Fargo, ND. The table below shows the
cost of airplane tickets in dollars between these cities.
Bulldozer/Site A B C D
1 90 75 75 80
2 35 85 55 65
3 125 95 90 105
4 45 110 95 115
Worker/Job A B C D
1 50 50 - 20
2 70 40 20 30
3 90 30 50 -
4 70 20 60 70