Professional Documents
Culture Documents
Lecture 2A
1 Taha Chapter 5
Transportation problem
Assignment problem
2 Compulsory material that is not in book:
Some modeling issues
Facility layout problem
Note
The slides contain some information that the book does not.
The book contains some information that the slides do not.
The union of both sets needs to be studied for the exam.
Given
m facilities that supply a product
n customers with demand for the product
set of distances between facilities and customers
More formally
we have sources i = 1, ..., m with supply si
we have destinations j = 1, ..., n with demand dj
we have cost cij for transporting a unit from i to j
Requirement:
m n
∑ si = ∑ dj
i =1 j =1
m n
Note that it is implicitly assumed that ∑ si = ∑ dj holds!
i =1 j =1
m n
min Z = ∑ ∑ cij xij
i =1 j =1
s.t.
n
∑ xij = si for i = 1, 2, ..., m
j =1
m
∑ xij = dj for j = 1, 2, ..., n
i =1
xij 0 for all i, j
min c11 x11 +c12 x12 + +c1n x1n +c21 x21 + +c2n x2n + +cm1 xm1 +cm2 xm2 + +cmn xmn
s.t.
m n
max W = ∑ si ui + ∑ dj vj
i =1 j =1
s.t.
ui + vj cij for i = 1, 2, ..., m, j = 1, 2, ..., n
ui , vj unrestricted
Thus the values of the slack variables of the dual are given by
ui + vj cij .
The dual slack variables form (part of) the top row of the Simplex
tableau.
We could use the Simplex method to determine the dual slack
variables. But, it can be done faster here.
Each (primal) basic variable xij should have a zero entry in the top
row after each iteration. So at that point, we have that cij = ui + vj
must hold for all basic xij (compare to book page 226).
We can solve this set of m + n equations with m + n unknown, to get
ui and vj .
Note: actually we only have m + n 1 equations (why?), so we can
freely choose one variable.
Next, when you have ui and vj , you can calculate ui + vj cij for all
nonbasic xij and …nd out which is the largest positive number, which
will identify the entering basic variable.
Note that since the primal is a "min" problem and the dual a "max"
problem, a number things reverse compared to the standard theory
outlined in previous lectures.
We are now looking for the largest positive number in the top row
instead of the smallest negative number.
The Dual now has slack variables instead of surplus variables.
Given
A number of tasks that must be performed
A number of employees that can do the tasks
Cost to complete a task (di¤ers per employee-task combination)
Goal
Find unique employee-task pairs for all tasks and all employees, such
that costs are minimized.
m=n
si = 1 for all i
dj = 1 for all j
Similarly, if not balanced, add dummies (can be plural this time!)
If f (x ) > 0, Then g (x ) 0
Equivalent to: If f (x ) > 0, Then z = 1, and, If z = 1, Then
g (x ) 0
Model as:
f (x ) Mz
g (x ) M (1 z )
z 2 f0, 1g, M large
Model as:
f1 (x ) b1 + Mz1
f2 (x ) b2 + Mz2
...
fN (x ) bN + MzN
∑N i =1 zi = N K
zi 2 f0, 1g, M large
Case 2: jf (x )j b
This can be restated as:
Either f (x ) b
Or f (x ) b
(obviously not both)
Which we can write as:
f (x ) + Mz b
f (x ) + M (1 z ) b
z 2 f0, 1g, M large
max t
s.t.
f1 ( x ) t
f2 ( x ) t
..
.
fk ( x ) t
min t
s.t.
f1 ( x ) t
f2 ( x ) t
..
.
fk ( x ) t
Parameters:
n number of departments in the problem
Decision Variable:
distance between center of department i and
xi
vertical reference line (VRL)
n 1 n
min Z = ∑ ∑ cij fij jxi xj j
i =1 j =i +1
s.t.
1
jxi xj j 2 (`i
+ `j ) + dij for i = 1, 2, ..., n 1, j = i + 1, ..., n
xi 0 for i = 1, 2, ..., n
n 1 n
min Z = ∑ ∑ cij fij jxi xj j
i =1 j =i +1
Perform replacement xi xj = xij .
Then jxi xj j = jxij j.
We know how to addres that:
jxij j = jxij+ xij j = xij+ + xij with xij+ 0, xij 0
This is usable provided xij+ xij = 0, (which is true since it is a
minimization problem).
n 1 n
min Z = ∑ ∑ cij fij (xij+ + xij )
i =1 j =i +1
However, we cannot simply stop here, because we now have lost the
connection to the original xi and xj we have in the constraints:
jxi xj j 12 (`i + `j ) + dij
Total reformulation
n 1 n
min Z = ∑ ∑ cij fij (xij+ + xij )
i =1 j =i +1
s.t.
jxi xj j 12 (`i + `j ) + dij
xi xj = xij+ xij
xi 0 for i = 1, 2, ..., n
+
xij , xij 0 for i = 1, 2, ..., n 1, j = i + 1, ..., n
n 1 n
min Z = ∑ ∑ cij fij (xij+ + xij )
i =1 j =i +1
s.t.
1
xi xj + Mzij 2 (`i + `j ) + dij i = 1, 2, ..., n 1, j = i + 1, ..., n
1
xj xi + M (1 zij ) 2 (`i + `j ) + dij i = 1, 2, ..., n 1, j = i + 1, ..., n
+
xi xj = xij xij i = 1, 2, ..., n 1, j = i + 1, ..., n
xi 0 i = 1, 2, ..., n
xij+ , xij 0 i = 1, 2, ..., n 1, j = i + 1, ..., n
zij 2 f0, 1g i = 1, 2, ..., n 1, j = i + 1, ..., n