260 likes | 379 Views
Restart search techniques for Employee Timetabling Problems. Amnon Meisels And Eliezer Kaplansky Ben-Gurion University. Employee Timetabling Problems. ETPs as Constraint Networks. Finding solutions to CNs. Complete search algorithm. Local search.
E N D
Restart search techniquesfor Employee Timetabling Problems Amnon Meisels And Eliezer Kaplansky Ben-Gurion University
Employee Timetabling Problems. ETPs as Constraint Networks Finding solutions to CNs • Complete search algorithm • Local search Impact of randomization: The IRA Algorithm A dramatic impact Applying Learning Techniques
Employee Timetabling Problems Different types of employees. Assigned to many different shifts per day and week. Shifts can have many start and end times. Shifts are composed ofdifferent tasks. Employees have to be assigned to shifts over the week so that all the required tasks are fulfilled. Assignment satisfy employees personal preferences (rather than perfectly predictable long-term cyclic rosters)
Example ETP Timetabling nurses in a ward in a large hospital Wards have ~30 nurses. Each nurse is assigned 3-5 shifts per week. Typical daily shifts: morning, evening, night. Weekends have some special shifts. Each nurse has a list of preferred shifts for each week and a list of forbidden shifts, due to her personal constraints. Problem size ~100 weekly assignments.
Constraint satisfaction problem (CSP) • CSP is defined over a constraint network (CN). • CN consists of a finite set of variables, each associated with a domain of values, and a set of constraints. A solution is an assignment of a value to each variable from its domain such that all the constraints are satisfied. A well-known example of a constraint satisfaction problem is k-colorability
ETPs as Constraint Networks Variables are shift-task pairs <Sj ,Tk>. Employees are the assigned values Ei. Unavailabilities remove values from domains. Conflicts are binary constraints. Limits on number of assignments, either general or specific, are cumulative constraints (i.e. non-binary). Domain sizes can be large (tens of employees). Large real-world ETPs have hundreds of variables and hundreds of binary constraints and limits.
ETPs - Constraints Requirements: Shiftsneed a required number ofassigned employeesto each of theirtasks -- Two Senior_Nurses in Morning_Shifts Ability:Employeesare assigned totasks,according to their abilities -- Certified nurses can’t be assigned to Head_Nurse Availability:Personal preferences of employees restrict their assignment to only a subset of shifts -- Senior doctors are not assigned to Friday_Shifts
ETPs - Constraints (II) Conflicts:Employees cannot be assigned to two conflicting shifts -- No Morning_Shift following a Night_Shift Workload:There are bounds on the number of tasks assigned to each employee -- Maximum 10 hours a day, 40 hours per week Regulations:Certain limits are imposed on the number of specific tasks assigned to employee -- at most 3 Night_Shifts in 2 weeks
An assignment table • Rows for employees. • Columns for shifts. • Assigned values are tasks
Finding solutions to CNs Complete search algorithm - backtracking Local search
Complete Search on CNs Complete search algorithm – backtracking Problem difficulty varies widely Intelligent backtracking methods perform well Heuristics (i.e. variable-ordering) have a strong impact • Even small sized problems can be practically unsolvable. Meaningful parameters for discerning problem difficulty are hard to find
Local search Form a search space from all possible assignment states. For pure search problems the cost function can be the number of constraints violations and the goal has cost 0. Move on this space, guided by a cost function, attempting to improve the current state. Local search algorithms move locally, in a limited neighborhood (limited moves). Stop if a goal state has been reached or if some criterion on iterations/improvements holds.
Boosting Combinatorial Search Through Randomization Carla P. Gomes Cornell University It can be advantageous to terminate searches which appear to be "stuck", exploring a part of the space far from a solution. Running the search up to a certain cutoff point and then restarting at the root of the tree.
Cutoff value ??? The best available strategy is a trial-and-error process, where one experiments with various cutoff values (Gomes). Starting at relatively low values, since the optimal cutoff for these problems tends to lie below the median value of the distribution (Gomes) Iterative cutoff improvement • By searching systematically through cutoff space, make the randomized technique into a complete search. While guaranteed to find a solution, if one exist, utilize randomization to climb out of local minima
Iterative RestartAlgorithm - IRA • Set an initial value S to the "cutoff" parameter C. • Repeat for N times. • Run A for a fixed number of C backtracks. • If A finds a solution or proves it does not exist, then stop. • Otherwise, restart A from the beginning, using an independent random seed, for another C backtrack. • Multiply C by F.
Preliminary experiments In our preliminary experiments, we compare the number of constraints checks the solver executes for different cutoff parameters. Our base line was the best performing backtracking algorithm: Forwards Checking & Conflict-Directed Back Jumping (FC-CBJ)
The test problem We use a real world ETP problem: Timetabling of nurses in a large Israeli hospital. We randomly generate test problems by adding or removing personal constrains. We make sure that all our test problems are solvable.
Systematic randomization Introducing systematic randomization into complete search algorithms, by selecting a cutoff value and running restart search. Low enough cutoff values dramatically decrease the running time of the complete search The effect is consistent across a large range of constraints density The same set of test problems are now solved faster than (pure) FC - CBJ (by 4 orders of magnitude)
Applying Learning Techniques A learning paradigm monitors the search pattern of the solver and records specific parameters of the search • Main parameters of IRA - • The number of backtracks performed before restarting the search: The cutoff parameter C. • How many times to restart before we increase the cutoff parameter: The N parameter. • By what factor to increase the cutoff parameter: The F parameter.
The IRA Matrix Fix the multiplication factor F of the cutoff parameter at 2 The other two parameters are: * Cutoff starting value * Number of tries before increasing Form a matrix of these two parameters and record the search effort for a given problem Matrices for problem class “representatives”..
Adaptive Solver Find classifying parameters of problems – domain-size; density of constraints; tightness of limits; number of employees; abilities; Accumulate data on search parameters (IRA matrix) Search for repeating patterns of success Recognize the correlations of problem-classifying parameters with search parameters Tune-up the solver by setting the search parameters to fit problem-class
Preliminary Conclusions Restart (complete) search is very effective on ETPs for some problem classes, RS is better than hill-climbing IRA matrix looks promising for small values, for both rows and columns very low cutoff values seem to perform best (Gomes)