Don’t lose it – use it! ( using problem specific information in the solution of real-life...

34
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] Practica l problem Model http://www.goweralg.co.uk/ talks/
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    0

Transcript of Don’t lose it – use it! ( using problem specific information in the solution of real-life...

Page 1: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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]

Practical

problem

Model

http://www.goweralg.co.uk/talks/

Page 2: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

?

Problem

Lots of published results

Algorithm

Solution

Models

In an ideal world!

Page 3: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Lots of published results

Largest problem solved

Models

?

Problem

Either

X

?

Problem

OR

In the real world!

Page 4: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Lots of published results

Result.

BUT:

We can still use information from the model in conjunction with that from the physical problem.

Page 5: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 6: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Any solution approach

Reduce solution space

Emergency vehicles only beyond this point

Identify special cases.

Speed up calculations by pre-processing.

Day 1:

Days 2-3:

Day 4:

Split into sub-problems

Page 7: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

With branch and bound

Order the branches

?

1

4

36

2

5

Tighten the bounds

No through road to summit

Page 8: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

With heuristic search

Smooth the landscape

Diversify intelligently

Search large neighbourhoods efficiently

Highest point in Cumbria

Improve neighbourhoods.

Page 9: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

When the model fits but typical problems are large.

Page 10: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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

Stable?Clampable?

Which design?

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.

We will denote a problem with dimensions X,Y,a and b by P(X,Y,a,b)

Page 11: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 12: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 13: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 14: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Performance on 1000 randomly generated problems.

Problem size: mean max. min

|V| 186 580 10

Density 86% 98.64 54%

1

Number out of 1000 randomly generated problems solving in reasonable time.

0 300

10 seconds

100 seconds

200 seconds

0 700

1

Re-ordering the branches

Performance of clique algorithm at different densities

100

150

200

0 500 1000 1500 2000 2500 3000

60% 70%|V|

Solution time (secs)

80%

Page 15: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

A global upper bound.

ab

XY

Result: bound good enough to use as target.

1. Area based bound:

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

Page 16: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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

10987

6543

11 121413

171615

18 2019

2221

As well as actual waste we can define ‘future’ waste

Additional bounds avoid reflections/rotations of previous solutions.

Page 17: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 18: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 19: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

jiyx

py

jiyx

ix

xc

iij

m

jj

jij

n

jij

n

i

m

jijij

,binary ,

)3(

)2(,

)1(1st

min

1

1

1 1

Where:

xij = 1 if product i is allocated to shipper j

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

ij

ijij f

dVc

*

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.

A p-median model

BUT

• Calculation of cij implies the solution of a pallet loading problem for each shipper/product pair

• Data to nearest mm large m (>109)

Page 20: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 21: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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

Page 22: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

no. shippers

80

82

84

86

88

90

92

94

96

98

100

3 4 5 6 7 8 9 10 11 12

% u

tili

sati

on

original

noise

combined

Page 23: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

What if the model does not fit?

Page 24: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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 back- to-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.

Page 25: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

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.7736.50

20.59

Data sets

seco

nd

ord

er c

osts

Natural

Kempe

500

1000

1500

2000

2500

Solution: a review of the literature revealed an SA approach to graph-colouring using neighbourhoods based on Kempe-chains.

Page 26: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 27: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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)

A local search approach

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.

Page 28: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Exploiting data characteristics.

Page 29: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 30: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

)4(1or 0

)3(,),(

)2(1..

)1(min

)(

)(

1 )(

ij

iFjijjk

Gi

iFjij

n

i iFjijij

x

krrkRxa

ixts

xpz

r

Model (multiple choice covering problem).

Page 31: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

Partitioning the problem.

Data characteristic: Contributions to penalty of different magnitudes of scale withP(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.

Page 32: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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.

Page 33: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

‘A general algorithm is like a size 48 coat. It can cover everybody but it doesn’t fit most people very well.’

Research the underlying model(s)

And the physical problem

A made-to-measure solution.

Potential benefits

•Better quality solutions

•Obtained more quickly

•and more consistently

Conclusion

Page 34: Don’t lose it – use it! ( using problem specific information in the solution of real-life combinatorial optimisation problems). Kath Dowsland Gower Optimal.

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-205K.A. Dowsland ‘A combined data-base and algorithmic approach to the pallet loading problem’ A J. Opl. Res. Soc 38 (1987) 441-345K.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-128J.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-407K.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/