1 / 53

An Introduction to Constraint Programming Part II: Solving Scheduling Problems

An Introduction to Constraint Programming Part II: Solving Scheduling Problems. J. Christopher Beck Dept. of Mechanical & Industrial Engineering University of Toronto Canada. Where We Left Off …. CP has been mostly developed to solve combinatorial feasibility and optimization problems

jereni
Télécharger la présentation

An Introduction to Constraint Programming Part II: Solving Scheduling Problems

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. An Introduction toConstraint Programming Part II:Solving Scheduling Problems J. Christopher BeckDept. of Mechanical & Industrial EngineeringUniversity of TorontoCanada

  2. Where We Left Off … • CP has been mostly developed to solve combinatorial feasibility and optimization problems • General solution approach: tree search with inference at each node • no generic relaxation • Key concept: global constraint propagation

  3. Global Constraints • A constraint over an arbitrary number of variables that embodies a frequently encountered sub-problem • all-different(v1, …, vk), global cardinality • disjunctive/cumulative resource • grammar • … • [still some arguments about this within CP] Global Constraint Catalog www.emn.fr/z-info/sdemasse/gccat/index.html

  4. Global Constraints • A global constraint representsa commonly occurring problemsubstructure • The focus of modeling and solving techniques • models are conjunctions of global constraints • solving is typically tree search with domain consistency enforced at every node

  5. Differences with MIP • Richer, extensible language • Focus on global constraints • Traditionally no explicit use of lower bounds • no optimization function • constraint satisfaction problems • less focus on relaxations • less true now: LBs “inside” global constraints

  6. When to Choose CP • <Handwaving mode on> • Finding a feasible solution is hard • intricate set of complicated constraints • No tight relaxations • Existing global constraints model parts of your problem • Strong back-propagation

  7. Questions?

  8. Operation/Task/ Activity Job Precedence Constraint Job Shop Scheduling

  9. makespan Job Shop Scheduling

  10. Notation estj ectj lstj lctj pj pj – processing time of activity j (aka duration) estj – earliest start time of activity j lstj – latest start time of activity j ectj – earliest completion time of activity j lctj – latest completion time of activity j

  11. Notation [estj lstj] [ectj lctj] pj Domain of start times (represented by an interval)

  12. 20 15 10 15 0 Temporal Propagation(Arc Consistency - AC) The same as CPM [0 40] [20 60] [35 75] [45 85] 20 15 10 15 0 100 20 [20 40] [40 60] [55 75] [65 85] 100

  13. 20 35 80 Simplified Edge-Finding (aka Constraint-Based Analysis (CBA)) • What can you infer here? 15 50 90 Operations on the same unary capacity resource

  14. 25 20 10 15 15 0 10 80 100 est(S) S lct(S) Edge-Finding Exclusion

  15. 70 100 25 20 10 15 15 0 75 10 100 est(S) S lct(S) Edge-Finding Exclusion

  16. On the sameunary-capacity resource estA est(S) + dur(S) lftA lft(S) - dur(S) (lft(S) - est(S) < durA + dur(S))  (lft(S) - estA < durA + dur(S)) (lft(S) - est(S) < durA + dur(S))  (lftA - est(S) < durA + dur(S)) Exclusion Rules For all non-empty subsets, S, and activities AS:

  17. Algorithm [Vilim et al 05] • With a clever data structure (Θ-Λ-trees) a set of activities can be updated in O(n log n) time • An easier-to-understand algorithm can do it in O(n2) [Nuijten 1994]

  18. CP vs. MIP for JSP Mean relative error vs. best known solution

  19. Schedule Schedule Schedule Resource Allocation & Scheduling Assign jobs [Hooker 2005] Constraints, 10, 385-401, 2005.

  20. CP Model minimize cost of assignment all jobs assign to 1 resource global resource constraint bounds on start time var. [Heinz & Beck 2012] CPAIOR 2011.

  21. MIP Time-indexed Model resource capacity at each time point

  22. Logic-Based Benders Decomp. Global Model Master Problem Cut Cut Solution Solution Subproblem 1 Subproblem n . . . [Hooker & Ottosson 2003] Mathematical Programming,96, 33-60, 2003.

  23. Assignment Cuts The Approach Assign jobs • Assign jobs to resources subject to sub-problem relaxation and Benders cuts • Schedule independently • Send Benders cuts back to master • Repeat

  24. LBBD Model SP relaxation MP Benders cuts global resource constraint SP [Hooker 2005] Constraints, 10, 385-401, 2005.

  25. Results Number problems (out of 195) for which each method found: [Heinz & Beck 2012] CPAIOR 2012.

  26. But wait, there’s more …

  27. Better LBBD tighter SP relaxation [Hooker 2007] Operations Research 55 2013.

  28. New MIP Model redundant variables use tighter SP relaxation from LBBS as a redundant resource capacity constraint [Heinz, Ku, & Beck 2013] CPAIOR 2013.

  29. Results [Heinz, Ku, & Beck 2013] CPAIOR 2013.

  30. Confused?

  31. Conclusions from Experiments • CP is worst? • well, it finds very high quality solutions is a very short time • MIP is still a very strong technology even for scheduling problems • Hybrids! • CP is a key part of LBBD • I didn’t show you the main point of the paper …

  32. Full Results CIP = constraint integer programming [Heinz, Ku, & Beck 2013] CPAIOR 2013.

  33. CP Hybrids

  34. OR CP/OR Integration 1 • OR inside • For years CP has been using OR algorithms “inside” global constraints • edge-finding, all-diff, etc. Cost-based pruning in TSPTW

  35. CP/OR Integration 2 • Cooperating solvers, solving the same problem • Model the problem in CP, model the problem in MP, solvers communicate through the variables • MP is “master” and CP suppliesnew implied constraints • CP is “master” and MP supplies lowerbounds, relaxed optimal solutions, etc. • Higher level control: dynamic “master-slave” relationship ETSP

  36. CP/OR Integration 3 • Decomposition • Overall problem is divided between CP and MP solvers • Benders decomposition (MP master, CP slave) • Column generation Column generation Benders decomposition

  37. CP/OR Integration 4 • Deep integration • incorporation global constraint inference into a MIP search • Constraint Integer Programming: SCIP • SIMPL

  38. MIE1619:Constraint Programming &Local Search J. Christopher BeckDept. of Mechanical & Industrial EngineeringUniversity of TorontoCanada

  39. Advanced Grad Course • Course is for “doctoral stream” students • This will be a challenging course • 1-2 papers to read per week • 10-15 hours/week outside lectures • I expect a high-level of performance both in class participation and in the project • Expected level: publishable!

  40. Goals • Apply Constraint Programming (CP) and/or Local Search (LS) to your research interests • Teach “grad school” skills • Literature research, algorithmic research, writing research papers, writing peer reviews, giving presentations, being an active member of the research community

  41. Evaluation

  42. Research Paper Goal • Apply CP and/or LS to your research topic • I have some ideas for people who are stuck • Publish! • The goal (but not a requirement) • The paper you hand in for this course should be publishable • And usable as part of your thesis

  43. Lecture Goal • Doing the readings is essential • You are expected to participate each week • I will ask people to explain particular points • Starting in Week 3, you will begin preparing questions based on the readings

  44. Outline • Intro: 1 week • CP: 3 weeks • LS: 2 weeks • Writing Peer Reviews: 0.5 weeks • OR/CP/LS Hybrids: 4.5 weeks • Project Presentations: 1 or 2 weeks

  45. Questions?

  46. Search: Texture Measurements • Algorithms for the analysis of the constraint graph representation of a search state • Heuristic search idea: • Use texture measurement to reveal problem structure • Formulate heuristic commitment based on the structure

  47. The SumHeight Heuristic Find the resource, R*, and time point, t*, with highest competition Find the 2 activities not sequenced with each other with the highest individual demand for R* at t* Heuristically, post a sequencing constraint between them

  48. The SumHeight Texture: Individual Demand individual demand for R2 time A1 est ect lst lct

  49. aggregate demand for R2 time The SumHeight Texture: Aggregate Demand Dynamic Focus of Attention R2 R2 R2

  50. Search • At each node (after propagation) • recalculate texture measurements • identify peaks • identify activity pair, A, B • branch on (A  B) OR (B  A) • See [Beck 1999] for more than you want to know about this

More Related