an optimal arc consistency algorithm for a chain of
play

An optimal Arc Consistency algorithm for a chain of Atmost - PowerPoint PPT Presentation

The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work An optimal Arc Consistency algorithm for a chain of Atmost constraints with cardinality Mohamed Siala , Emmanuel Hebrard, and


  1. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work An optimal Arc Consistency algorithm for a chain of Atmost constraints with cardinality Mohamed Siala , Emmanuel Hebrard, and Marie-Jos´ e Huguet Toulouse, France Mohamed SIALA October 2012 CP 2012 1 / 23

  2. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Outline The AtMostSeqCard constraint Filtering the domains Experimental results Conclusion & Future work Mohamed SIALA October 2012 CP 2012 2 / 23

  3. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Definition AtMostSeqCard ( u , q , d , [ x 1 , . . . , x n ]) ⇔ n − q q n � � � ( x i + l ≤ u ) ∧ ( x i = d ) i =0 i =1 l =1 Mohamed SIALA October 2012 CP 2012 3 / 23

  4. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Definition AtMostSeqCard ( u , q , d , [ x 1 , . . . , x n ]) ⇔ n − q q n � � � ( x i + l ≤ u ) ∧ ( x i = d ) i =0 i =1 l =1 Example AtMostSeqCard (2 , 4 , 4 , [ x 1 , . . . , x 7 ]) 0 1 1 0 1 1 0 1 1 0 0 1 0 1 — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Mohamed SIALA October 2012 CP 2012 3 / 23

  5. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. Mohamed SIALA October 2012 CP 2012 4 / 23

  6. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . Mohamed SIALA October 2012 CP 2012 4 / 23

  7. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . • AmongSeq : the conjunction of all n − q + 1 Among on q consecutive variables (i.e. � n − q i =0 Among ([ x i +1 , . . . , x i + q ])). Mohamed SIALA October 2012 CP 2012 4 / 23

  8. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . • AmongSeq : the conjunction of all n − q + 1 Among on q consecutive variables (i.e. � n − q i =0 Among ([ x i +1 , . . . , x i + q ])). • Gen-Sequence : Conjunction of (consecutive) Among Mohamed SIALA October 2012 CP 2012 4 / 23

  9. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . • AmongSeq : the conjunction of all n − q + 1 Among on q consecutive variables (i.e. � n − q i =0 Among ([ x i +1 , . . . , x i + q ])). • Gen-Sequence : Conjunction of (consecutive) Among • AtMostSeqCard ≡ AmongSeq ⊕ a cardinality constraint Mohamed SIALA October 2012 CP 2012 4 / 23

  10. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . • AmongSeq : the conjunction of all n − q + 1 Among on q consecutive variables (i.e. � n − q i =0 Among ([ x i +1 , . . . , x i + q ])). • Gen-Sequence : Conjunction of (consecutive) Among • AtMostSeqCard ≡ AmongSeq ⊕ a cardinality constraint → AtMostSeqCard can be encoded with a Gen-Sequence Mohamed SIALA October 2012 CP 2012 4 / 23

  11. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Context Sequence Constraints • Let [ x 1 , . . . , x n ] be a sequence of integer variables. • The Among constraint ensures that the number of occurrences of values in { v 1 .. v k } in a subsequence [ x i 1 , . . . , x iq ] is bounded between l and u . • AmongSeq : the conjunction of all n − q + 1 Among on q consecutive variables (i.e. � n − q i =0 Among ([ x i +1 , . . . , x i + q ])). • Gen-Sequence : Conjunction of (consecutive) Among • AtMostSeqCard ≡ AmongSeq ⊕ a cardinality constraint → AtMostSeqCard can be encoded with a Gen-Sequence → AtMostSeqCard can be encoded with a Global Sequencing Constraint ( Gsc ) Mohamed SIALA October 2012 CP 2012 4 / 23

  12. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Existing complexities Gen-Sequence • cost-Regular encoding: O (2 q n ) [Van Hoeve et al, 2009] • Gen-Sequence: O ( n 3 ) [Van Hoeve et al, 2009] • Flow-based Algorithm: O ( n 2 ) [Maher et al, 2008] Gsc • Gcc encoding, Not AC, NP-Hard [Puget and R´ egin, 1997] Mohamed SIALA October 2012 CP 2012 5 / 23

  13. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Why the AtMostSeqCard constraint? [1] Figure: The car-sequencing problem Mohamed SIALA October 2012 CP 2012 6 / 23

  14. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work Why the AtMostSeqCard constraint? [2] 7 days, 4 employees, 3 periods, 40h per week, Atmost(1,3) D E N D E N D E N D E N D E N D E N D E N d emp 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 5 emp 2 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 5 emp 3 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 5 emp 4 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 5 Table: Crew-rostering problem Mohamed SIALA October 2012 CP 2012 7 / 23

  15. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work The proposed algorithm • Let ( x 1 , . . . , x n ) be a boolean sequence subject to AtMostSeqCard ( u , q , d , [ x 1 , . . . , x n ]) • Our filtering algorithm is based on a greedy procedure (denoted by leftmost ). • leftmost : computes an assignment w maximizing the cardinality of the sequence with respect to the AtMost constraints. Mohamed SIALA October 2012 CP 2012 8 / 23

  16. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 . 0 0 0 . 0 1 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

  17. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 → . — 0 0 0 0 . 0 1 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

  18. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 → . — 0 0 0 0 — 0 . 0 1 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

  19. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 → . — 0 0 0 0 0 — 0 . — 0 1 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

  20. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 → . — 0 0 0 0 1 0 — 0 . — 0 1 — 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

  21. The AtMostSeqCard constraint Filtering the domains Experimental results LAAS-CNRS Conclusion & Future work − → w = leftmost ( u = 2, q = 4) c x i w max 1 2 3 4 . 0 0 0 0 1 1 0 0 . 0 1 1 . 0 . 0 . 0 0 0 . 0 0 0 1 1 . 0 . 0 1 1 . 0 . 0 Mohamed SIALA October 2012 CP 2012 9 / 23

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend