restart search techniques for employee timetabling problems

26
1 Restart search techniques Restart search techniques for Employee Timetabling Problems for Employee Timetabling Problems Amnon Meisels Amnon Meisels And And Eliezer Kaplansky Eliezer Kaplansky Ben-Gurion University Ben-Gurion University

Upload: quincy

Post on 08-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Restart search techniques for Employee Timetabling Problems

1

Restart search techniquesRestart search techniquesfor Employee Timetabling for Employee Timetabling

Problems Problems

Amnon MeiselsAmnon MeiselsAndAnd

Eliezer KaplanskyEliezer KaplanskyBen-Gurion UniversityBen-Gurion University

Page 2: Restart search techniques for Employee Timetabling Problems

2

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

Page 3: Restart search techniques for Employee Timetabling Problems

3

Employee Timetabling Employee Timetabling ProblemsProblems

Different types of employees. Assigned to many different shifts per day and

week. Shifts can have many start and end times.

Shifts are composed of different 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)

Page 4: Restart search techniques for Employee Timetabling Problems

4

Example ETPExample ETP Timetabling nurses in a ward in a large

hospital

Each nurse is assigned 3-5 shifts per week. Wards have ~30 nurses.

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.

Page 5: Restart search techniques for Employee Timetabling Problems

5

CConstraint satisfaction problem onstraint satisfaction problem (CSP)(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

Page 6: Restart search techniques for Employee Timetabling Problems

6

ETPs as Constraint NetworksETPs 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).

Large real-world ETPs have hundreds of variables and hundreds of binary constraints and limits.

Domain sizes can be large (tens of employees).

Page 7: Restart search techniques for Employee Timetabling Problems

7

ETPs - ConstraintsETPs - Constraints

Requirements: Shifts need a required number of assigned employees to each of their tasks

-- Two Senior_Nurses in Morning_Shifts Ability: Employees are assigned to tasks, 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

Page 8: Restart search techniques for Employee Timetabling Problems

8

ETPs - Constraints ETPs - Constraints ((IIII))

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

Page 9: Restart search techniques for Employee Timetabling Problems

9

An assignment tableAn assignment table

Rows for employees.

Columns for shifts.

Assigned values are tasks

S1 S2 Sj SmE1 --- T2 ---E2 T1 T5 T2

T1 --- ---Ei --- T3 Tk

--- T1T2 --- T1 ---

--- T4

En T3 --- T3 T3

Page 10: Restart search techniques for Employee Timetabling Problems

10

Finding solutions to Finding solutions to CNsCNs

Complete search algorithm - backtracking

Local search

Page 11: Restart search techniques for Employee Timetabling Problems

11

Complete Search on Complete Search on CNsCNs

Complete search algorithmComplete search algorithm – – backtrackingbacktrackingProblem difficulty varies widely

Intelligent backtracking methods perform well Heuristics (i.e. variable-ordering) have a strong

impactEven small sized problems can be practically

unsolvable. Meaningful parameters for discerning problem

difficulty are hard to find

Page 12: Restart search techniques for Employee Timetabling Problems

12

Local searchLocal search Form a search space from all possible

assignment states.

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.

For pure search problems the cost function can be the number of constraints violations and the goal has cost 0.

Page 13: Restart search techniques for Employee Timetabling Problems

13

Boosting Combinatorial Search Boosting Combinatorial Search ThroughThrough Randomization Randomization

Carla P. Gomes Cornell University

Running the search up to a certain cutoff point and then restarting at the root of the tree.

It can be advantageous to terminate searches which appear to be "stuck", exploring a part of the space far from a solution.

Page 14: Restart search techniques for Employee Timetabling Problems

14

Cutoff valueCutoff 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 improvementIterative cutoff improvement

While guaranteed to find a solution, if one exist, utilize randomization to climb out of local minima

By searching systematically through cutoff space, make the randomized technique into a complete search.

Page 15: Restart search techniques for Employee Timetabling Problems

15

Iterative RestartIterative Restart Algorithm -Algorithm - IRA 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.

Page 16: Restart search techniques for Employee Timetabling Problems

16

PPreliminary experimentsreliminary experiments

Our base line was the best performing backtracking algorithm: Forwards Checking & Conflict-Directed Back Jumping

(FC-CBJ)

In our preliminary experiments, we compare the number of constraints checks the solver executes for different cutoff parameters.

Page 17: Restart search techniques for Employee Timetabling Problems

17

The test problemThe test problem

We randomly generate test problems by adding or removing personal constrains.

We use a real world ETP problem: Timetabling of nurses in a large Israeli hospital.

We make sure that all our test problems are all our test problems are solvable. solvable.

Page 18: Restart search techniques for Employee Timetabling Problems

18

Difficulty Difficulty vsvs. Personal constraints. Personal constraints (FC – CBJ)(FC – CBJ)

Page 19: Restart search techniques for Employee Timetabling Problems

19

SystematicSystematic randomization 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)

Page 20: Restart search techniques for Employee Timetabling Problems

20

Impact of randomizationImpact of randomization

Page 21: Restart search techniques for Employee Timetabling Problems

21

Applying Learning Applying Learning TechniquesTechniques

A learning paradigm monitors the search pattern of the solver and records specific parameters of the search Main parameters of IRA - 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.

Page 22: Restart search techniques for Employee Timetabling Problems

22

The IRA MatrixThe IRA Matrix

* 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”..

* Cutoff starting value The other two parameters are:

Fix the multiplication factor F of the cutoff parameter at 2

Page 23: Restart search techniques for Employee Timetabling Problems

23

Example of IRA MatrixExample of IRA Matrix

1 2 3 4 5 6 7 8 9 10

S1

S4

S7

S10

0

100000

200000

300000

400000

500000

600000

700000

800000

Constrains checks

Intial cutoff

Number of tries

דרה1 סי 1652 3869 750 671 2093 813 1681 665 679 594

דרה2 סי 519257 808 974 506 486 588 655 611 577 622

דרה3 סי 44578 1643 657 674 729 636 8501 696 624 570

דרה4 סי 29671 2408 2823 1014 8718 821 585 551 709 553

דרה5 סי 3018 5455 3910 1200 4815 1195 647 726 739 702

דרה6 סי 19625 15110 4941 1036 737 556 6876 7302 604 609

דרה7 סי 704175 12931 506 9529 1483 1230 607 599 603 603

1 2 3 4 5 6 7 8 9 10

Page 24: Restart search techniques for Employee Timetabling Problems

24

Pattern of IRA MatrixPattern of IRA Matrix

3869 750 671 2093 813 1681 665 679 594

0

2000

4000

6000

8000

10000

12000

14000

16000

Constrains checks

Intial cutoff

Number of tries

Page 25: Restart search techniques for Employee Timetabling Problems

25

Adaptive SolverAdaptive Solver Find classifying parameters of problems –

domain-size; density of constraints; domain-size; density of constraints; tightness of limits; number of employees; tightness of limits; number of employees; abilities; abilities; Accumulate data on search parameters (IRA matrix)

Search for repeating patterns of success

Tune-up the solver by setting the search parameters to fit problem-class

Recognize the correlations of problem-classifying parameters with search parameters

Page 26: Restart search techniques for Employee Timetabling Problems

26

Preliminary Preliminary ConclusionsConclusions

IRA matrix looks promising for small values, for both rows and columns

for some problem classes, RS is better than hill-climbing

Restart (complete) search is very effectivevery effective on ETPsETPs

very low cutoff values seem to perform best (Gomes)