Download presentation
Presentation is loading. Please wait.
1
Off the peg or made to measure
Off the peg or made to measure! Timetabling and scheduling with SA and TS. Kath Dowsland Gower Optimal Algorithms Ltd (talk available at Bespoke tailoring High street stores ?
2
Main focus. ? Generic implementation. Change in specification
Problem Specific Generic Problem Specific ? Generic implementation. Easy to develop Solution quality OK Problem specific implementation. Development effort Change in specification Generic approach may need minor modification Problem specific approach may have to start afresh.
3
Secondary focus. Reading widely Talks / seminars Solving my problem
4
Overview. Introduction Laboratory scheduling Examination timetabling
Nurse rostering Conclusions
5
In an ideal world! Solution Models Problem Lots of published results
? Problem In an ideal world! Lots of published results Solution Algorithm
6
X In the real world! OR Models Either Problem Problem
Lots of published results Largest problem solved Models ? Problem Either X ? Problem OR In the real world!
7
??? Answer: Use a metaheuristic
Lots of published results Answer: Use a metaheuristic Local search based e.g. simulated annealing, tabu search, GRASP Population based e.g. genetic algorithm, ant colony optimisation, scatter search
8
Local Search(minimisation).
Problem specified in terms of a solution space with an evaluation function, f, and neighbourhood structure, N, defined on it. From any starting solution S find a neighbour Snew that is better in terms of f. Replace S by Snew. Continue until no improving neighbours exist. Well suited to scheduling type problems as they have a natural neighbourhood defined by changing the time (or other attribute) of an event or swapping 2 events. But: converges to local, rather than, global optimum. Simulated annealing (SA) and tabu search (TS) designed to overcome this problem by accepting ‘uphill’ moves. SA accepts such moves with a probability depending on the change in the evaluation function and the search time. At a local optimum TS accepts the ‘best’ neighbour. Some moves are classified as tabu to avoid cycling. For both techniques smooth, gently sloping solution landscapes are best.
9
A Computer Laboratory Scheduling Problem
The development of AILSA An Intelligent Laboratory Scheduling Algorithm
10
The problem. Given: A laboratory of known capacity, Q
A set of m timeslots when the laboratory is available A set of n students together with the times when each is free to attend Find: An allocation of each student to a suitable timeslot Such that: The number of sessions utilised is minimised The capacity is not exceeded Spare capacity is spread evenly
11
Related models. If we ignore capacity we have a set covering problem.
Let Tj be the set of students who can attend at time j. Minimise the number of sets, Tj, needed to cover all the students. Large NP-hard problem. If we know which timeslots to use we have a transportation problem. Let each timeslot define a supply node with available supply = Q, each student define a demand node with a demand of 1. Find a feasible allocation of demand nodes to supply nodes. Easy to solve using a variety of techniques (e.g. network flow, LP) Other location type models also provide partial solutions
12
A local search approach.
Solution space: allocations of students to a time-slot they are free to attend Neighbourhood move: move a student to another session Cost: Assumption: p = Define the ideal occupancy as C = n/p Cost then based on sine curve. |Sin(x)| C 0 Occupancy
13
Problem 1. Search gets stuck in valleys separated by high hills.
? Search gets stuck in valleys separated by high hills. Question 1: Can we escape intelligently? Question 2: Even if we can escape, how do we know there is a feasible solution?
14
Causes Converged towards a set of p slots that do not cover everyone. No allocation of students to selected p slots satisfying capacity constraints. Solutions Identify when search is converging towards p slots and: Include a penalty term relating to relevant constraint from set covering model into cost. Solve transportation problem. if feasible, problem solved if not feasible add penalty term to drive the search away from the current set of slots. Can also determine infeasibility by solving small set covering problems defined by the constraints identified in (1) and restarting with new p if infeasible.
15
Problem 2. Search slow to get to point of convergence.
? Search slow to get to point of convergence. Cause: biased sampling. Solution: sample student first / slot first in alternate iterations.
16
Is it robust? Changes in problem size/data. Preferences on time-slots.
More than one solution. Minimising slots for a subset of students. Combining new objective into cost not successful. Solved in 2 phases. Solve for subset first and then add additional slots around this solution. Problem specific information enables search to seek out several local optima quickly and efficiently.
17
The Examination Timetabling Problem
The development of TISSUE The Intelligent Scheduling System for University Exams
18
The problem. Given A set of k time slots A set of n exams
Other resources (rooms, invigilators etc) A list of candidates for each exam A list of requirements (including time windows) for each exam Find An allocation of exams to time-slots Such that No student is timetabled to sit 2 exams at the same time The number of back-to-back exams (known as second order conflict) is minimised Other secondary objectives / constraints are taken into account.
19
Related model. If the only objectives are to avoid clashes and meet the time-window constraints then the problem is a graph colouring problem. Vertices = set of exams set of timeslots Edges connect: All pairs of timeslot vertices Pairs of exam vertices with a student in common Exam vertices to timeslot vertices at infeasible times Objective: find a feasible colouring of G(V,E) in k or less colours.
20
A simulated annealing approach.
Local search framework Solution space: allocation of exams to time-slots subject to capacity constraints Neighbourhood move: move one exam Cost: weighted cost of student clashes, second order-conflict + other objectives. Problem: Failure to converge to good feasible solutions.
21
Lessons from previous experience.
Solve in phases. Find feasible solution first. Then search space of feasible solutions. Reasonable results. Sampling. Natural sampling: select exam, then slot. Other possibilities: select ‘from’ slot, then exam, then ‘to’ slot Select ‘from’ slot, then ‘to’ slot, then exam. 140 120 Cost 100 80 60 40 20 1 2 3 Sampling policy
22
Problem. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Space of feasible solution disconnected (or very sparsely connected)
23
Solution. Paper on local search for graph colouring found improved results with Kempe chain neighbourhoods. Given a graph and a feasible colouring (i-j)-Kempe chains are the connected components in the sub-graphs induced by the vertices coloured i and j. Swapping the colours in such a chain will preserve the feasibility of the colouring. Comparison of natural and Kempe chain neighbourhoods (the numbers on the bars indicate the percentage savings) 36.17 23.76 35.19 42.80 30.89 46.77 36.50 20.59 Data sets second order costs Natural Kempe 500 1000 1500 2000 2500
24
Is it robust? Used to schedule exams at Swansea since 1992
Produces good solutions on a range of bench-mark data Works well with different objectives and constraints.
25
The development of CARE Computer Aided Rostering Environment
The Nurse Rostering Problem The development of CARE Computer Aided Rostering Environment
26
The problem. Objective: to produce weekly schedules of work for all nurses on each ward so that: minimum covering requirements are met nurses’ preferences and requests are considered schedules are deemed to be fair Detail: The day is made up of 3 shifts: hour day shifts (earlies and lates) and a longer night shift. Nurses work either days or nights in a given week with more days than nights comprising a week’s work. Different contracts give different numbers of days/nights worked e.g. (5,4), (4,3), (3,3). Covering requirements are given cumulatively for 3 grade-bands. Nurses can submit requests for days/nights on/off. Bank nurses can be used if cover cannot be met without. After several consultations with the hospital we were able to put numeric values on the different non-binding constraints / secondary objectives.
27
Solve in 3 phases. Phase 1: determine the number of bank nurses.
Solve as knapsack problem: Maximise the number of day shifts available subject to the constraint that the number of night-shifts sacrificed is sufficiently low. Phase 2: allocate nurses to to day/night/day-off for each day. See later. Phase 3: allocate nurses on days to ‘earlies’ and ‘lates’. Solve as network flow problem: Nodes represent the nurses and days/grades. Flow variables represent working ‘earlies’. Appropriate costs and bounds ensure preference costs are optimised subject to nurses’ availability and cover constraints.
28
A local search approach to phase 2.
Work with shift patterns and solve in phases. Phase 2.1: Find a feasible solution Phase 2.2: Search space of feasible solutions Solution space: allocation of nurses to feasible shift patterns Neighbourhood move: change pattern of a single nurse Cost: total shortfall in cover or sum of preference costs depending on phase. BUT
29
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Both phases: valleys that are difficult to escape ? ? Both phases: large plateau-like areas ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Phase 2.2: disconnected solution space
30
Solutions. In phase 2.1: Some deep valleys due to infeasible day-night mix – restrict moves to those that correct this. Negotiate plateaux and cross mountains using chains of moves – good chains correspond to shortest paths in small graphs. In phase 2.2: Mountains, plateaux and some connection problems solved by extending a. and b. above to finding negative cost circuits so that cover is unchanged and preference cost improves. Remaining connection problems avoided by crossing back into infeasible region and repeatedly oscillating through phases 2.1 and 2.2. In order to ensure component likely to give good solutions, cost in phase 2.1 includes a preference element. Search carried out as an aggressive TS with tabu lists and diversification strategies based on day/night mix
31
Is it robust? Changes to specification.
Addition of nurses working both days and nights in the same week. Spreading of over-cover Constraints on number of highly paid nurses working weekends Introduction of team working. All incorporated with minor changes due to ability to seek out many good local optima.
32
analysing the physical problem
Conclusion. ‘A general algorithm is like a size 48 coat. It can cover everybody but it doesn’t fit most people very well.’ And analysing the physical problem Researching the underlying model(s) A made-to-measure solution. Potential benefits Better quality solutions Obtained more quickly and more consistently Can also prove robust.
33
Social life Travel Reading widely Talks / seminars
(talk available at
34
References (talk available at www.goweralg.co.uk/talks/)
The talk is based on: K.A Dowsland,’Off-the-peg or made to measure: timetabling and scheduling with SA and TS' in Practice and Theory of Automated Timetabling II (Burke, E. and Carter, M. eds) LNCS 1408, (1997 ) The laboratory scheduling problem. K.A.Dowsland, ‘Using simulated annealing for efficient allocation of students to practical classes’ in Applied Simulated Annealing (Vidal R.V.V. ed.) LNEMS 396, (1993) Springer. The examination scheduling problem. J.M. Thompson & K.A. Dowsland ‘Variants of simulated annealing for the examination scheduling problem’ Annals of Operations Research 63 (1996) J.M. Thompson & K.A. Dowsland ‘General cooling schedules for a simulated annealing based timetabling system’ in Practice and Theory of Automated Timetabling, (Burke E. and Ross, P. eds.), LNCS 1153 (1996) , Springer. J.M. Thompson and K.A. Dowsland ‘A robust simulated annealing based examination timetabling system’ Comput. & Opns. Res. 25 (1998) The nurse scheduling problem. K.A. Dowsland ‘Nurse scheduling with tabu search and strategic oscillation’ EJOR 106 (1998) K.A. Dowsland & JM Thompson ‘Solving a nurse scheduling problem with knapsacks, networks and tabu search’ J. Opl. Res. Soc. 51 (2000) (talk available at
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.