1 / 73

Case study 5: balanced academic curriculum problem

Case study 5: balanced academic curriculum problem. Joint work with Brahim Hnich and Zeynep Kiziltan (CPAIOR 2002). Outline. Introduction Balanced Academic Curriculum Problem (BACP) Alternate Models Combined Models Experimental Results Conclusions. Introduction.

avery
Download Presentation

Case study 5: balanced academic curriculum problem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Case study 5: balanced academic curriculum problem Joint work with Brahim Hnich and Zeynep Kiziltan (CPAIOR 2002)

  2. Outline • Introduction • Balanced Academic Curriculum Problem (BACP) • Alternate Models • Combined Models • Experimental Results • Conclusions

  3. Introduction • Modelling optimisation problems as CSPs requires many skills • Quite often alternate models are tried • models that add implied constraints • models that add symmetry-breaking constraints • models that use different variable representation • models that use different constraint formulation • combined models • solved with the same solution method • solved with different solution methods

  4. Recipe • Create a basic model • Decide on the variables • Introduce auxiliary variables • For messy/loose constraints • Consider dual, combined or 0/1 models • Break symmetry • Add implied constraints • Customize solver • Variable, value ordering

  5. BACP: description • Each course has associated a numberof credits • some courses can have other courses as prerequisite • a minimum amount of credits per period is required • a maximum amount of credits per period is allowed • a minimum number of courses per period is required • a maximum number of courses per period is allowed Periods 1 2 3 4 1 2 3 4 Courses 5 6 7 8

  6. BACP: objective • Assign a period to every course such that the following constraints are satisfied: • the minimum and maximum academic load for each period • the minimum and maximum number of courses for each period • the prerequisite relationships • An optimal balanced curriculum minimises the maximum academic load for all periods

  7. Periods Cur1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 Courses 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 Model 1: variables

  8. Model 1: constraints • Each course is taught  jperiods Cur1[i,j] = 1 • Min and max courses per period c   icourses Cur1[i,j] d

  9. Model 1: constraints • Each course is taught  jperiods Cur1[i,j] = 1 • Min and max courses per period c   icourses Cur1[i,j] d • Academic load in each period more messy • Each course comes with a weight • Is there a way of dealing with this constraint efficiently?

  10. Recipe • Create a basic model • Decide on the variables • Introduce auxiliary variables • For messy/loose constraints • Consider dual, combined or 0/1 models • Break symmetry • Add implied constraints • Customize solver • Variable, value ordering

  11. Refine Model 1: auxiliary vars • Add auxiliary variables to compute academic load in each period Load(j) = icourses credit(i)*Cur1[i,j]

  12. Load 0..maxint 0..maxint 0..maxint 0..maxint Periods Cur1 0..1 0..1 0..1 0..1 =1 0..1 0..1 0..1 0..1 . . . . . 0..1 0..1 0..1 0..1 Courses 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 =1 Periods Model 1: variables

  13. Good News: all constraints are linear: we can also employ ILP methods Bad News: prerequisite constraints: too many constraints high arity-constraints We refer to model 1 as CP1 when CP solver is used and ILP when ILP solver is used Model 1: constraints Objective function: minimize max(Load) Computing load of period j: Load(j) = icourses credit(i)*Cur1[i,j] Restricting the load of period j: a  Load(j)  b Restricting the number of courses of period j: c   icourses Cur1[i,j] d Prerequisite constraints btw i and j: k-1  kperiods: k> 1 Cur1[j,k]   r=1 Cur1[i,r]

  14. Breaking symmetry • Shouldn’t we be worrying about breaking symmetry?

  15. Breaking symmetry • Shouldn’t we be worrying about breaking symmetry? • Not really • Time periods are not usually symmetrical due to pre-requisites • Similarly courses are only symmetrical if they carry the same load and pre-requisites

  16. Alternative models? • Model 1 has lots of 0/1 variables • Can’t we exploit larger domains that CSPs give us?

  17. Load 0..maxint 0..maxint 0..maxint 0..maxint Periods Model 2: variables courses Cur2 in periods in periods in periods in periods in periods

  18. Good News: use of global constraints efficient statement of prerequisite constraints Bad News: load computation: more Boolean variables more reification constraints We refer to model 2 as CP2 Model 2: constraints Objective function: minimize max(Load) Computing load of period j: Load(j) = icourses credit(i)*B i,j B i,j  Cur2[i]=j, for all i Restricting the load of period j: a  Load(j)  b Restricting the number of courses of period j: atleast(j, Cur2,c) atmost(j,Cur2,d) Prerequisite constraint btw i and j: Cur2[i] < Cur2[j]

  19. Model CP1 vs. Model CP2 • CP2 • Good News: • use of global constraints to restriction number of courses • statement of prerequisite constraints • Bad News: • statement of academic load constraint • CP1 • Good News: • academic load constraint easily stated by a weighted column sum • Bad News: • statement of prerequisite constraints

  20. Combined model CP1+CP2 Cur1[i,j]=1  Cur2[i]=j • CP2 • Good News: • use of global constraints to restriction number of courses • statement of prerequisite constraints • Bad News: • statement of academic load constraint • CP1 • Good News: • academic load constraint easily stated by a weighted column sum • Bad News: • statement of prerequisite constraints Bad News - Channelling constraints - Increased number of variables

  21. Model ILP vs Model CP2 • CP2 • Good News: • use of global constraints to restriction number of courses • statement of prerequisite constraints • Bad News: • statement of academic load constraint • ILP • Good News: • academic load constraint easily stated by a weighted column sum • all constraints are linear • Bad News: • statement of prerequisite constraints

  22. Hybrid model ILP+CP2 Cur1[i,j]=1  Cur2[i]=j • CP2 • Good News: • statement of prerequisite constraints • ILP • Good News: • academic load constraint easily stated by a weighted column sum • all constraints are linear • Bad News: • statement of prerequisite constraints Bad News - Channelling constraints - Increased number of variables

  23. Finding optimal solution • We used three real-life instances • CP1+CP2 is the quickest • due to the increase in the amount of pruning that compensated the increase in variables and constraints • ILP+CP2 is second best model • better than CP2 in all instance • better than ILP in two instances • CP model is essential in reducing the search space while the ILP model with its relaxation is essential for bounding and guiding the search

  24. Proving optimality • Proving Optimality • ILP+CP2 is quicker than ILP on two instances, and is the quickest on these instances • ILP+CP2 benefits from CP model in reducing the search space, and from the relaxation of the ILP model • It is tough for all CP models (CP1, CP2, CP1+CP2) to prove optimality

  25. Yet other alternate models Viewing BACP as a set partitioning problem • the set of courses ought to be partitioned into n subsets, one for each periods • n set variables that are subsets of the set of courses • the union of all set variables is the set of courses • all set variables must be pair-wise disjoint • all constraints of BACP can easily be stated using weighted cardinality, and cardinality constraints • except, the prerequisite constraints! • To enhance the model based on set variables, we can also channel into the model CP2

  26. Conclusions • Lesson 1: When constraints are difficult to specify in a particular model, we should consider channelling into a second model in which these constraints are easier to specify and reason about • Lesson 2: • CP models may excel in finding optimal or near-optimal solutions • ILP models may be better for proving optimality

  27. Conclusions • Lesson 3: CP and ILP tools should provide efficient primitives for channelling between models • Lesson 4: careful integration of different models can result in better models despite the increase in the number of variables and constraints

  28. Case study 6: Steel Mill Slab Design Problem Joint work with Alan Frisch and Ian Miguel

  29. Overview • The slab design problem • An example • Model A • Model B • A dual model A/B • Results • Conclusion/Future Work

  30. Background • This work is based on the problem as stated in: • “Variable Sized Bin Packing with Color Constraints”, Dawande, Kalagnanam and Sethuraman 1998. • Approximation algorithms guaranteed to be within some bound of an optimal solution.

  31. Motivation • Many problems exhibit flexibility in portions of their structure. • Example: the number required of a certain type of variable. • Flexibility must be resolved during the solution process. • Slab design is a representative example of this type of problem.

  32. The Slab Design Problem • The mill can make  different slab sizes. • Given j input orders with: • A colour (route through the mill). • A weight. • Pack orders onto slabs such that the total slab capacity is minimised, subject to: • Capacity constraints. • Colour constraints.

  33. Slab Design Constraints • Capacity: • Total weight of orders assigned to a slab cannot exceed slab capacity. • Colour: • Each slab can contain at most p of k total colours. • Reason: expensive to cut slabs up to send them to different parts of the mill.

  34. An Example • Slab Sizes: {1, 3, 4} ( = 3) • Orders: {oa, …, oi} (j = 9) • Colours: {red, green, blue, orange, brown} (k = 5) • p = 2 3 2 2 1 1 1 1 1 1 a b c d e f g h i

  35. An Example Solution • 6 Slabs: 2 h 3 1 e 2 1 b f a 1 1 1 1 g c d i (size 4) (size 3) (size 3) (size 1) (size 1) (size 1)

  36. Recipe • Create a basic model • Decide on the variables • Introduce auxiliary variables • For messy/loose constraints • Consider dual, combined or 0/1 models • Break symmetry • Add implied constraints • Customize solver • Variable, value ordering

  37. Basic model • What are the variables? • Need to assign sizes to slabs • Complicated because we don’t even know how many slabs will be used

  38. Model A – Redundant Variables • Slabs cannot be more than orders • Assuming greatest order weight does not exceed maximum slab size • A list, S, of slab variables: {s1, …, sj}. • Domains size . • Solution quality:

  39. Slab Variable Redundancy • Some slab variables may be redundant: • 0 is added to the domain of each si. • If si is not necessary to solve the problem, si = 0.

  40. Slab Variable Symmetry • Slab variables are indistinguishable. • So model A suffers from symmetry: • Counteract with binary symmetry-breaking constraints: s1s2, s2s3, etc.

  41. Basic model • What are the variables? • Need to assign orders to slabs • Want to compute weight on each slab efficiently

  42. Model A Order Matrix (Oa)

  43. More Slab Symmetry • Slab variables assigned the same size are indistinguishable • If si and si+1 have the same size, the corresponding rows of the order matrix are lexicographically ordered. • E.g. 1001  0110.

  44. Colour constraints • Need to count how many colours used on a slab • Counting hard • Channel into a matrix of 0/1 variables and sum rows

  45. Colour Matrix: colourMa Channelling:

  46. Model A of the Example Problem 3 2 2 1 1 1 1 1 1 oa ob oc od oe of og oh oi

  47. A Solution: Model A 3 2 2 1 1 1 1 1 1 oa ob oc od oe of og oh oi s1 = 4, s2 = 3, s3 = 3, s4 = 3, si = 0 (5  i  9)

  48. Recipe • Create a basic model • Decide on the variables • Introduce auxiliary variables • For messy/loose constraints • Consider dual, combined or 0/1 models • Break symmetry • Add implied constraints • Customize solver • Variable, value ordering

  49. Model A Implied Constraints • Combined weight of input orders is a lower bound on optimisation variable: • Lower bound on number of slabs required: • With symmetry-breaking constraints, decomposes • into unary constraints on slab variables.

  50. Model A Implied Constraints (2) • AssWti is the weight of orders assigned to si. • Prune domains by reasoning about reachable values via dynamic programming [Trick, 2001]. • Incorporate both size and colour information. • More powerful if done during search (future work). • Minimum number of slabs required:

More Related