Presentation is loading. Please wait.

Presentation is loading. Please wait.

7/14/20151 Constraint Programming 2001 Edition Jan Maluszynski and Ulf Nilsson TCSLAB, LiU {janma,

Similar presentations


Presentation on theme: "7/14/20151 Constraint Programming 2001 Edition Jan Maluszynski and Ulf Nilsson TCSLAB, LiU {janma,"— Presentation transcript:

1 7/14/20151 Constraint Programming 2001 Edition Jan Maluszynski and Ulf Nilsson TCSLAB, LiU {janma, ulfni}@ida.liu.se http://www.ida.liu.se/~ulfni/cp2001

2 7/14/20152 Course organization

3 7/14/20153 Course organization (cont’d)

4 7/14/20154 Course organization (cont) zObligatory course assignments (23 Oct) with deadline 20 Nov, and examination 27 Nov zCourse credit points 4 zLiterature: K. Marriott and P. Stuckey Programming with Constraints: An Introduction MIT Press, 1998. + handouts and on-line manuals

5 7/14/20155 A simple definition zConstraint programming is the study of computational systems based on constraints. zConstraints are roughly systems of equations, inequations and disequations over some algebraic structure. zThe idea of constraint programming is to solve problems by encoding the problem as a set of constraints and exploring solutions to the constraints.

6 7/14/20156 Typical problem zProcesses A-D may start at times 1,2,3,4,5,6,7 zProcess A uses 3 resources during 2sec zProcess B uses 1 resource during 4sec zProcess C uses 2 resources during 1sec zProcess D uses 2 resources during 1sec zThere are 4 resources zProcess A must finish before C can start zWhen are A, B, C, D earliest finished?

7 7/14/20157 Overview zConstraints, basics, operations, domains yFocus on finite domains, intervals zConstraint logic programming zModeling and applications zSystems yCLP-systems ySystems for defining constraints CHR, HAL

8 7/14/20158 Constraints zA constraint problem consists of a set of problem variables ranging over some domain and a set of constraints restricting the values that may be assigned to the variables. zExample: x in {1,2,3}, y in {2,3,4,5}, 2x = y zExamples of domains: Reals/rationals, intervals, finite domains, Booleans, sets, monoids (strings) etc

9 7/14/20159 Methods for constraint solving zReals/rational constraints yGauss-Jordan elimination + Simplex zReal/Rational intervals yinterval narrowing, box consistency, yGauss-Seidel elimination, interval Newton method, zBooleans yfor example, operations on BDD’s zFinite domains yarc, node and path consistency methods yconstraint propagation (forward checking, look-ahead)

10 7/14/201510 Optimization zFinding a solution which satisfies constraints and minimizes/maximizes objective function zDifferent types ycombinatorial optimization of discrete (finite domain) variables ylinear optimization for continuous variables

11 7/14/201511 Different constraint systems zReal/rational constraints: CLP(R), CLP(Q) CLP(R), Sicstus Prolog, CHIP zFinite domains constraints: CLP(FD) Sicstus Prolog, CHIP zBoolean constraints: CLP(B) Sicstus Prolog, CHIP zInterval constraints: CLP(I) CLP(BNR), Numerica, Prolog IV

12 7/14/201512 Systems discussed in the course zSICStus Prolog zChip 5.2 zProlog IV zCHR zHAL

13 7/14/201513 The programming paradigm CLP Logic programming Optimization Constraint satisfaction/solving

14 7/14/201514 Logic programming zLogic (relations) for problem description zDeclarative description style (problem description separated from its solving) zUnification (a kind of constraint solving) zBuiltin search zConstraint programming does not need LP !!!

15 7/14/201515 Some applications zSpatial and temporal problems zPlacment and layout zManpower planning zScheduling zResource allocation zConfiguration management zVerification (e.g. correctness, safety+liveness)

16 7/14/201516 Placement/Layout A window contains a number of widgets. As the window is shrinking or growing the widgets have to be repositioned while satisfying certain constraints (e.g. certain widgets must always be visible or must be in a certain relation to other widgets). Given a certain window size, produce a layout that satisfies the constraints.

17 7/14/201517 Scheduling A conference consists of 11 sessions of equal length. The program is to be organized as a sequence of slots, where a slot contains up to 3 parallel sessions: 1.Session 4 must take place before Session 11. 2.Session 5 must take place before Session 10. 3.Session 6 must take place before Session 11. … 8.Session 6 must not be in parallel with 7 and 10. 9.Session 7 must not be in parallel with 8 and 9. 10.Session 8 must not be in parallel with 10. Minimize the number of slots.

18 7/14/201518 Job shop scheduling There are n jobs and m machines. Each job requires execution of a sequence of operations within a time interval, and each operation O i requires exclusive use of a designated machine M i for a specied amount of processing time p i. Determine a schedule for production that satisfies the temporal and resource capacity constraints.

19 7/14/201519 Manpower planning Airport Counter Allocation problem: Allocate enough counters and staff (the number depends on the aircraft type) to each flight. The counters are grouped in islands and for each flight all assigned counters have to be in the same island. The staff has working regulations that must be satisfied (breaks etc).

20 7/14/201520 Black-box vs Glass-box solvers zMost systems rely on non-extensible, black-box constraint solvers yEfficiency unpredictable yHard to debug zSome systems facilitate defining new constraints and solvers (glass-box approach) yImproved control of propagation and search yExamples CHR, HAL,... zThen again, most problems are NP-complete...


Download ppt "7/14/20151 Constraint Programming 2001 Edition Jan Maluszynski and Ulf Nilsson TCSLAB, LiU {janma,"

Similar presentations


Ads by Google