Assignment
-
Upload
chandni-chhabra -
Category
Documents
-
view
1.100 -
download
1
Transcript of Assignment
Assignment problemsAssignment problemsOperational Research- Operational Research-
Level 4Level 4
Prepared by T.M.J.A.CoorayPrepared by T.M.J.A.Cooray
Department of MarthematicsDepartment of Marthematics
MA 402--assignment problemMA 402--assignment problem 22
Introduction Introduction
This is a special type of transportation This is a special type of transportation problem in which each source should have problem in which each source should have the capacity to fulfill the demand of any of the capacity to fulfill the demand of any of
the destinations.the destinations. In other words any operator would be able In other words any operator would be able
perform any job regardless of his perform any job regardless of his skills,although the cost( or the time taken) skills,although the cost( or the time taken) will be more if the job does not match with will be more if the job does not match with
operator’s skill.operator’s skill.
MA 402--assignment problemMA 402--assignment problem 33
Let Let m be the number of jobsm be the number of jobs as well as as well as the operatorsthe operators, , and and ttijij be the processing time of the job i if it is assigned be the processing time of the job i if it is assigned
to the operator j.to the operator j. Here the objective is to assign the jobs Here the objective is to assign the jobs to the operators such that the total processing time is to the operators such that the total processing time is
minimizedminimized.. OperatorsOperators
JobJob
11 22 …… jj …… mm
11 tt1111 tt1212 tt1j1j tt1m1m
22
..
ii tti1i1 ttijij ttimim
..
mm ttm1m1 ttm2m2 ttmjmj ttmmmm
General format of assignment problem
MA 402--assignment problemMA 402--assignment problem 44
Examples of assignment problemExamples of assignment problem
Row entityRow entity Column entityColumn entity Cell entityCell entity
jobsjobs operatorsoperators Processing timeProcessing time
Programmer Programmer programprogram Processing timeProcessing time
operatorsoperators machinemachine Processing timeProcessing time
Drivers Drivers RoutesRoutes Travel timeTravel time
Teachers Teachers Subjects Subjects Students pass Students pass percentage percentage
MA 402--assignment problemMA 402--assignment problem 55
Assignment problem as a zero-one Assignment problem as a zero-one ( Binary) programming problem .( Binary) programming problem .
Min Z= cMin Z= c1111xx1111++c++cijijXXijij+.+c+.+cmmmmXXmm mm ==
Subject to xSubject to x1111+…………...+x+…………...+x1m1m =1 =1 xx2121+…………...+x+…………...+x2m2m =1 =1 …… …….... xxm1m1+…………...+x+…………...+xmmmm =1 =1 xx1111+…………...+x+…………...+xm1m1 =1 =1 xx1212+…………...+x+…………...+xm2m2 =1 =1 ……………… ……………….... xx1m1m+…………...+x+…………...+xmmmm =1 =1 xxijij.=0 or 1 .=0 or 1 for i=1,2….m and j=1,2…..m.for i=1,2….m and j=1,2…..m.
mjforX
miforX
XCZMin
m
iij
m
jij
m
i
m
jijij
,....11
,....11
1
1
1 1
MA 402--assignment problemMA 402--assignment problem 66
Types of assignment problemsTypes of assignment problems
As in transportation problems assignment As in transportation problems assignment problems also can be balanced ( with equal problems also can be balanced ( with equal number of rows and columns) or unbalanced.number of rows and columns) or unbalanced.
When it is unbalanced the necessary number When it is unbalanced the necessary number of row/s or column/s are added to balance it. of row/s or column/s are added to balance it. That is to make a square matrix.That is to make a square matrix.
The values of the cell entries of the dummy The values of the cell entries of the dummy rows or columns will be made equal to zero.rows or columns will be made equal to zero.
MA 402--assignment problemMA 402--assignment problem 77
Example : AExample : Assign the 5 operators to the 5 ssign the 5 operators to the 5 jobs such that the total processing time is jobs such that the total processing time is minimized.minimized.
OperatorOperator
jobjob11 22 33 44 55
11 1010 1212 1515 1212 88
22 77 1616 1414 1414 1111
33 1313 1414 77 99 99
44 1212 1010 1111 1313 1010
55 88 1313 1515 1111 1515
MA 402--assignment problemMA 402--assignment problem 88
Hungarian methodHungarian method
Consists of two phases.Consists of two phases. First phase:First phase: row reductions and column row reductions and column
reductions are carried out.reductions are carried out. Second phaseSecond phase :the solution is optimized in :the solution is optimized in
iterative basis.iterative basis.
MA 402--assignment problemMA 402--assignment problem 99
Phase 1: Row and column Phase 1: Row and column reductionsreductions
Step 0:Step 0: Consider the given cost matrix Consider the given cost matrix Step 1:Step 1: Subtract the minimum value of Subtract the minimum value of
each row from the entries of that row, to each row from the entries of that row, to obtain the next matrix.obtain the next matrix.
Step 2Step 2: Subtract the minimum value of : Subtract the minimum value of each column from the entries of that each column from the entries of that column , to obtain the next matrix.column , to obtain the next matrix.
Treat the resulting matrix as the input Treat the resulting matrix as the input for phase 2.for phase 2.
MA 402--assignment problemMA 402--assignment problem 1010
Phase 2: OptimizationPhase 2: Optimization Step3:Step3: Draw a minimum number of lines to cover Draw a minimum number of lines to cover
all the zeros of the matrix.all the zeros of the matrix. Procedure for drawing the minimum number of Procedure for drawing the minimum number of
lines:lines: 3.1 Row scanning3.1 Row scanning
1 Starting from the first row ,if there’s 1 Starting from the first row ,if there’s only one zeroonly one zero in a row mark a square round the zero entry and in a row mark a square round the zero entry and draw a vertical line passing through that zero. draw a vertical line passing through that zero. Otherwise skip the row.Otherwise skip the row.
2.After scanning the last row, check whether all the 2.After scanning the last row, check whether all the zeros are covered with lines. If yes go to step 4. zeros are covered with lines. If yes go to step 4. Otherwise do column scanning. CtdOtherwise do column scanning. Ctd
MA 402--assignment problemMA 402--assignment problem 1111
3.2 Column scanning3.2 Column scanning..
1. Starting from the first column: if there’s 1. Starting from the first column: if there’s only one zeroonly one zero in a column mark a in a column mark a square round the zero entry and draw a square round the zero entry and draw a horizontal line passing through that horizontal line passing through that zero. otherwise skip the column.zero. otherwise skip the column.
2.After scanning the last column, check 2.After scanning the last column, check whether all the zeros are covered with whether all the zeros are covered with lines. If yes go to step 4. Otherwise do lines. If yes go to step 4. Otherwise do row scanning. ctd row scanning. ctd
MA 402--assignment problemMA 402--assignment problem 1212
Step 4:Step 4: check whether the number of squares marked check whether the number of squares marked is equal to the number of rows/columns of the matrix. is equal to the number of rows/columns of the matrix.
If yes go to step 7. Otherwise go to step 5.If yes go to step 7. Otherwise go to step 5. Step 5:Step 5: Identify the minimum value of the undeleted Identify the minimum value of the undeleted
cell values ,say ‘x’. Obtain the next matrix by the cell values ,say ‘x’. Obtain the next matrix by the following steps.following steps.
5.1 5.1 Copy the entries covered by the lines ,but not on Copy the entries covered by the lines ,but not on the intersection points.the intersection points.
5.2 5.2 add x to the intersection points add x to the intersection points
5.35.3 subtract x from the undeleted cell values. subtract x from the undeleted cell values.
Step 6:Step 6: go to step 3. go to step 3.
Step 7:Step 7: optimal solution is obtained as marked by the optimal solution is obtained as marked by the squares squares
MA 402--assignment problemMA 402--assignment problem 1313
Maximization problem Maximization problem
If the problem is a maximization If the problem is a maximization problem ,problem ,convert the problem into a convert the problem into a minimization problem by multiplying by -1.minimization problem by multiplying by -1.
Then apply the usual procedure of an Then apply the usual procedure of an assignment problem.assignment problem.
MA 402--assignment problemMA 402--assignment problem 1414
Example : Example : Assign 4 sales persons to four Assign 4 sales persons to four different sales regions such that the total different sales regions such that the total
sales is maximized.sales is maximized.
Sales Sales regionregion
Sales personSales person
11 22 33 44
11 1010 2222 1212 1414
22 1616 1818 2222 1010
33 2424 2020 1212 1818
44 1616 1414 2424 2020
MA 402--assignment problemMA 402--assignment problem 1515
Modified data , after multiplying the cell Modified data , after multiplying the cell entries by -1.entries by -1.
Sales Sales regionregion
Sales personSales person
11 22 33 44
11 -10-10 -22-22 -12-12 -14-14
22 -16-16 -18-18 -22-22 -10-10
33 -24-24 -20-20 -12-12 -18-18
44 -16-16 -14-14 -24-24 -20-20
MA 402--assignment problemMA 402--assignment problem 1616
After step 1After step 1
Sales Sales regionregion
Sales personSales person
11 22 33 44
11 1212 00 1010 88
22 66 44 00 1212
33 00 44 1212 66
44 88 1010 00 44
MA 402--assignment problemMA 402--assignment problem 1717
After step 2After step 2
Sales Sales regionregion
Sales personSales person
11 22 33 44
11 1212 00 1010 44
22 66 44 00 88
33 00 44 1212 22
44 88 1010 00 00
MA 402--assignment problemMA 402--assignment problem 1818
Phase 2Phase 2
Sales Sales regionregion
Sales personSales person
11 22 33 44
11 1212 00 1010 44
22 66 44 00 88
33 00 44 1212 22
44 88 1010 00 00
MA 402--assignment problemMA 402--assignment problem 1919
Note that the number of squares is equal to the Note that the number of squares is equal to the number of rows of the matrix. solution is feasible number of rows of the matrix. solution is feasible and optimal.and optimal.
Result:Result: Salesman Salesman Sales region Sales region Sales Sales
11 22 2222
22 33 2222
33 11 2424
44 44 2020
MA 402--assignment problemMA 402--assignment problem 2020
Branch and Bound algorithm for the assignment Branch and Bound algorithm for the assignment problemproblem
Terminology:Terminology: K-level number in the branching treeK-level number in the branching tree For root node k=0For root node k=0 --assignment made in the current node of a branching treeassignment made in the current node of a branching tree
PPk k –assignment at level k of the branching tree–assignment at level k of the branching tree
A-set of assigned cells up to the node PA-set of assigned cells up to the node Pk k from the from the
root node root node VV
- - lower bound of partial assignment A up to Plower bound of partial assignment A up to Pk k
Such that VSuch that V = =
Aji Xi Yjij CC
,
min
MA 402--assignment problemMA 402--assignment problem 2121
CCijij is the cell entity of the cost matrix is the cell entity of the cost matrix
X rows which are not deleted up to node PX rows which are not deleted up to node Pk k
from the root node in the branching tree.from the root node in the branching tree. Y columns which are not deleted up to node Y columns which are not deleted up to node
PPk k
from the root node in the branching tree.from the root node in the branching tree.
MA 402--assignment problemMA 402--assignment problem 2222
Branching guidelines Branching guidelines
1.At level k,the row marked as k of the 1.At level k,the row marked as k of the assignment problem,will be assigned with assignment problem,will be assigned with the best column of the assignment problem.the best column of the assignment problem.
2.if there is a lower bound ,then the terminal 2.if there is a lower bound ,then the terminal node at the lower most level is to be node at the lower most level is to be considered for further branchingconsidered for further branching
3.stopping rule:if the minimum lower bound 3.stopping rule:if the minimum lower bound happens to be at any one of the terminal happens to be at any one of the terminal nodes at the (n-1)nodes at the (n-1)thth level ,the optimality is level ,the optimality is reached.reached.
MA 402--assignment problemMA 402--assignment problem 2323
OperatorOperator
jobjob11 22 33 44 55
11 1010 1212 1515 1212 88
22 77 1616 1414 1414 1111
33 1313 1414 77 99 99
44 1212 1010 1111 1313 1010
55 88 1313 1515 1111 1515
Example : AExample : Assign the 5 operators to the 5 ssign the 5 operators to the 5 jobs such that the total processing time is jobs such that the total processing time is minimized.minimized.
MA 402--assignment problemMA 402--assignment problem 2424
P0
P121 P13
1 P141 P15
1 P111
}5,4,3,2{},5,4,3,2{)},11{()},11{(
111
YXA
Pforboundlower
49)1110711(10
)min(5,4,3,2 5,4,3,2
1111
i j
ijCcV
51 44 49 44 40
MA 402--assignment problemMA 402--assignment problem 2525
P0
P121 P13
1 P141 P15
1 P111
}4,3,2{},5,4,3{)},15(),21{()},21{(
221
YXA
Pforboundlower
43)11107(78
)min(5,4,3 4,3,2
211521
i j
ijCccV
49 44 49 44 40
P212 P23
2 P242 43
50P222 49 47
MA 402--assignment problemMA 402--assignment problem 2626
P0
P121 P13
1 P141 P15
1 P111
49 44 49 44 40
P212 P23
2 P242 43
50P222 49 47
P323 P33
3 P343 51 43 47
P424 P44
4 43 48
MA 402--assignment problemMA 402--assignment problem 2727
The optimum allocation will be The optimum allocation will be Job operator time Job operator time 1 5 81 5 8 2 1 72 1 7 3 3 73 3 7 4 2 104 2 10 5 4 115 4 11 4343
MA 402--assignment problemMA 402--assignment problem 2828
OperatorOperator
jobjob11 22 33 44 55
11 1010 1212 1515 1212 88
22 77 1616 1414 1414 1111
33 1313 1414 77 99 99
44 1212 1010 1111 1313 1010
55 88 1313 1515 1111 1515
Example :ROW SCANNING.Example :ROW SCANNING.
MA 402--assignment problemMA 402--assignment problem 2929
OperatorOperator
jobjob11 22 33 44 55
11 1010 1212 1515 1212 88
22 77 1616 1414 1414 1111
33 1313 1414 77 99 99
44 1212 1010 1111 1313 1010
55 88 1313 1515 1111 1515
Example : Assign the 5 operators to the 5 jobs Example : Assign the 5 operators to the 5 jobs such that the total processing time is such that the total processing time is minimized.minimized.
MA 402--assignment problemMA 402--assignment problem 3030
OperatorOperator
jobjob11 22 33 44 55
11 22 44 77 44 00
22 00 99 77 77 44
33 66 77 00 22 22
44 22 00 11 33 00
55 00 55 77 44 88
Example : Assign the 5 operators to the 5 jobs Example : Assign the 5 operators to the 5 jobs such that the total processing time is such that the total processing time is minimized.minimized.
MA 402--assignment problemMA 402--assignment problem 3131
OperatorOperator
jobjob11 22 33 44 55
11 22 44 77 22 00
22 00 99 77 55 44
33 66 77 00 00 22
44 22 00 11 11 00
55 00 55 77 22 88
Example : Assign the 5 operators to the 5 jobs Example : Assign the 5 operators to the 5 jobs such that the total processing time is such that the total processing time is minimized.minimized.
MA 402--assignment problemMA 402--assignment problem 3232
OperatorOperator
jobjob11 22 33 44 55
11 22 44 66 11 00
22 00 99 66 44 44
33 77 88 00 00 33
44 22 00 00 00 00
55 00 55 66 11 88
Example : Assign the 5 operators to the 5 jobs Example : Assign the 5 operators to the 5 jobs such that the total processing time is such that the total processing time is minimized.minimized.