Don’t lose it – use it! (using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal Algorithms Ltd & ASAP Research Group, University of Nottingham. [email protected] http://www.goweralg.co.uk/talks/ Models Problem ? Solution In an ideal world! Algorithm Lots of published results Models Either Problem ? OR In the real world! Problem Lots of published results ? Largest problem solved Result. Lots of published results BUT: We can still use information from the model in conjunction with that from the physical problem. Outline • Ways in which information from the model/problem can help – For any solution approach – For branch and bound – For heuristic search • Real examples – When the model fits but the problem is large • The pallet loading problem • A shipper rationalisation problem – When the model does not fit • Examination scheduling • A laboratory scheduling problem – Exploiting data characteristics • Nurse rostering. Any solution approach Reduce solution space Speed up calculations by preprocessing. Identify special cases. Split into sub-problems Day 4: Days 2-3: Day 1: With branch and bound Order the branches 1 5 ? 4 2 3 6 Tighten the bounds With heuristic search Smooth the landscape Diversify intelligently Improve neighbourhoods. Search large neighbourhoods efficiently Highest point in Cumbria When the model fits but typical problems are large. Pallet loading problem. Given a pallet and box of known size maximise the number of boxes that can be packed orthogonally onto the pallet. Collate Reduces to solving many problems of the form: Given a small a x b rectangle and a larger X x Y rectangle optimise the number of copies of the a x b rectangle that can be fitted orthogonally in the X x Y rectangle. Stable? Clampable? Which design? We will denote a problem with dimensions X,Y,a and b by P(X,Y,a,b) Graph theoretic model (clique or independent set). V = set of potential box positions (x,y,r) where r = orientation. (vi,vj) E if boxes placed in positions i and j don’t overlap. Optimal solutions maximum cliques. BUT |V| = (X+1-a)(Y+1-b) + (X+1-b)(Y+1-a) > 1,000,000 Best algorithms at the time: enhancements to Bron and Kerbosch branch and bound approach for 200-300 vertices max. A useful property Let E(S,a,b) = {(n,m): n,m ℕ, na + mb S < na + (m+1)b} We call E(S,a,b) the set of efficient partitions of S in a and b. Property. The efficient partitions define a set of equivalence classes on the set of pallet loading problems in that all problems with the same set of efficient partitions of both X and Y in a and b have the same set of feasible, and hence the same set of optimal, solutions. Reductions. 1. Let Q{X,Y,a,b} be the set of problems in the same equivalence class as P(X,Y,a,b) Select the problem from Q{X,Y,a,b} that minimises |V| RESULT: <18,000 vertices 2. Restrict set of feasible positions to those at distances d = na + mb,where n,mℕ, from the nearest pallet edge. RESULT: < 700 vertices. REMARK: this is equivalent to the following max clique reduction rule: If (v,w) E such that (v) (w) discard v. Computing the reduction directly is obviously far more efficient. Performance on 1000 randomly generated problems. Problem size: mean max. min |V| 186 580 10 Density 86% 98.64 54% Number out of 1000 randomly generated problems solving in reasonable time. 0 300 Performance of clique algorithm at different densities |V| 10 seconds 100 seconds 200 seconds 60% 200 70% 80% 150 1 Re-ordering the branches 100 1 0 700 0 500 1000 1500 2000 2500 3000 Solution time (secs) A global upper bound. 1. Area based bound: XY ab 2. Number theoretic bound due to Barnes Quality: Approx 20% match with good heuristic Improvement: • Find dimensions that minimise area based bound over Q{X,Y,a,b} (reduces to minimising a/b within a known interval) • Apply Barnes’ bound to this problem Quality: > 90% match with good heuristic Result: bound good enough to use as target. Local upper bound. The natural ordering allows us to calculate a local lower bound bound based on the waste in the current partial layout. 1 2 3 4 5 6 7 8 11 12 9 10 13 14 15 16 21 17 18 19 20 22 As well as actual waste we can define ‘future’ waste Additional bounds avoid reflections/rotations of previous solutions. Result. • • • • 98% of problems solve to proven optimality within time-limit > 90% solve within 10 seconds (on mid 1980’s pc) Some fail because bound is slack Others are computationally expensive with right bound. Solution. • Pre-process difficult equivalence classes and store indexed appropriately. Shipper rationalisation problem. Given • • • A set of product (boxes) of known dimensions Annual demand for each product A number, p, of shippers required Find • A set of p shippers for storage/transportation such that the total annual volume of shippers used is minimised. A p-median model Where: n m min cij xij xij = 1 if product i is allocated to shipper j i 1 j 1 n xij 1 st j 1 xij y j i i, j (1) ( 2) m yj p j 1 xij , yi binary i, j (3) yj = 1 if a shipper of size i is used cij is the annual shipper volume required if product i is allocated to shipper j V j * di cij f ij Vj is the volume of shipper j di is the annual demand for product i fij is the number of product i that can be fitted into shipper j. BUT • • Calculation of cij implies the solution of a pallet loading problem for each shipper/product pair Data to nearest mm large m (>109) Using information from the problem Pre-processing cost part of cost calculation. • For each product identify one shipper base from each equivalence class. • Solve and store results indexed appropriately. Result: mean time for 20,000 local search iterations for a 46 product problem over 5 runs for p = 3, 6 and 9 reduced from 481.4 secs to 32.97 secs. Reducing the size of the solution space. • Reduce set of potential base dimensions to integer combinations of lengths and widths of some product. • Reduce potential heights to integer multiplesof product heights. Result: m reduced from 1.25 x 1011 to 1.25 x 108 solution space reduction by factor of approx 103p. A fast post-processor. • Reduce each shipper so that each of its dimensions is a linear combination of one of the products allocated to it. Local search and neighbourhood size. Local search based on Teitz and Bart. Natural neighbourhood: • Swap a shipper for one of different dimensions. Problem: • Very large neighbourhoods Solutions: • Change one or 2 dimensions at a time • Limit size of change Result: based on p = 10 original neighbourhood size: 1.25 x 109 neighbourhood based on changing 1 dimensions: 1.5 x 104 Final implementation. Reduced solution space / neighbourhoods small enough to extend local search. • Not clear which is best • Solution space reduction raises questions of sampling strategy Use a simulated annealing heuristic with several neighbourhoods and select current neighbourhood / sampling rule using hyper heuristic. Performance of shipper rationalisation algorithm on 3 data sets. 100 98 96 % utilisation 94 92 original 90 noise 88 combined 86 84 82 80 3 4 5 6 7 8 no. shippers 9 10 11 12 What if the model does not fit? Examination scheduling. Given a set of exams and a set of constraints including the number of sessions available, number of desks available, time-window restrictions etc find a feasible timetable that maximises timetable quality (e.g minimises some measure of backto-back, same day or other frequencies of exams.) Graph colouring model: V= set of exams (vi,vj) E if exams i and j cannot take place at the same time. Feasible colourings clash-free timetables. BUT Graph colouring: find feasible colouring in minimum no. colours Exam scheduling: find feasible colouring in q colours such that • quality objectives are optimised • additional constraints are satisfied. Using information from the model. Graph colouring heuristics are frequently used for constructive approaches to time-tabling problems. An SA approach: • Find a clash-free timetable by solving colouring problem by appropriate means. • Search space of clash-free solutions wrt quality objective / additional constraints Problem: space now sparsely connected. Solution: a review of the literature revealed an SA approach to graph-colouring using neighbourhoods based on Kempe-chains. Comparison of natural and Kempe chain neighbourhoods (the numbers on the bars indicate the percentage savings) second order costs 2500 42.80 2000 46.77 Natural 36.50 1500 Kempe 30.89 1000 500 36.17 23.76 35.19 20.59 Data sets Laboratory scheduling. Given: a laboratory of known capacity, a set of timeslots when the laboratory is available and a set of students together with the times when each is free to attend, Find: an allocation of each student to a suitable timeslot in order to minimise the number of sessions utilised. Secondary objectives vary from year to year and include: • including student preferences • uniform utilisation of used sessions • preference ordering of sessions • minimising sessions used by a given subset of students Related models. • • • If we ignore capacity we have a set covering problem. If we can use any number of sessions (or know which sessions to use) we have a transportation problem If we know the number of sessions required we have a capacitated p-median problem. A local search approach Solution space: allocations of students to a session they are free to attend Neighbourhood move: move a student to another session Cost: main term to encourage full or empty time-slots + weighted terms for other objectives. (This assumes p = lower bound) Problems: • convergence to infeasible sets of p slots • don’t know if p is big enough Solution from underlying models: • Use local search to identify promising sets of p slots • Identify covering constraints wrt uncovered students and use to: • Penalise all solutions not satisfying constraint(s) • Build (small) set covering problem to check for feasibilty • If all covered optimise allocation using transportation model. Further penalties ensure no return to previous solutions and p is increased when necessary by decreasing capacity. Result: good solutions in < 1 minute run time. Exploiting data characteristics. Nurse scheduling. To produce weekly schedules of work for all nurses on the ward so that: • • • minimum covering requirements are met nurses’ preferences and requests are considered schedules are deemed to be fair The day is made up of 3 shifts: earlies, lates and nights. Nurses work either days or nights in a given week with more days than nights comprising a weeks work. e.g. (5,4), (4,3), (3,3). Nurses can submit requests for days/nights on/off. For each nurse we can define a set of feasible weekly work patterns and allocate a numeric score to each. Model (multiple choice covering problem). n min z pij xij (1) i 1 jF ( i ) s.t. xij 1 i (2) j F ( i ) a jk xij R(k , r ) r , k (3) iGr jF ( i ) xij 0 or 1 (4) Where. xij = 1 if nurse i works pattern j, = 0 otherwise. pij is the penalty associated with nurse i working pattern j F(i) is the set of patterns feasible for nurse i. ajk = 1 if pattern j covers shift k Gr is the set of nurses of grade-band r or above R(k,r) is the minimum acceptable number of nurses of grade r or above for shift k. Partitioning the problem. Data characteristic: Contributions to penalty of different magnitudes of scale with P(bank nurses) >> P(days/nights worked) >> P(early/late) Partition problem into 3 sub-problems. 1) Determine the number of bank nurses required using a small knapsack model. 2) Allocate nurses to days, nights, and days-off to minimise penalty while maintaining cover (see later) 3) Allocate those on days to earlies or lates using a network flow model. Result: • Feasibility guaranteed. • Size of problem reduced e.g. no. variables per full time nurse reduced from 707 to 56. • Remaining problem is solved using tabu search with strategic oscillation using neighbourhood moves that change the shift pattern of a single nurse. But the solution landscape can exhibit several problems: • Hills separating areas of solution space • Flat-bottomed valleys • Sparse connectedness. Improving the tabu search. Data characteristic: requests form a significant component of P(days/nights worked). moves based on moving just 1 shift may have significant effect on penalty cost. Therefore: Incorporate larger neighbourhoods based on chains of moves involving changing 1 shift for several nurses. Good moves can be found using shortest path routines. Data characteristic: allocations to days/nights can be critical to feasibility. Therefore: • include a swap neighbourhood to improve day/night balance • use a tabu list to ensure that the search stabilises in a new day/night allocation before reversing it • use a frequency based diversification to move to new day/night allocations after a given number of iterations. Result: Search consistently finds optimal solutions (as confirmed by IP solution) for 52 real data sets in a few seconds computing time. Conclusion ‘A general algorithm is like a size 48 coat. It can cover everybody but it doesn’t fit most people very well.’ And the physical problem Research the underlying model(s) A made-to-measure solution. Potential benefits • Better quality solutions • Obtained more quickly • and more consistently References The pallet loading problem. K.A. Dowsland ‘A graph-theoretic approach to a pallet loading problem’ NZOR 13 77-86 (1985) K.A. Dowsland ‘Determining an upper bound for a class of rectangle packing problems’ Comput & Opns Res 12 (1985) 201-205 K.A. Dowsland ‘A combined data-base and algorithmic approach to the pallet loading problem’ A J. Opl. Res. Soc 38 (1987) 441-345 K.A. Dowsland. ‘An exact algorithm for the pallet loading problem’ EJOR 31 (1987) 78-84 The shipper rationalisation problem. K.A. Dowsland, E. Soubeigaa & E.K. Burke ‘Solving a shipper rationalisation problem with a simulated annealing based hyperheuristic.’ Submitted to EJOR (2004) 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) 105-128 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) 345-363, Springer. J.M. Thompson and K.A. Dowsland ‘A robust simulated annealing based examination timetabling system’ Comput. & Opns. Res. 25 (1998) 637-648 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) 125-150 Springer. The nurse scheduling problem. K.A. Dowsland ‘Nurse scheduling with tabu search and strategic oscillation’ EJOR 106 (1998) 393-407 K.A. Dowsland & JM Thompson ‘Solving a nurse scheduling problem with knapsacks, networks and tabu search’ J. Opl. Res. Soc. 51 (2000) 825-833 http://www.goweralg.co.uk/talks/
© Copyright 2026 Paperzz