Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tommy Messelis * Stefaan Haspeslagh Patrick De Causmaecker *

Similar presentations


Presentation on theme: "Tommy Messelis * Stefaan Haspeslagh Patrick De Causmaecker *"— Presentation transcript:

1 Tommy Messelis * Stefaan Haspeslagh Patrick De Causmaecker * tommy.messelis@kuleuven-kortrijk.be

2 Outline positioning of this research / our motivation Nurse Rostering Problem (NRP) propositional SATisfiability problem (SAT) translation scheme conclusions

3 scope performance prediction for real world scheduling and timetabling building empirical hardness models for various established solution methods mapping instance features readily available / efficiently computable properties of the problem instances onto performance criteria how good does an algorithm do, how much time does it need, what solution quality can it achieve given a fixed time algorithm selection problem: how to choose the best algorithm for a given problem instance?

4 scope feature set is extremely important for the quality of the predictions come up with very good features expert knowledge eliminate this expert by transforming the problem to another (better studied) problem use an existing feature set on this abstract representation

5 Nurse Rostering Problem planning horizon: time units (corresponding to shifts) e.g. 14 days, 3 shift structure (early/late/night) total of 42 time units set of nurses need to be assigned to these shifts demands minimum needed occupation for all time units constraints hard: cannot be violated a nurse cannot work in 2 places at the same time soft: can be violated at a certain cost a nurse should not work more than 5 days in a row find an assignment that satisfies all hard constraints and as many soft constraints as possible

6 Nurse Rostering Problem structural constraint types consecutiveness between total demands equal to total constraints, but dealing with time units instead of individual nurses other constraints nurse preferences, skill requirements,...

7 Nurse Rostering Problem MonTueWedThuFriSatSun Nurse1EEEEELL Nurse2LLLLLNN Nurse3NNELE... demands221221221221222121111 Example: incomplete roster not all demands are (yet) satisfied some nurses work already more than allowed

8 propositional SATisfiability a logical formula on boolean variables in Conjunctive Normal Form (CNF) a CNF formula is a conjunction of clauses: C 1 ∧ C 2 ∧... ∧ C N each clause C i is a disjunction of literals: L 1 ∨ L 2 ∨... ∨ L M each literal L j is a boolean variable or its negation: v 10 or ¬ v 16 find a truth assignment for the set of boolean variables so that the formula evaluates true

9 outline so far the nurse rostering problem the propositional satisfiability problem now getting from the one problem into the other

10 from NRP to SAT decision variables for each time unit t and each nurse p a boolean variable v t,j that indicates whether nurse p works shift t problem constraints need to be imposed onto these variables, expressed using CNF clauses MonTueWed time unit123456789 Nurse1v 1,1 v 2,1 v 3,1 v 4,1 v 5,1 v 6,1 v 7,1 v 8,1 v 9,1 Nurse2v 1,2 v 2,2 v 3,2 v 4,2 v 5,2 v 6,2 v 7,2 v 8,2 v 9,2 Nurse3v 1,3 v 2,3 v 3,3 v 4,3 v 5,3 v 6,3 v 7,3 v 8,3 v 9,3...

11 numberings represent (multiple) time units by a number a numbering defines the subject of a constraint N 1 will deal with working days N 2 looks only at early shifts N 3 handles only tuesdays MonTueWed time unit123456789 Numbering N 1 111222333 Numbering N 2 1UU2UU3UU Numbering N 3 UUU111UUU...

12 numberings: notation a solution (assignment of some shifts to a nurse) induces a set of numbers (called events) an event sequence is a row of events, conserving the timely order e 1, e 2,..., e m (e.g. 1,2,5,6,7) an event sequence is contiguously ascending when for all j holds: e j – e j-1 = 1 (e.g. 1,2,3,4,5) constraints can be expressed using event sets and event sequences

13 example assignment Numbering N 1 induces the event set {1,2,3,4,5,7} max_consecutive_working_days = 5 there is no contiguously ascending event sequence of length 6 : satisfied Numbering N 2 induces the event set {1,2,3,4,5} max_total_early = 4 the event set should not contain more than 4 events : violated MonTueWedThuFriSatSun time unit 123456789101112131415161718192021 N1N1 111222333444555666777 N2N2 1UU2UU3UU4UU5UU6UU7UU Nurse2 ✓✗✗✓✗✗✓✗✗✓✗✗✓✗✗✗✗✗✗✗✓

14 from numbers to clauses for each number i, we introduce a new variable t i which indicates whether the number i occurs in the event set: t i ⇔ v 3i ∨ v 3i-1 ∨ v 3i-2 or in CNF format, the conjunction of 4 clauses: ¬ t i ∨ v 3i ∨ v 3i-1 ∨ v 3i-2 t i ∨ ¬ v 3i t i ∨ ¬ v 3i-1 t i ∨ ¬ v 3i-2 for n numbers, we generate n variables and O(n) clauses

15 from numbers to clauses consecutiveness constraints are easily represented by CNF clauses: max_cons_working_days = 4 ¬ t i ∨ ¬ t i+1 ∨ ¬ t i+2 ∨ ¬ t i+3 ∨ ¬ t i+4 for i ∈ {1..(n-4)} (in a row of 5 consecutive days, not all t i may be true) min_cons_working_days = 2 t i ∨ ¬ t i+1 ∨ t i+2 for i ∈ {1..(n-2)} (in a row of 3 consecutive days, the middle t i may not be true without one of the border variables) for n numbers, we generate O(n) clauses (no extra variables)

16 from numbers to clauses between constraints are very similar O(n) clauses and no extra variables total constraints are a bit harder max_total = 6 no subset of variables t i of size 6 can have all variables set true min_total = 4 no subset of variables t i of size n-4 can have all variables set false leads to an exponential number of clauses: O( 2 n ) ⇒ we need a better representation with fewer clauses

17 total constraints at least i events in the complete set ⇔ at least k left OR at least l right, forall k,l: k+l = i+1 instead of expressing the constraint in function of the complete set of numbers, we now use sets of half the size doing this recursively, until the sets are of size 1, leads to an efficient schema (the variable t x represents exactly if the event x is present) O(nlogn) variables and O(n 2 ) clauses 1234567891011121314 ✓✗✗✓✗✗✓✗✗✓✗✗✓✗ 891011121314 ✗✗✓✗✗✓✗ 1234567 ✓✗✗✓✗✗✓ 4 ✓ 12 ✗

18 conclusions we represented the problem by boolean variables we used numberings to express all kinds of constraints on the solutions each number introduced an extra variable and some clauses in total n variables and 0(n) clauses constraints on the numberings were then translated into CNF clauses consecutiveness, between constraints O(n) clauses, no extra variables total constraints need special attention O(nlogn) auxiliary variables and 0(n 2 ) clauses the overall process of translating NRP instances into CNF clauses needs O(nlogn) variables and O(n 2 ) clauses, which is an efficient translation schema

19 Thank you! Questions?


Download ppt "Tommy Messelis * Stefaan Haspeslagh Patrick De Causmaecker *"

Similar presentations


Ads by Google