1
� In this chapter we will discuss the transportation andassignment problems which are two special kinds of linearprogramming.
� The transportation problem deals with transporting goodsfrom their sources to their destinations .
� The assignment problem, on the other hand, deals withassigning people or machine to jobs.
Ch. Ch. 4 4 THE TRANSPORTATION AND THE TRANSPORTATION AND ASSIGNMENT PROBLEMSASSIGNMENT PROBLEMS
Example: 1The amount of reinforcement steel available at threewarehouses of a construction company is 20, 12, and 12 tonsrespectively. While, the amounts of reinforcement steelneeded at four construction sites are 16, 7, 11, and 10 tonrespectively. The following table shows the transportation costin Egyptian Pounds (LE) between the different warehousesand the construction sites. It is required to draw the networkflow diagram and determine how many tons of reinforcementsteel should be shipped from each warehouse to each of theconstruction sites in order to minimize the total shipping cost.
The transportation problemThe transportation problem
2
The transportation problemThe transportation problem
Solution
- Formulate the problem:Minimize:
Z= 4X11+2 X12+ X13+3X14+7X21+ X22+2X23+3X24+2X31+6X32+5X33+4X34
Subject to:
X11+X12+X13+X14 = 20X21+X22+X23+X24 = 12 SUPPLYX31+X32+X33+X34 = 12
X11+X21+X31 = 16X12+X22+X32 = 17 DEMANDX13+X23+X33 = 11X14+X24+X34 = 10
The transportation problemThe transportation problem
3
- This is an example of the transportation model. - This problem has a specific structure. All the
coefficients of the variables in the constraint equations are 1
- Every variable appears in exactly two constraints- All constraint equations are formed using the equal
sign not the ≥ or the ≤ signs- This is the special structure that distinguishes this
problem as a transportation problem
The transportation problemThe transportation problem
The Transportation Problem Model- the transportation model is concerned with
distributing a commodity from a group of supply centers, called sources to a group of receiving centers, called destinations to minimize total cost
- In general, source i (i = 1, 2, 3, ….., m) has a supply of si units, and destination j (j = 1, 2, 3, ……, n) has a demand for dj units
- The cost of distributing units from source i to destination j, cij, is directly proportional to the number of units distributed, xij
The transportation problemThe transportation problem
4
The Transportation Problem Model- the transportation Table
The transportation problemThe transportation problem
Cost per distributed unit
SupplyDestination
1 2 … n
1 c11 c12 … c1n s1
Source 2 c21 c22 … c2n s2
: : : : :
m cm1 cm2 … cmn sm
Demand d1 d2 … dn
The Transportation Problem Model- Let Z represents the total distribution cost and xij (i =
1, 2, ….., m; j = 1, 2, …., n) be the number of units to be distributed from source i to destination j
The transportation problemThe transportation problem
5
The Transportation Problem Model- A necessary condition for a transportation problem to
have any feasible solution is that:
The transportation problemThe transportation problem
- This property may be verified by observing that the constraints require that both
The Transportation Problem Model- Number of variables = m x n- Number of constraints = m + n- Number of basic variables = m + n – 1- This as any supply constraint equals the sum of demand
constraints minus the sum of other supply constraints- Therefore, any basic feasible (BF) solution will have
only m + n – 1 basic variables (non-zero variables) while all other variables will have zero value. Also, the sum of allocations for each row or each column equals its supply or demand
The transportation problemThe transportation problem
6
The Transportation Problem Model- One important condition is that all supplies should
equal all demands (balanced transportation problem)- If this is not true for a particular problem, dummy
sources or destinations can be added to make it true- These dummy centers have zero distribution costs - If shipment is impossible between a given source and
destination, a large cost of M is entered. This discourages the solution from using such cells
The transportation problemThe transportation problem
The Transportation Problem Model- Constraint coefficients of the transportation problem
The transportation problemThe transportation problem
x11 x12 ……. x1n x21 x22 ……. x2n ……. xm1 xm2 ……. xmn
1 1 ……. 1
1 1 ……. 1
1 1 ……. 1
1 1 1
1 1 1
…….
1 1 1
7
Vogel’s Approximation Method - For each row and column remaining under
consideration, calculate its difference, the arithmetic difference between the smallest and next-to-the-smallest unit cost cij still remaining in that row or column.
- In that row or column having the largest difference, select the variable having the smallest remaining unit cost
- Ties for the largest difference, or for the smallest remaining unit cost, may be broken arbitrarily
The transportation problemThe transportation problem
- Using Vogel’s Approximation to solve for number of tons to be shipped from each warehouse:
- First check that sources are equal to the demand:
- Sources = 20+12+12 = 44 = demand = 16+7+11+10
The transportation problemThe transportation problem
8
The transportation problemThe transportation problem
The transportation problemThe transportation problem
9
The transportation problemThe transportation problem
- Substitute in the objective function to get Z
Example: 2
Resolve problem no. 1 assuming the transportation table asfollow with no reinforcement steel to be shipped fromwarehouse 1 to site 3 and from warehouse 3 to site 1.
The transportation problemThe transportation problem
10
The transportation problemThe transportation problem
Solution
- Formulate the problem:Minimize:
Z= 4X11+2 X12+3X14+7X21+ X22+2X23+3X24+6X32+5X33+4X34
Subject to:
X11+X12+X14 = 20X21+X22+X23+X24 = 12 SUPPLYX32+X33+X34 = 12
X11+X21 = 16X12+X22+X32 = 17 DEMANDX23+X33 = 11X14+X24+X34 = 10
The transportation problemThe transportation problem
11
- Using Vogel’s Approximation to solve for number of tons to be shipped from each warehouse:
- First check that sources are equal to the demand:
- Sources = 20+12+12 = 44 = demand = 16+7+11+10
The transportation problemThe transportation problem
The transportation problemThe transportation problem
12
The transportation problemThe transportation problem
The transportation problemThe transportation problem
- Substitute in the objective function to get Z
13
Example: 3
Resolve problem no. 1 assuming that the reinforcing steelavailable at the three warehouses is 20, 12, and 18 tonsrespectively. While, the amounts of reinforcement steelneeded at four construction sites are 16, 7, 11, and 10 tonrespectively.
The transportation problemThe transportation problem
- Using Vogel’s Approximation to solve for number of tons to be shipped from each warehouse:
- First check that sources are equal to the demand:
- Sources = 20+12+18 = 50 , - While , demand = 16+7+11+10 = 44
- So we add a dummy construction site C5 to accommodate the difference of 6 tons.
The transportation problemThe transportation problem
14
The transportation problemThe transportation problem
Solution
- Formulate the problem:Minimize:Z= 4X11+2 X12+ X13+3X14+7X21+ X22+2X23+3X24+2X31+6X32+5X33+4X34
Subject to:
X11+X12+X13+X14 + X15 = 20X21+X22+X23+X24 + X25 = 12 SUPPLYX31+X32+X33+X34 + X35 = 12
X11+X21+X31 = 16X12+X22+X32 = 17 DEMANDX13+X23+X33 = 11X14+X24+X34 = 10X15+X25+X35 = 6
The transportation problemThe transportation problem
15
The transportation problemThe transportation problem
The transportation problemThe transportation problem
16
The transportation problemThe transportation problem
- Substitute in the objective function to get Z
� A special case of the transportation problem wheneach supply is one and each demand is one
� As such, every supplier will be assigned onedestination and every destination will have onesupplier
The The Assignment ProblemAssignment Problem
17
ExampleA contractor owns three excavators of different capacity. He/shewants to dispatch these excavators into three different jobs. Theperformance of the excavators is measured as the time consumed toperform each job. The data of the time tests are shown as given inthe table below.
- Draw a network flow diagram.- Formulate a mathematical model to obtain the minimum time.- Solve this model using the Vogal’s approximation model
The assignment problemThe assignment problem
The assignment problemThe assignment problem
1
2
3
1
2
3
(S1=1) (d1=1)8
3
7
10
3
5
6
4
(S2=1)
(S3=1)
(d2=1)
(d3=1)
x11
X31
x12
x13
X22
X23
X32
X33
X21 4
18
- Formulate the problem:
Minimize:
Z= 5X11+ 4 X12+ 9X13+4X21+ 10 X22+8X23+10X31+6X32+3X33
Subject to:
X11+X12+X13 = 1X21+X22+X23= 1 SUPPLYX31+X32+X33= 1
X11+X21+X31 = 1X12+X22+X32 = 1 DEMANDX13+X23+X33 = 1
The assignment problemThe assignment problem
The Assignment Problem Model- In the assignment problem there are n resources or
assignee(e.g., employee, machine) is to be assigned uniquely to a particular activity or assignment(e.g., task, job)
- There is a cost cij associated with assignee i (i = 1, 2,3, …., n) assigned (performing) assignment j (j = 1, 2, 3, ……, n)
- the objective is to determine how all the assignments should be made in order to minimize the total cost
The The Assignment ProblemAssignment Problem
19
The Assignment Problem Model- The number of assignees = the number of
assignments (tasks)- Each assignee is to be assigned to exactly one task- Each task is to be performed by exactly one assignee- The decision variable xij of assigning machine
(assignee) i to job (task) j always take a value of one or zero
The The Assignment ProblemAssignment Problem
The Assignment Problem Model
The transportation problemThe transportation problem
Cost of assigning i to j
SupplyAssignment
1 2 … n
1 c11 c12 … c1n 1
Assignee 2 c21 c22 … c2n 1
: : : : :
n cn1 cn2 … cnn 1
Demand 1 1 … 1
20
The Transportation Problem Model- Let Z represents the total assignment cost and xij (i =
1, 2, ….., n; j = 1, 2, …., n) be a binary number representing assigning machine i to job j
The transportation problemThe transportation problem
The assignment problemThe assignment problemUsing Vogel’s Approximation
21
Example:
� A cement company has four factories A, B, C, and D. Itsmajor distribution centers are located in three cities O, P, andR. The unit transportation cost from factories to thedistribution centers is as follows:
TRANSPORTATION PROBLEMTRANSPORTATION PROBLEM
Distribution CentersFactories
RPO
243A
596B
10812C
71113D
Optimality test
- The capacities of the four factories and the threedistribution centers are as follow:
� The company needs to determine the best transportationprogram which will minimize the cost of transportation.
Ch. Ch. 4 4 TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
Distribution capacity (ton)
Distribution center
Production capacity (ton)
Factory
10500O8500A
12000P11000B
7500R6000C
4500D
22
Solution
Ch. Ch. 4 4 TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
Row Diff.SupplyDistribution Centers
FactoriesRPO
18500243A
111000596B
2600010812C
4450071113D
X AP = 850075001200010500Demand
Eliminate Row A343Col. Diff.
Ch. Ch. 4 4 TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
Row Diff.SupplyDistribution Centers
FactoriesRPO
111000596B
2600010812C
4450071113D
X BO = 105007500350010500Demand
Eliminate Col. O216Col. Diff.
Row Diff.SupplyDistribution Centers
FactoriesRP
450059B
26000108C
44500711D
X BR = 50075003500Demand
Eliminate Row B21Col. Diff.
23
Solution
Ch. Ch. 4 4 TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
Row Diff.SupplyDistribution Centers
FactoriesRP
26000108C
44500711D
X DR = 450070003500Demand
Eliminate Row D33Col. Diff.
Row Diff.SupplyDistribution Centers
FactoriesRP
6000108C
X CP = 3500, X CR = 250025003500Demand
Col. Diff.
The preliminary solution
Z min= 8500 x 4 + 10500 x 6 + 500 x 5 + 3500 x 8 + 2500 x 10 + 4500 x 7 = 184000 L.E
SupplyDistribution Centers
FactoriesRPO
8500(2)
0(4)
8500(3)
0A
11000(5)
500(9)
0(6)
10500B
6000(10)
2500(8)
3500(12)
0C
4500(7)
4500(11)
0(13)
0D
75001200010500Demand
Ch. Ch. 4 4 TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
24
Test the solution
LOOP METHOD for TESTING THE SOLUTION of LOOP METHOD for TESTING THE SOLUTION of TRANSPORTATION MODELTRANSPORTATION MODEL
SupplyDistribution Centers
FactoriesRPO
8500(2)
0(4)
8500(3)
0A
11000(5)
500(9)
0(6)
10500B
6000(10)
2500(8)
3500(12)
0C
4500(7)
4500(11)
0(13)
0D
75001200010500Demand
- It is be noted that the quantity in cells XAO ,XAR ,XBP ,XCO
,XDO , and XDP have a zero value.
- To test the obtained solution, the unoccupied cell will be
tested using one unoccupied cell and the other cells are
occupied. The cost of lost chance for the unoccupied cells
will be determined.
- To check the cell AR we can catch the cells AR, AP, CP, and
CR.
LOOP METHOD for TESTING THE SOLUTION of LOOP METHOD for TESTING THE SOLUTION of TRANSPORTATION MODELTRANSPORTATION MODEL
25
Cell ARAdding of one unit to cell AR will increase the cost by + 2
Subtracting of one unit from cell AP will decrease the cost by - 4
Adding of one unit to cell CP will increase the cost by + 8
Subtracting of one unit from cell CR will decrease the cost by- 10
: :
Cost of lost chance - 4
- Testing of other unoccupied cells will give positive values or zero values to
the cost of lost chance for each unoccupied cell which mean increasing
the value of cost for positive values and the solution doesn’t change for
zero values.
LOOP METHOD for TESTING THE SOLUTION of LOOP METHOD for TESTING THE SOLUTION of TRANSPORTATION MODELTRANSPORTATION MODEL
The final solution
Z min = 6000 x 4 + 2500 x 2 +10500 x 6 + 500 x 5 + 6000 x 8 + 4500 x 7 = 174000 L.E
SupplyDistribution Centers
FactoriesRPO
8500(2)
2500(4)
6000(3)
0A
11000(5)
500(9)
0(6)
10500B
6000(10)
0(8)
6000(12)
0C
4500(7)
4500(11)
0(13)
0D
75001200010500Demand
LOOP METHOD for TESTING THE SOLUTION of LOOP METHOD for TESTING THE SOLUTION of TRANSPORTATION MODELTRANSPORTATION MODEL
26
Optimality Test
� A basic feasible solution is optimal if and only if (cij
– ui - vj) ≥ 0 for every (i, j) such that xij is a non-basic
� Thus, the only work required by the optimality test isthe derivation of the values of the ui and vj for thecurrent basic solution and then the calculation ofthese (cij – ui - vj)
� Since (cij – ui - vj) is required to be zero if xij is abasic variable, the ui and vj satisfy the set ofequations
The transportation problemThe transportation problem
Optimality Test
� cij = ui + vj for each i and j such that xij is a basicvariable
� There are (m+n–1) basic variables, and accordingly(m+n-1) equations
� The number of unknowns (ui and vj) is (m + n), oneof these variables can be assigned a value arbitrarily
� Select the ui that has the largest number of allocationsin its row and assign it the value of zero
The transportation problemThe transportation problem
27
Example:
� The following table shows the transportation cost of shippingone unit of a given product from the sources 1, 2 and 3 todestinations 1, 2, 3 and 4. The demand of each destinationand the supply of each source are also given in the table
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
DestinationsSupply
1 2 3 4
Sources
1 1 2 - 3 20
2 7 1 2 3 12
3 - 6 5 4 12
Demand 16 7 11 10
� An initial basic feasible solution for this problem wasdetermined as shown in the next table. Check if this solutionis optimal or not and if not, determine the optimal solution.
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
Destinations
1 2 3 4
Sources
1 x11=16 x12=4
2 x22=1 x23=11
3 x32=2 x34=10
28
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
1 2 3 4Suppl
yui
11 2 M 3
20 016 4
27 1 2 3
12 -11 11
3M 6 5 4
12 42 10
Demand 16 7 11 10 Z=99
vj 1 2 3 0
� Check the optimality by checking the value (cij – ui - vj) forall non-basic variables, these values should be positive orzero
� If any of these values are negative, then the solution is notoptimal and another iterative is required
� Because one of these values (c33 – u3 – v3) = -2 (negative), weconclude that, the current basic feasible solution is notoptimal. Thus, the transportation simplex method must nextgo to the iterative step to find a better basic feasible solution
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
29
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
1 2 3 4 Supply ui
11 2 M M-3 3 3
20 016 4
27 7 1 2 3 4
12 -11 11
3M M-5 6 5 -2 4
12 42 10
Demand 16 7 11 10 Z=99
vj 1 2 3 0 Not optimal
� Find an entering basic variable, a leaving basic variable andthen identifying the new basic feasible solution
� The entering basic variable must have negative (cij–ui – vj)
� If there more than one negative value exists, select the onehaving the largest absolute negative value
� In this example,x33 is the entering basic variable
� Increasing the non-basic variable from zero sets off a chainreaction of changes in other basic variables in order tocontinue satisfying the supply and demand constraints
� The basic variable to be decreased to zero becomes theleaving basic variable. Withx33 being the entering basicvariable, the chain reaction is shown in the next Table
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
30
� Find an entering basic variable, a leaving
TRANSPORTATION TRANSPORTATION PROBLEMSPROBLEMS
1 2 3 4 Supply ui
11 2 M M-3 3 3
20 016 4
27 7 1 2 3 4
12 -1+ 1 - 11
3M M-5 6 5 -2 4
12 4- 2 + 10
Demand 16 7 11 10
vj 1 2 3 0
TRANSPORTATION PROBLEMSTRANSPORTATION PROBLEMS
1 2 3 4 Supply ui
11 2 M M-3 3 1
20 016 4
27 7 1 2 3 2
12 -13 9
3M M-3 6 2 5 4
12 22 10
Demand 16 7 11 10 Z=95
vj 1 2 3 2 optimal