Lagrangian Relaxation And Danzig Wolfe Scheduling Problem

1,284 views
1,187 views

Published on

My term project report for my Applied Optimization course. I proposed to examine the application of Lagrangian Relaxation and Danzig-Wolfe Decomposition techniques to the Generalized Assignment Problem. I both presented the formulations and compared the different methods in terms of the solve time metric for cases of varying complexity.

The Generalized Assignment Problem is a mixed-integer problem and a superset of the Scheduling Problem.

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,284
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lagrangian Relaxation And Danzig Wolfe Scheduling Problem

  1. 1. Solving the Modified Generalized Assignment Problem Using Lagrangian Relaxation and Danzig-Wolfe Reformulation Techniques<br />MSCI 703 Final Project<br />By: Michael Walker<br />Friday, April 16th, 2009 <br />Table of Contents TOC o " 1-3" h z u Introduction PAGEREF _Toc245206577 h 1Modified Problem Formulation: PAGEREF _Toc245206578 h 1Lagrangian Relaxation: PAGEREF _Toc245206579 h 3Sub-Problem Formulation: PAGEREF _Toc245206580 h 4Lagrangian Dual Master Problem Formulation (LDM) PAGEREF _Toc245206581 h 4Danzig-Wolfe Formulation (DWMP) PAGEREF _Toc245206582 h 6Simulation Analysis PAGEREF _Toc245206583 h 8Conclusions and Recommendations PAGEREF _Toc245206584 h 10<br />List of Tables<br /> TOC h z c " Table" Table 1: Summary of Simulation Results PAGEREF _Toc245206534 h 8<br />List of Figures<br /> TOC h z c " Figure" Figure 1: Comparison of Formulation Solve Time (log,log) PAGEREF _Toc245206542 h 9<br />Figure 2: Comparison of Formulation Solve Time (linear,linear) PAGEREF _Toc245206543 h 9<br />Introduction<br />In Msci 603 a project was performed on the paper dealing with the Ohio COB’s Scheduling optimization problem for professors teaching courses at the university for the upcoming semester. It dealt with a fixed pool of professors and courses that needed to be taught as well as constraints with the number of rooms and timeslots during the week in which each course could be taught. The goal was to optimize the schedule based on the professor’s preferences for teaching a particular course in a particular room at a particular time while taking into account the importance of a given professor’s opinion to the department. There were also a series of constraints dealing with how many courses each professor should teach in a term, how many courses a department should be teaching as well as certain subsets being defined for particular courses being able to be taught in some rooms and not others etc…<br />In the end a general professor-class scheduling problem was developed and modelled using GAMS to solve relatively large test cases (by myself and my partner as our term project). The time taken to solve these cases however took longer than those reported by the article’s solution. This implied that there was an inherent inefficiency associated with our formulation (as both our article and our GAMS model used some derivation of CPLEX in the background).<br />The purpose of this project is to take the original problem, generalize it to increase the scope of analysis and to use methods learned in class (specifically Lagrangian Relaxation and Danzig-Wolfe Convexification techniques) to improve the formulation efficiency for reasonably-large test cases. The modified problem formulation to be used in this project is presented next.<br />Modified Problem Formulation:<br />The Modified Problem used in this project is a Generalized Assignment Problem, of which the scheduling problem is a subset. It was selected to provide a broader scope of analysis using the techniques of Lagrangian Relaxation or Danzig-Wolfe Convexification that would be done on the specific case of the scheduling problem presented in the article. The problem assumes a potential hiring pool of workers to perform a set of tasks, given a set of workstations (machines) and a given time slot on a given day in the scheduling period. The model formulation is as follows:<br />Decision Variables (Model Outputs – i.e. an Assignment Schedule):<br />Xi,j,k,t,d=1 if worker i performs task j at workstation k in timeslot t on day d0 otherwise<br />Yi,d=1 if worker i performs ANY task at ANY time on ANY workstation on day d0 otherwise<br />Problem Parameters (User-Defined Inputs Based on Specific Problem):<br />Ci,j,k,t,d∈R =" benefit" ofworker i performing task j on machine k in timeslot t on day d<br />Fi∈R=Fixed cost penalty of hiring worker i to work in the given schedule<br />Qj∈I=Number of times task j must be performed in a schedule<br />Pi,d∈I=Maximum number of tasks worker i can perform on day d<br />Ri∈I= Maximum number of days worker i can work in a schedule<br />M=A large positive number (i.e.'BigM')<br />Objective Function:<br />MAX z= i=1Ij=1Jk=1Kt=1Td=1DCi,j,k,t,dXi,j,k,t,d-i=1IFid=1DYi,d<br />Subject To:<br />Constraint 1j: i=1Ik=1Kt=1Td=1DXi,j,k,t,d=Qj ∀j=1,2,3,…,J<br />Constraint 2i,d: j=1Jk=1Kt=1TXi,j,k,t,d≤Pi,d ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D<br />Constraint 3i,d: j=1Jk=1Kt=1TXi,j,k,t,d-MYi,d≤0 ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D <br />Constraint4i,d: j=1Jk=1Kt=1TXi,j,k,t,d-Yi,d≥0 ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D <br />Constraint5k,t,d: i=1Ij=1JXi,j,k,t,d≤1 ∀k=1,2,3,…,K; ∀t=1,2,3,…,T; ∀d=1,2,3,…,D <br />Constraint6i: d=1DYi,d≤Ri ∀i=1,2,3,…,I<br />In this formulation the objective is to maximize the total ‘benefit’ of the schedule (i.e. worker proficiency) minus the fixed cost of hiring a worker from the labour pool (i.e. paying a salary of some sort). Constraint 1 ensures that each task that exists is performed by some worker at some time in the scheduling period. Constraint 2 ensures that no worker performs more than a certain maximum number of tasks on a given day (where Pi,d may be part of a given workers contract). Constraints 3 and 4 are model constraints linking the definitions of Xi,j,k,t,d and Yi,d, ensuring that if and only if a given worker performs any task on any machine during any timeslot on a given day then Yi,d = 1. Constraint 5 is a capacity constraint ensuring that at most only one task can be performed on a given machine at a given time on a given day. Constraint 6 ensures that the number of days worked during a schedule for a given worker does not exceed a pre-determined amount (again, likely from a worker’s contract). The final pre-stated constraints are that both Xi,j,k,t,d and Yi,d are binary variables. The next section introduces the Lagrangian Relaxation formulation of this problem.<br />Lagrangian Relaxation:<br />In Lagrangian Relaxation the goal is to modify the original problem formulation by relaxing certain constraints in the original problem with adjustable Lagrangian parameters. It is assumed that the reader is familiar with the theory behind this process so an in-depth introduction will not be provided here. Instead, the Lagrangian model for this specific problem is presented and discussed below.<br />For our model a decision had to be made regarding which of the available six constraints would be relaxed and for what reason. Ideally, relaxing all constraints would allow for an increased feasible space (and thus potentially higher objective value) for the sub problem. In order to achieve a Lagrangian Bound however, doing so will require more iterations of the sub problem – master problem cycle. If we do not relax any constraints we are left with the original problem formulation and no iterations of the sub problem – master problem cycle. For the purposes of this analysis (as well as achieving a reasonable solution for a Lagrangian Bound) Constraint 2 and Constraint 6 were relaxed from the sub problem and associated Lagrangian variables were assigned for each instance of these constraints in the problem. The model is presented below:<br />Parameters (Inputs to Problem):<br />μi,d,h∈R=Lagrangian parameter relaxing Constraint2i,d for the hth subproblem<br />λi,h∈R=Lagrangian parameter relaxing Constraint6i for the hth subproblem<br />Decision Variables (Outputs of Solution):<br />Xi,j,k,t,d,h=1 if worker i performs task j at workstation k in timeslot t on day d in schedule h0 otherwise <br />Yi,d,h=1 if worker i performs ANY task at ANY time on ANY workstation on day d in schedule h0 otherwise<br />Sub-Problem Formulation:<br />MAX ZLagh= i=1Id=1Dμi,d,hPi,d i=1Iλi,hRi+j=1Jk=1Kt=1Ti=1Id=1Dci,j,k,t,d-μi,d,hXi,j,k,t,d,h-i=1IFi+λi,hd=1DYi,d,h<br />Subject To:<br />Constraint 1j: i=1Ik=1Kt=1Td=1DXi,j,k,t,d=Qj ∀j=1,2,3,…,J<br />Constraint 3i,d: j=1Jk=1Kt=1TXi,j,k,t,d-Yi,d≤0 ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D <br />Constraint4i,d: j=1Jk=1Kt=1TXi,j,k,t,d-Yi,d≥0 ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D <br />Constraint5k,t,d: i=1Ij=1JXi,j,k,t,d≤1 ∀k=1,2,3,…,K; ∀t=1,2,3,…,T; ∀d=1,2,3,…,D <br />Upper Boundμi,d,λi≥0∀i=1,2,…,I∀d=1,2,…,D=MINZLagh; ∀h=1,2,3,…,H<br />As per the Lagrangian sub problem – master problem cycle, the sub problem is dependent on the Lagrangian multipliers given to it, and the output are the binary variables X and Y which define schedule h. This schedule h is then passed to the Lagrangian Master Problem which adds a constraint for each schedule h to its formulation, which is presented below. <br />Lagrangian Dual Master Problem Formulation (LDM)<br />Parameters:<br />Xi,j,k,t,d,h=1 if worker i performs task j at workstation k in timeslot t on day d in schedule h0 otherwise <br />Yi,d,h=1 if worker i performs ANY task at ANY time on ANY workstation on day d in schedule h0 otherwise<br />θ=Maximum objective value of all subproblems to date<br />Decision Variables:<br />μi,d∈R=Lagrangian variable relaxing Constraint2i,d satisfying master problem<br />λi∈R=Lagrangian variable relaxing Constraint6i satisfying master problem<br />Objective Function:<br />MIN ZMast= θ+i=1Id=1Dμi,dPi,d+i=1IλiRi<br />Subject To:<br />Master Constrainth: θ+i=1Id=1Dμi,dj=1Jk=1Kt=1TXi,j,k,t,d,h+i=1Iλid=1DYi,d,h≥i=1Ij=1Jk=1Kt=1Td=1DCi,j,k,t,dXi,j,k,t,d,h-i=1IFid=1DYi,d,h ∀h=1,2,3,…,H<br />Non-Negativityμi,d: μi,d≥0 ∀i=1,2,3,…,I ; ∀d=1,2,3,…,D <br />Non-Negativityμi: λi≥0 ∀i=1,2,3,…,I<br />Lower Bound=MAXZMast,Lower BoundIncumbent,-∞<br />The output of this Lagrangian Master Problem is the Lagrangian multipliers, which are then passed to the (h+1) sub problem to yield a new potential schedule. This iterative loop continues until the Lower Bound equals the Upper Bound (or achieves this to within some predefined tolerance) at which point the Lagrangian Bound is set equal to the Lower Bound. This is then the ‘best’ possible schedule that (possibly) violates Constraint 2 and Constraint 6 from the original problem formulation. At this point the Lagrangian solution could be infeasible to the original problem and a heuristic (such as Tabu Search, Simulated Annealing or a Genetic Algorithm) should be used to ‘tweak’ it to feasibility with respect to the original problem. The whole purpose of this process is hoping that the time taken to perform Lagrangian Relaxation, plus the time taken to make it feasible with a heuristic can provide a ‘very good’ solution in a faster time than the strictly ‘optimal’ solution might take in the original formulation.<br />Another process that is worthy of analyzing at this point is the Danzig-Wolfe Formulation. The Danzig-Wolfe Master Problem is simply the dual of the Lagrangian Master Problem and is used in a similar iterative cycle to achieve a ‘very good’ solution faster than the original problem can provide an ‘optimal’ one. One should note that in this case our current sub problem can be described as the original problem with Lagrangian Relaxation of Constraint 2 and Constraint 6 or equivalently with Convexification of Constraint 1, Constraint 3, Constraint 4 and Constraint 5.<br />Danzig-Wolfe Formulation (DWMP)<br />Taking the dual of the Lagrangian Master Problem:<br />Parameters:<br />Xi,j,k,t,d,h=1 if worker i performs task j at workstation k in timeslot t on day d in schedule h0 otherwise <br />Yi,d,h=1 if worker i performs ANY task at ANY time on ANY workstation on day d in schedule h0 otherwise<br />Decision Variable:<br />αh=% of schedule h used in final solution100 <br />Output (Solution):<br />h=1HXi,j,k,t,d,hαh=Xi,j,k,t,d,Final=1 if worker i performs task j at workstation k in timeslot t on day d0 otherwise<br />h=1HYi,d,hαh=Yi,d,Final=1 if worker i performs ANY task at ANY time on ANY workstation on day d0 otherwise<br />Objective Function:<br />MAX ZMast= h=1Hi=1Ij=1Jk=1Kt=1Td=1DCi,j,k,t,dXi,j,k,t,d,h-i=1IFid=1DYi,d,hαh<br />Subject To:<br />Constraint2i,d: h=1Hj=1Jk=1Kt=1TXi,j,k,t,d,hαh≤Pi,d → Dual Variable=μi,d <br />Constraint6i: h=1Hd=1DYi,d,hαh≤Ri → Dual Variable= λi<br />Convexity Constraint: h=1Hαh=1 → Dual Variable= θ<br />Non-Negativity: αh≥0 ∀h=1,2,3,…,H<br />Lower Bound=MAXZMast,Lower BoundIncumbent,-∞<br />In the pure Danzig-Wolfe formulation there is a constraint that forces αh to be a binary number. In this DWMP however we relax that constraint so that αh is simply non-negative. In this formulation each schedule sent from the sub problem solution is taken as an input parameter to the master problem and then αh is a representation of how much of each schedule h is used in constructing the Lagrangian Bound final schedule. In this sense, we can think of the ‘Lagrangian Schedule’ as being a linear combination of the basis of schedules sent to it by the sub problem iterations to date. When the Lower Bound equals the Upper Bound the cardinality of the basis of schedules ceases to increase and thus our optimal Lagrangian Schedule will be achieved.<br />In a similar manner to the Lagrangian Master Problem formulation, the Lagrangian Bound for the best schedule from the DWMP cycle could still be infeasible to the original problem, however it would be on different grounds. In the Lagrangian Master Problem the ‘optimal’ solution could potentially be infeasible to Constraint 2 and Constraint 6 (as these are not present in the sub problem or master problem formulations), however we are guaranteed integer feasibility on our X’s and Y’s. Thus the goal of a heuristic here is to ‘tweak’ the solution into the feasibility region for Constraint 2 and Constraint 6. The converse is true in the DWMP scenario. An ‘optimal’ DWMP solution will definitely be feasible to all of the original problem constraints (which are contained in the sub problem and master problem), however since the final schedule is a linear combination of the schedule h’s iterated over so far it is possible that the final schedule has values of X and Y that violate integer feasibility (as αh has had its binary variable constraint relaxed). Thus any heuristic used on a solution obtained from the DWMP cycle should be used to ‘tweak’ the solution into an integer feasible space for X and Y.<br />One possible ‘heuristic’ that is typically used in this manner is a branch and bound methodology that employs the DWMP cycle inside each node and provides binary cuts to form a new node. This process is called Branch and Price and is widely used and discussed in the class literature. The purpose of this report is not to outline the details of this process but rather to draw attention to it as a reasonable utility to be performed if the DWMP cycle is used to achieve binary feasibility of the final schedule. In reality however this is not really a ‘heuristic’ as such, due to the fact that Branch and Price is really a deterministic way to get to the actual optimal schedule in the original formulation. <br />Since the validity of using either the LDM or DWMP cycles hinges on the speed at which solutions are acquired compared to the original formulation, the results of simulations performed for various test cases of these methodologies (using GAMS) is presented below. <br />Simulation Analysis<br />In our analysis, six differently-sized test cases were generated and optimal schedules were calculated using the Original Problem Formulation, Lagrangian Relaxation Formulation and Danzig-Wolfe Formulation. The metrics used for comparison were Problem Size (n) and the time (in seconds) taken for each process to achieve optimality (or cycle convergence). Problem Size was taken as the product of the cardinality of the five different input parameters to the problems (Workers, Tasks, Workstations, Timeslots and Days).<br />Table 1: Summary of Simulation Results<br />Workers(i)Tasks(j)Workstations(k)Timeslots(t)Days(d)ProblemSize (n)Original Solution Time [seconds]LagrangianSolutionTime[Seconds]DWSolutionTime[Seconds]1111110.1010.1990.2121212140.1050.2080.21871255510,5000.640.8520.816101865527,0001.4611.5351.542152576578,7504.6164.3354.3242038885243,20016.66714.26914.051<br />Figures 1 and 2 are presented to give a visual illustration of the trends observed and are presented below. <br />Figure 1: Comparison of Formulation Solve Time (log,log)<br />By examining Figure 1 (presented in dual logarithmic scales) we see that for smaller problem sizes the original problem formulation actually performs faster than either the LDM or DWMP cycles. Since the problem sizes increase at a near-exponential rate Figure 2 has been presented (below) showing the same data on linear scales to give another perspective on the trends.<br />Figure 2: Comparison of Formulation Solve Time (linear,linear)<br />Looking at Figure 2 we see that as the problem size increases the solve time for both the LDM and DWMP cycles becomes faster compared to the original formulation and the trend suggests that for increasing set size this difference will grow proportionately. It is also interesting to note that the solve time for the LDM and DWMP are almost identical in every case – this should come as no surprise however as the LDM and DWMP have a primal-dual relationship to each other (both are LP’s). By LP duality theory when one solves the primal of a problem to optimality, one has done the same for the dual by definition. Most solvers (including GAMS which was used in these test) will make use of this and solve the quicker of the primal or the dual. In this way we should expect that both cycles will converge in approximately the same time to achieve a Lagrangian Bound on a relaxed or convexified final schedule.<br />Conclusions and Recommendations<br />It appears that as problem size increases it becomes more likely that performing a Lagrangian Relaxation or Danzig-Wolfe Convexification cycle in combination with an ending heuristic or Branch and Price algorithm to achieve a ‘very good’ solution might prove significantly less time consuming or computationally taxing than the original assignment problem might be. These tests were performed by manually inputting the output of the master problems into the sub problem, which takes almost infeasible amounts of time to perform for problems larger than the ones explored here. It is recommended that a new automated algorithm be perfected so that larger test cases can be examined to corroborate the result obtained in this study.<br />

×