Beruflich Dokumente
Kultur Dokumente
Martin Moehl Dr. Parisay IE 416 Hw#6 9 November, 2010 HW#6 Page 75, problem 1: branch on full-Thurs and then full-Sat a) Using LP option of WinQSB and creating the branch-and-bound tree up to two levels as assigned. Document input and output for each subproblem. b) Using ILP option of WinQSB solve the problem. Dr. Parisays comments are in red. Problem Statement In the post office example, suppose that each full-time employee works 8 hours per day. Thus, Mondays requirement of 17 workers may be viewed as a requirement of 8(17) = 136 hours. The post office may meet its daily labor requirements by using both full-time and part-time employees. During each week, a full-time employee works 8 hours a day for five consecutive days, and part-time employee works 4 hours a day for five consecutive days. A full-time employee costs the post office $15 per hour, whereas a part-time employee (with reduced fringe benefits) costs the post office only $10 per hour. Union requirements limit part-time labor to 25% of weekly labor requirements. Formulate an LP to minimize the post offices weekly labor costs. Tables Here is the table from the original Post Office Problem:
Employee Requirements for the Post Office Day Number of Full-time Employees Required 1= 17 Monday 2= 13 Tuesday 3= 15 Wednesda y 4= 19 Thursday 5 = Friday 14 6= 16 Saturday 7= 11 Sunday
Moehl 2
Given that each full time shift is 8 hours, we can calculate the required hours needed for each day. This is done by multiplying the number of employees needed each day by eight. Doing this produces the following table: Hour Requirements for the Post Office Work Day Number of Labor Hours Required 1 = Monday 136 2 = Tuesday 104 3= 120 Wednesday 4 = Thursday 152 5 = Friday 112 6 = Saturday 128 7 = Sunday 88 It is also beneficial to have a table comparing Full-time workers to Part-Time workers. This table is as follows: Full-Time and Part-Time Comparison Hours/ Rate/H Constraint Day our Work 5 consecutive days 8 $15 With 2 consecutive days off Work 5 consecutive days With 2 consecutive days 4 $10 off Can only be 25% of total labor hours
Category Full-Time
PartTime
Decision Variables At this point it is necessary to define the decision variables. There should be a decision variable for both Full-Time and Part-Time workers for each day of the week employees start work, since the number of each is flexible within the constraints of the problem statement. The decision variables are as follows: Decision Variables Description
2
Decision Variable
Moehl 3
FT1 FT2 FT3 FT4 FT5 FT6 FT7 PT1 PT2 PT3 PT4 PT5 PT6 PT7
Number of Full-Time employees starting on Monday Number of Full-Time employees starting on Tuesday Number of Full-Time employees starting on Wednesday Number of Full-Time employees starting on Thursday Number of Full-Time employees starting on Friday Number of Full-Time employees starting on Saturday Number of Full-Time employees starting on Sunday Number of Part-Time employees starting on Monday Number of Part-Time employees starting on Tuesday Number of Part-Time employees starting on Wednesday Number of Part-Time employees starting on Thursday Number of Part-Time employees starting on Friday Number of Part-Time employees starting on Saturday Number of Part-Time employees starting on Sunday
Objective Function At this point it is easy to produce an objective function. The goal of the objective function is to minimize cost based one how many Full-Time and Part-Time hours are worked each day. Based on this concept the basic formula becomes:
By plugging in the actual Decision Variables, the following objective function is created:
Moehl 4
Constraints By thinking about the problem by which day employees would work depending on which days they start, the following summary table can be produced:
Full-Time W ed ne sd ay Part-Time
Full-Time T hu rs da y Part-Time
Full-Time S at ur da y Part-Time X2 F X3 F X4 F X5 F X6 F X2 P X3 P X4 P X5 P X6 P
Full-Time M on da y Part-Time
Full-Time T ue sd ay Part-Time
Type of Employee Start Mon General Em ployee S chedule Start Tue Start Wed Start Thu Start Fri Start Sat Start Sun
X1 F
X1 P
X1 F X2 F
X1 P X2 P
X1 F X2 F X3 F
X1 P X2 P X3 P
X1 F X2 F X3 F X4 F
X1 P X2 P X3 P X4 P
X1 F X2 F X3 F X4 F X5 F
X1 P X2 P X3 P X4 P X5 P X3 F X4 F X5 F X6 F X3 P X4 P X5 P X6 P
X4 F X5 F X6 F
X4 P X5 P X6 P X5 F X6 F X5 P X6 P X6 F X6 P X7 F X7 P 8(XF1 +XF2 + XF3 +XF6 + XF7) +4(XP1 + XP2 +XP3 + XP6 +XP7) 120
X7 F X7 P 8(XF1 +XF4 + XF5 +XF6 + Sum of XF7) +4(XP1 + Employees XP4 +XP5 + XP6 +XP7) Min Labor Hours Per Day 136
X7 F X7 P 8(XF1 +XF2 + XF5 +XF6 + XF7) +4(XP1 + XP2 +XP5 + XP6 +XP7) 104
X7 F X7 P 8(XF1 +XF2 + XF3 +XF4 + XF7) +4(XP1 + XP2 +XP3 + XP4 +XP7) 152
8(XF1 +XF2 + XF3 +XF4 + XF5) +4(XP1 + XP2 +XP3 + XP4 +XP5) 112
X7 F X7 P 8(XF2 +XF3 + 8(XF3 +XF4 + XF4 +XF5 + XF5 +XF6 + XF6) + 4(XP2 + XF7) +4(XP3 + XP3 + + XP4 XP4 +XP5 + XP5 +XP6) XP6 +XP7) 128 88
*this table was copied from the group that previously solved this problem for homework. This table shows how the total hours per day is the summation of all people working that day as defined by the day they work. Since workers can only work five consecutive days, they will have the sixth and seventh day of the week from they day they started off. Note that when summing hours, the constraints for Fulltime workers is multiplied by 8 since such workers work 8 hours per shift. Similarly constraints for Part-Time employees are multiplied by 4 since they only work for hours per shift. Based on this table, the following constraints are derived: Constraint Equations Demand of Labor S.T. Equations
4
Day
Full-Time S un da y Part-Time
Moehl 5
Note that the problem specifies that the total amount of Part-Time Labor can only be 25% of the total labor. This means that part time labor hours divided by total labor hours cannot be more than 0.25. We can write this as a general equation:
This Constraint will satisfy the rule that Part-Time workers can only work 25% of the total required hours. The only last constraint that must be specified is the sign constraint for all decision variables. It can be formulated as:
Moehl 6
Moehl 7
Initial WinQSB Input At this point the problem can be inputted into WinQSB, as the objective function and all constraints are defined. First the problem will be solved using the regular linear program solving method. After WinQSB finds a solution we will try to produce an integer solution using a branch-and-bound tree. We will first branch off of an integer value for Full Time Thursday Employment. After that we will branch off of Full-Time employment for Saturday Employment. The initial input into WinQSB is as follows:
Moehl 8
Moehl 9
Note: This solution is different from the one posted on web site before. In that solution Z=12350!!! Assuming this solution is correct, the rest is correct. The next step was to bound Thursdays value to 4 employees or less. The WinQSB Input was as follows: Notice that the added constraint is: FT4=<4
Moehl10
At this point Saturday was inspected. First the value was set low and bound to 3 employees or less. The input was as follows: Notice that the added constraints are: FT4=<4, FT6=<3
10
Moehl11
After this the output for Saturday was set to 4 employees or more. The input was this: Notice that the added constraints are: FT4=<4, FT6=>4
Note that this made the value for Saturday become much less than 4. This shows that at each branch the output can change drastically.
11
Moehl12
At this point we need to go back to the first branch at Thursday, and set it to the higher integer. To do this we create a constraint that states it must be greater than or equal to 5. The input was as follows: Notice that the added constraint is: FT4=>5
12
Moehl13
13
Moehl14
At this point Saturday was once again selected. It was first set to 3 employees or less. The input was as follows: Notice that the added constraints are: FT4=>5, FT6=<3
14
Moehl15
Next the value for Saturday was set to the higher integer. It was set to 4 employees or more. The input was as follows: Notice that the added constraints are: FT4=>5, FT6=>4
15
Moehl16
Note that on every one of the previously explored outputs there are alternative solutions. This means that this problem is a very open ended one. For the sake of demonstrating the branch-and-bound concept, one iteration of each solution is enough.
16
Moehl17
All of this input and output from WinQSB can be confusing. For that reason, the following visual branch and bound breakdown was arranged.
Node 1: Initial Values Z=12,761.90 FT1=6.3,FT2=5.00,FT 3=0.3, FT4=4.1,FT6=3.3,PT4 =6.4 (FT4,FT7,PT1,PT2, PT3,PT5,PT6,PT7)=0 FT4 FT4 Node 2: Full-Thurs Node 5: Full-Thurs 5 4 Low High Z=12,800.00 Z=12,761.90 FT1=6.0,FT2=5.40,FT FT1=6.3,FT2=4.5,FT4 4=4.0, =5.0, FT5=0.2,FT6=3.2,FT7 FT6=3.3,PT2=1.0,PT3 =0.4, =0.7 PT4=6.4 PT4=4.7 (FT3,PT1,PT2,PT3, (FT3,FT5,FT7,PT1, PT5,PT6,PT7)=0 PT5,PT6,PT7)=0 FT6 FT6 FT6 FT6 Node 3: Full-Sat Node 6: Full3 3 4 4 Low SatLow Z=12,827.59 Z=12,761.90 FT1=6.0,FT2=5.5,FT4 FT1=6.3,FT2=4.8,FT4 =4.0, =5.0, FT5=0.4,FT6=3.0,FT7 FT6=3.0,PT2=0.4,PT3 =0.5, =0.7 PT4=6.2,PT6=0.2 PT4=4.7,PT6=0.7 (FT3,PT1,PT2, (FT3,FT5,FT7, Node 7: Full-Sat Node 4: Full-Sat PT3,PT5,PT7)=0 PT1,PT5,PT7)=0 High High Z=13,142.86 Z=13,142.86 FT1=7.0,FT2=3.7,FT4 FT1=6.0,FT2=6.0,FT4 =5.0, =2.7, FT6=4.0,PT2=2.6,PT3 FT6=4.0,FT7=1.0,PT4 =2.0 =6.6 PT4=2.0 (FT3,FT5,PT1,PT2, (FT3,FT5,FT7, PT3,PT5,PT6,PT7)=0 PT1,PT5,PT6,PT7)=0 Notice that:
17
Moehl18
In general Z value increases as we go down the tree. However, Z can stay the same as in Node 1, 5, and 6. When we branch on a variable, it will have integer value in the next immediate node. However, it can become non-integer later on. An example is the value of FT4=4 in Node 2 that is changed to FT4=2.7 in Node 4.
ILP solution
Lastly the Integer WinQSB output was found using the initial conditions, and the Nonnegative Integer function within WinQSB. The input was as follows:
Moehl19
19