Unit.7 Transportation and Assignment...

34
Unit.7 Transportation and Assignment Problems Xiaoxi Li EMS & IAS, Wuhan University Oct. 27, Nov. 4 2016 (week 8-9) Operations Research (Li, X.) Unit.7 Transportation and Assignment Problems Oct. 27, Nov. 4 2016 (week 8-9) 1 / 34

Transcript of Unit.7 Transportation and Assignment...

Page 1: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Unit.7 Transportation and Assignment Problems

Xiaoxi Li

EMS & IAS, Wuhan University

Oct. 27, Nov. 4 2016 (week 8-9)

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 1 / 34

Page 2: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Organization of this lecture

Contents:

Transportation Problem

The problemSolution for Phase I: North-western corner, minimum cost, VAM.Solution for Phase II: the MODI methodOther issues: unbalanced demand/supply, degeneracy, multipleoptimal solutions.

Assignment Problem

The problemSolution: the Hungarian methodUnbalanced demand/supply

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 2 / 34

Page 3: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

The Transportation Problem

A transportation problem.

Supply-demand capacities.

The transportation cost for a source-destination pair.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 3 / 34

Page 4: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Problem: how to transport from sources to destinations satisfying allthe capacity constraints, for a minimum cost?

We formulate the problem as a LP. Let xi,j be the tons of grainstransported from source i to destination j.

Min C = 6x1A +8x1B +10x1C +7x2A +11x2B +11x3B +4x3A +5x3B +12x3C

s.t.

x1A + x1B + x1C = 150 (supply 1)x2A + x2B + x2C = 175 (supply 2)x3A + x3B + x3C = 275 (supply 3)x1A + x2A + x3A = 200 (demand 1)x1B + x2B + x3B = 100 (demand 2)x1C + x2C + x3C = 300 (demand 3)xij ≥ 0, i = 1,2,3, j = A,B,C.

We observe that 150+175+275 = 200+100+300, i.e. "supply = demand".

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 4 / 34

Page 5: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

The transportation problem is summarized in the following table:

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 5 / 34

Page 6: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

A general model of transportation problem with n sources and mdestinations is (assume ∑

ni=1 si = ∑

mj=1 dj):

Min C =n

∑i=1

m

∑j=1

cijxij

s.t.

Jj=1 xij = si, ∀i = 1, ...,n (supply i)

∑Ii=1 xij = dj, ∀j = 1, ...,m (demand j)

xij ≥ 0, ∀i = 1, ...,n, ∀j = 1, ...,m,

Remark. It is a LP thus simplex method (Big-M or two-phase) worksfor it. Some streamlined simplex method can be exploited since theconstraint matrix takes a very specific form (containing only "1", "0"):

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 6 / 34

Page 7: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

In general, the solution to a transportation problem contains twophases:

Phase I: find an initial BF solution. The north-western corner,minimum cost, VAM (Vogel approximation) method.Phase II: starting from an initial BF solution, solve for an optimaltransportation. The MODI (modified distribution) method.

The streamlined method involves no artificial variables, and to find theinitial BF solution, it fixes (n+m) basic variables among xij (all othersbe nonbasic variables and equal zero) satisfying the (n+m) equations.It is equivalent to fix only (n+m−1) nonnegative variables (why?).

Methods in Phase I give different ways to find such (n+m−1)nonnegative transportations. We present them by solving the aboveexample.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 7 / 34

Page 8: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the north-western corner method

1 Start allocating the maximal capacity (minimum ofsupply/demand) to the north-western cell, i.e. x11 = min{s1,d1} isthe BV.

2 Delete column 1 (or row 1) if the column’s (or row 1’s) capacity isexhausted. Ties are broken arbitrarily.

3 Allocate the remaining maximal capacity (minimum ofsupply/demand) to the north-western cell, i.e. x12 = min{d2,s1−d1}(if d1 < s1), or x21 = min{s2,d1− s1} (if d1 > s1) is the BV.

4 ...5 At each step, allocate the remaining maximum capacity to the to

the north-western cell, and delete the exhausted column or row fornext step, ... , until all the cells are deleted.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 8 / 34

Page 9: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the north-western corner method

For the example, the order to find out all the BV’s is:

[x1A = 150] → [x2A = 50] → [x2B = 100] → [x2C = 25] → [x3C = 275].

We verify that ] BV ′s = 5 = 3+3−1, okay.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 9 / 34

Page 10: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the minimum cost method

1 Start allocating the maximal capacity (minimum ofsupply/demand) to the cell with minimal unit transportation cost,i.e. xi∗j∗ = min{si∗ ,dj∗}, where (i∗, j∗) ∈ argmin

(i,j)cij.

2 Delete the column j∗ (or row i∗) if the column’s (or row’s) capacityis exhausted. Ties are broken arbitrarily.

3 ...4 Allocate the remaining maximal capacity (minimum of

supply/demand) to the cell with minimal unit transportation cost,i.e. xi∗j∗ = min{si∗ ,dj∗}, where (i∗, j∗) ∈ argmin

(i,j) not deletedcij.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 10 /

34

Page 11: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the minimum cost method

For the example, the order to find out all the BV’s is:

[x3A = 200] → [x3B = 75] → [x1B = 25] → [x1C = 125] → [x2C = 175].

We verify that ] BV ′s = 5 = 3+3−1, okay.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 11 /

34

Page 12: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the VAM (Vogal approximation method)

Compute a penalty cost vj for each column j and ui for each row i:it is equal to the difference between the two smallest unit costswithin the column or row.

Allocate the remaining maximal capacity (minimum ofsupply/demand) to the cell with minimum unit transportation costwithin the row or column that has the largest penalty cost, i.e.xi∗j∗ = min{si∗ ,dj∗}, where vj∗ = max{ui,vj|i, j} and ci∗j∗ = min{cij∗ |i},or ui∗ = max{ui,vj|i, j} and ci∗j∗ = min{ci∗j|j}.

In the example: the initial allocation is x2A = 175.Operations Research (Li, X.) Unit.7 Transportation and Assignment Problems

Oct. 27, Nov. 4 2016 (week 8-9) 12 /34

Page 13: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase I: the VAM (Vogal approximation method)

Delete the column j∗ (or row i∗) if the column’s (or row’s) capacityis exhausted. Ties are broken arbitrarily.Re-compute the penalty cost ui,vj, and look for the next allocation.... Repeat until all the cells are deleted.

For the example, the order to find out all the BV’s is:

[x2A = 175] → [x3B = 100] → [x3A = 25] → [x1C = 150] → [x3C = 150].

We verify that ] BV ′s = 5 = 3+3−1, okay.Operations Research (Li, X.) Unit.7 Transportation and Assignment Problems

Oct. 27, Nov. 4 2016 (week 8-9) 13 /34

Page 14: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase II: the MODI (modified distribution) method

Fix an initial BF solution, thus allocations of the (n+m−1) BV’s.A "legitimate move" is represented by a directed arrow from oneallocation (BV) to another within the same column or row.A "loop" is a sequence of legitimate moves forming a circle.

ClaimThe initial BF solution obtained from the north-western corner,minimum cost, or the VAM method in Phase I contains no loop.

Examples of "loop" and "non-loop".

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 14 /

34

Page 15: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Phase II: the MODI (modified distribution) method

At each step,First, compute the quantities Ui for each row i, Vj for each columnj, and Kij for each un-allocated cell (non BV) (i, j) as follows:

Ui +Vj = cij for each allocated cell (BV) (i, j);set U1 = 0;Kij = cij−Ui−Vj for each un-allocated cell (non BV) (i, j).

K1A = 6−0−7 =−1; K2A =−1; K2B =+2; K3C =+5.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 15 /

34

Page 16: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Next, do the "optimality test": the current BF solution if optimal iff .

δ := min{Kij|(i, j) not allocated} ≥ 0.

In the example, δ = K1A = K2A =−1 < 0, thus not optimal.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 16 /

34

Page 17: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

If it is not optimal (i.e. δ < 0), look for a new BF solution with theso called modified distribution method (on an auxiliary loop).

Let (i∗, j∗) be a un-allocated cell with Ii∗j∗ = δ < 0.Put (i∗, j∗) as a candidate cell to be allocated in the next BF solution.It is true that a loop now exists including (i∗, j∗) as an allocation cell.Label "+1" for (i∗, j∗), and alternatively "−1", "+1", "−1" ... on cellsalong the loop.Let ∆≥ 0 be the smallest allocation of the "−1"-labeled cells on thisloop except (i∗, j∗). Then modify the cells’ allocations on this loop by

increasing ∆ for "+1"-labeled;decreasing ∆ for "−1"-labeled.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 17 /

34

Page 18: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

In the example δ = K1A = K2A =−1 < 0, we may choose either cell(1,A) or (2,A) as a new allocation. Say (1,A).

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 18 /

34

Page 19: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

For the example,We observe that the loop is: (x1A = 0,+1)→ (x1B = 25,−1)→(x3B = 75,+1)→ (x3A = 200,−1)→ (x1A = 0,+1).Since 25 = min{25,200} is the minimum allocation among"−1"-labeled cells, thus the modified allocation is: (x1A = 25,+1)→(x1B = 0,−1)→ (x3B = 100,+1)→ (x3A = 175,−1)→ (x1A = 25,+1).x1A is the entering variable and x1B is the leaving variable.The new BF solution is:

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 19 /

34

Page 20: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

At each step, after solving the new BF solution, we re-do thecomputations as above:

Ui,Vj,Kij→ optimality test→modified distributions.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 20 /

34

Page 21: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

For the example,the values of Ui,Vj,Kij in the second iterations are

K1B = 8−0−7 =+1; K2A = 0; K2B =+3; K3C =+4.δ ≥ 0, so the current BF solution is optimal.To conclude:

the optimal transportation isx∗1A = 25, x∗1C = 125, x∗2C = 175, x∗3A = 175, x∗3B = 100.the optimal transportation cost is:C∗ = 6×25+10×125+11×175+4×175+5×100 = 4525.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 21 /

34

Page 22: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Transportation problem: unbalanced supply/demand

If "demand > supply": add a dummy source with a capacity∑j dj−∑i si, and put a cost 0 for all transportations departing fromit. A positive transportation to a destination implies an excessivedemand (not satisfied) there.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 22 /

34

Page 23: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Transportation problem: unbalanced supply/demand

If "demand < supply": add a dummy destination with a capacity∑i si−∑j dj, and put a cost 0 for transportation arriving at it. Apositive transportation from a source implies an excessive supply(not distributed) there.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 23 /

34

Page 24: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Degeneracy

To avoid degeneracy, i.e. ] BV ′s < m+n−1, when using any method inPhase I, at each time we find a BV (cell with positive allocation), wedelete either the column or the row, but never the two together even ifat the cell "demand=supply".

An example:

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 24 /

34

Page 25: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Multiple Optimal Solutions

Multiple optimal solutions exist when applying the MODI method inPhase II, at optimality, some un-allocated cell (i, j) has Kij = 0. Thentreating (i, j) as a candidate cell to be allocated in the next BF solution,we obtain another optimal solution.

Example.

K1B = 8−0−7 =+1; K2A = 0; K2B =+3; K3C =+4.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 25 /

34

Page 26: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Multiple Optimal Solutions

It is optimal (check!) with the same optimal transportation cost 4525.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 26 /

34

Page 27: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Assignment problem

An assignment problem is a special transportation problem withequal quantity of sources and destinations;a unit capacity for each source or demand.

For an example:

c(i, j) [C1] [C2] [C3] [C4] [C5]

(L1) 3 4 5 4 6(L2) 4 5 2 3 6(L3) 5 1 6 5 1(L4) 6 7 7 10 8(L5) 4 5 3 5 6

where c(i, j) is the assignment (transportation) cost from source i todestination j.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 27 /

34

Page 28: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Assignment Problem: the Hungarian Algorithm

We use the so-called Hungarian Algorithm to solve the problem.

Step I. Compute ¯̄c(i, j) for each component (i, j).

first, for each line (Li), subtract from each c(i, j) the minimumnumber in this line i.e., c̄(i, j) = c(i, j)−minj c(i, j);next, for each column (Cj), subtract from each (new!) c̄(i, j) theminimum number (new!) in this line, i.e., ¯̄c(i, j) = c̄(i, j)−mini c̄(i, j).

This gives us the table of "reduced" cost:

¯̄c(i, j) [C1] [C2] [C3] [C4] [C5]

(L1) 0 1 2 0 3(L2) 2 3 0 0 4(L3) 4 0 5 3 0(L4) 0 1 1 3 2(L5) 1 2 0 1 3

Operations Research (Li, X.) Unit.7 Transportation and Assignment Problems

Oct. 27, Nov. 4 2016 (week 8-9) 28 /34

Page 29: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Step II. Cover all the "0" with a min. number of lines+columns.

How to cover? A simple rule: trying all the possibilities.Check: if this minimum covering number is

equal to the total capacity, go to Step IV to find an optimal solution;less than total capacity, then continue with Step III.

Below is a particular covering (of minimum number):

c(i,j) [C1] [C2] [C3] [C4] [C5]

(L1) 0 1 2 0 3(L2) 2 3 0 0 4(L3) 4 0 5 3 0(L4) 0 1 1 3 2(L5) 1 2 0 1 3

[Red =covered by a line; Blue= covered by a column; Red+ Blue=Purple=covered by both a line and by a column]The minimum number is 4 < 5, the number of total capacity, thus not optimal.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 29 /

34

Page 30: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Step III: revise ¯̄c(i, j) to a new ¯̄c′(i, j) as follows:

first define ∆ = min(i,j){ ¯̄c(i, j)|(i, j) not covered by any line or row}> 0;next define

¯̄c′(i, j) = ¯̄c(i, j)−∆, for (i, j) uncovered by neither a column nor a line;¯̄c′(i, j) = ¯̄c(i, j), for (i, j) or (i, j) covered by a single column or line;¯̄c′(i, j) = ¯̄c(i, j)+∆, for (i, j) covered both by a column and a line.

Here, ∆ = min{1,3,1,2,3,4,2,3}= 1, so the revised table of cost ¯̄c(i, j) is:

¯̄c(i, j) [C1] [C2] [C3] [C4] [C5]

(L1) 0 0 2 0 2(L2) 2 2 0 0 3(L3) 5 0 6 4 0(L4) 0 0 1 3 1(L5) 1 1 0 1 2

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 30 /

34

Page 31: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Re-do Step II’ (if minimum covering number < total capacity)

We shall re-do Step II bycovering all the "zeros" in the revised table of cost ¯̄c(i, j) by a minimumnumber of lines and columns;

and checking the optimality condition (minimum number = total capacity).

Here we need at least 5 lines and columns for this covering (verify!).So we pass to Step IV to find out an optimal solution (assignment).

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 31 /

34

Page 32: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Step IV. Find out the optimal solution (assignment) for the above tableof cost where the minimum covering number = the total capacity 5.

The optimal solution (assignment) is to consider all (i, j) with ¯̄c(i, j) = 0 ascandidates (i.e., possibly assign i to j by setting X∗(i, j) = 1). A procedure:

Round 1. Choose the line(s)/column(s) containing only one "zero", andmake the corresponding allocation(s).

Here, we have ¯̄c(5,3) = 0 the only zero in line (L5) and ¯̄c(3,5) = 0 the only zeroin column (C5). =⇒ Make X∗(5,3) = X∗(3,5) = 1. The remaining sub-matrix is:

¯̄c(i, j) [C1] [C2] × [C4] ×(L1) 0 0 × 0 ×(L2) 2 2 × 0 ×× × × × × ×(L4) 0 0 × 3 ×× × × × × ×

Operations Research (Li, X.) Unit.7 Transportation and Assignment Problems

Oct. 27, Nov. 4 2016 (week 8-9) 32 /34

Page 33: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

Round 2. Remove the corresponding lines/columns that have beenallocated, and re-do Round 1 with the remaining sub-matrix.

Here, we shall assign X∗(2,4) = 1 because now there is only one zero inline (L2).

... Repeat the above procedure until allocation is over or eachline/column contains multiple allocations.

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 33 /

34

Page 34: Unit.7 Transportation and Assignment Problemsxiaoxili.weebly.com/.../transportation_and_assignment_problems.pdf · The Transportation Problem A transportation problem. Supply-demand

The remaining sub-matrix is:

¯̄c(i, j) [C1] [C2] × × ×(L1) 0 0 × × ×× × × × × ×× × × × × ×(L4) 0 0 × × ×× × × × × ×

Round n. At some point, in the remaining sub-matrix, there are morethan two zeros in each line/column. Assign arbitrarily one (and only one)zero to each line and to each column.

Here, we can assign X∗(1,1) = 1 = X∗(4,2) or X∗(1,2) = 1 = X∗(4,1).

Conclusion: an optimal assignment is{X∗(i, j) = 1, for (i,j)=(1,1), (2,4), (3,5), (4,2) and (5,3);X∗(i, j) = 0, for other (i,j).

Operations Research (Li, X.) Unit.7 Transportation and Assignment ProblemsOct. 27, Nov. 4 2016 (week 8-9) 34 /

34