outline
play

Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING 1. Refinements - PowerPoint PPT Presentation

Refinements on CP Language and Systems Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING 1. Refinements on CP Refinements: Modeling Refinements: Search Lecture 7 Refinements: Constraints Constraint Programming (2) Symmetry Breaking


  1. Refinements on CP Language and Systems Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING 1. Refinements on CP Refinements: Modeling Refinements: Search Lecture 7 Refinements: Constraints Constraint Programming (2) Symmetry Breaking Reification Marco Chiarandini 2. Language and Systems 2 Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Outline A Puzzle Example Reification Reification SEND + MORE = 1. Refinements on CP MONEY Refinements: Modeling Refinements: Search Two representations Refinements: Constraints Symmetry Breaking The first yields initially a weaker constraint propagation. The tree Reification has 23 nodes and the unique solution is found after visiting 19 nodes The second representation has a tree with 29 nodes and the unique 2. Language and Systems solution is found after visiting 23 nodes However for the puzzle GERALD + DONALD = ROBERT the situation is reverse. The first has 16651 nodes and 13795 visits while the second has 869 nodes and 791 visits � Finding the best model is an empirical science 3 5

  2. Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Guidelines Randomization in Search Tree Reification Reification Rules of thumbs for modelling (to take with a grain of salt): Dynamical selection of solution components use representations that involve less variables and simpler constraints in construction or choice points in backtracking. for which constraint propagators are readily available Randomization of construction method or use constraint propagation techniques that require less preprocessing selection of choice points in backtracking (ie, the introduction of auxiliary variables) since they reduce the while still maintaining the method complete search space better. � randomized systematic search . Disjunctive constraints may lead to an inefficient representation since they can generate a large search space. Randomization can also be used in incomplete search use global constraints (see below) 6 8 Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Incomplete Search Incomplete Search Reification Reification Credit-based search Key idea: important decisions are at the top of the tree Credit = backtracking steps Credit distribution: one half at the best child the other divided among the other children. When credits run out follow deterministic best-search In addition: allow limited backtracking steps (eg, 5) at the bottom Control parameters: initial credit, distribution of credit http: among the children, amount of //4c.ucc.ie/~hsimonis/visualization/techniques/partial_search/main.htm local backtracking at bottom. 9 10

  3. Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Incomplete Search Incomplete Search Reification Reification Limited Discrepancy Search (LDS) Barrier Search Key observation that often the heuristic used in the search is Extension of LDS nearly always correct with just a few exceptions. Key idea: we may encounter Explore the tree in increasing several, independent problems number of discrepancies, in our heuristic choice. Each of modifications from the heuristic these problems can be choice. overcome locally with a limited amount of backtracking. Eg: count one discrepancy if second best is chosen count two discrepancies either At each barrier start LDS-based if third best is chosen or twice backtracking the second best is chosen Control parameter: the number of discrepancies 11 12 Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Handling special constraints Language and Systems Symmetry Breaking Symmetry Breaking Local Search for CSP Reification Reification Higher order constraints Definition Uses a complete-state formulation: a value assigned to each variable Global constraints are complex constraints that are taken care of by (randomly) means of a special purpose algorithm. Changes the value of one variable at a time Modelling by means of global constraints is more efficient than relying on the general purpose constraint propagator. Min-conflicts heuristic is effective particularly when given a good initial state. Examples: Run-time independent from problem size alldiff for m variables and n values cannot be satisfied if m > n , Possible use in online settings in personal assignment: repair the consider first singleton variables schedule with a minimum number of changes propagation based on bipartite matching considerations 13 15

  4. Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Reification Reification cumulative for RCPSP [Aggoun and Beldiceanu, 1993] S j starting times of jobs P j duration of job sortedness for job shop [Older, Swinkels, and van Emden, 1995] R j resource consumption sortedness ([ X 1 , . . . , X n ] , [ Y 1 , . . . , Y n ]) := R limit not to be exceeded at any point in time { ([ d 1 , . . . , d n ] , [ e 1 , . . . , e n ]) | [ e 1 , . . . , e n ] is the sorted permutation of [ d 1 , . . . , d n ] } cumulative ([ S j ] , [ P j ] , [ R j ] , R ) := � { ([ s j ] , [ p j ] , [ r j ] R ) | ∀ t r i ≤ R } i | s i ≤ t ≤ s i + p i The special purpose algorithm employes the edge-finding technique (enforce precedences) 16 17 Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Reification Reification circuit ( x ) imposes Hamiltonian cycle on digraph. among ( x | v, l, u ) at least l and at most v variables take values in the set v . clique ( x | G, k ) requires that a given graph contain a clique bin − packing ( x | w, u, k ) pack items in k bins such that they do conditional ( D , C ) between set of constrains D ⇒ C not exceed capacity u cutset ( x | G, k ) requires that for the set of selected vertices V ′ , the cardinality ( x | v, l, u ) at least l j and at most u j of the variables set V \ V ′ induces a subgraph of G that contains no cycles. take the value v j cardinality − clause ( x | k ) � n cycle ( x | y ) select edges such that they form exactly y cycles. j =1 x j ≥ k directed cycles in a graph. cardinality − conditional ( x, y | k, l ) if � n j =1 x j ≥ k then diffn (( x 1 , ∆ x 1 ) , . . . , ( x m , ∆ x m )) arranges a given set of � m j =1 y j ≥ l multidimensional boxes in n -space such that they do not overlap change ( x | k, rel ) counts number of times a given change occur ... 18 19

  5. Refinements: Modeling Refinements: Modeling Refinements: Search Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Symmetry Breaking Symmetry Kinds of symmetries Reification Reification Variable symmetry: inherent in the problem (sudoku, queens) permuting variables keeps solutions invariant (eg, N-queens) artefact of the model (order of groups) { x i → v i } ∈ sol ( P ) ⇔ { x π ( i ) → v i } ∈ sol ( P ) How can we avoid it? Value symmetry: permuting values keeps solutions invariant (eg, GCP) ... by model reformulation (eg, use set variables, { x i → v i } ∈ sol ( P ) ⇔ { x i → π ( v i ) } ∈ sol ( P ) ... by adding constraints to the model (ruling out symmetric solutions) Variable/value symmetry: ... during search permute both variables and values (eg, sudoku?) { x i → v i } ∈ sol ( P ) ⇔ { x π ( i ) → π ( v i ) } ∈ sol ( P ) ... by dominance detection 21 22 Refinements: Modeling Refinements: Search Refinements on CP Refinements on CP Refinements: Constraints Language and Systems Language and Systems Symmetry Breaking Reified constraints Outline Reification Constraints are in a big conjunction How about disjunctive constraints? 1. Refinements on CP A + B = C ∨ C = 0 Refinements: Modeling or soft constraints? Refinements: Search Refinements: Constraints Symmetry Breaking Solution: reify the constraints: Reification ( A + B = C ⇔ b 0 ) ∧ ( C = 0 ⇔ b 1 ) ∧ ( b 0 ∨ ⇔ true ) b 1 2. Language and Systems These kind of constraints are dealt with in efficient way by the systems Then if optimization problem (soft constraints) ⇒ min � i b i 24 25

Recommend


More recommend