implementing semiring based constraints using mozart
play

Implementing Semiring-Based Constraints using Mozart Alberto - PowerPoint PPT Presentation

Implementing Semiring-Based Constraints using Mozart Alberto Delgado Carlos Alberto Olarte Jorge Andres Perez Camilo Rueda 1 1 Pontificia Universidad Javeriana-Cali Mozart/Oz Conference 2004 Delgado A., Olarte C., Perez J. and Rueda C.


  1. Implementing Semiring-Based Constraints using Mozart Alberto Delgado Carlos Alberto Olarte Jorge Andres Perez Camilo Rueda 1 1 Pontificia Universidad Javeriana-Cali Mozart/Oz Conference 2004 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  2. Motivation CSP CSP is an expressive approach for modelling many real life problems, but it is not flexible enough to deal with: Over-constrained settings Preferences Non-crisp constraints Uncertainties SCSP SCSP extends CSP by allowing preferences, uncertainty, probabilities and similar ideas. Some proposals: Fuzzy CSP [Dubois,93] Partial CSP [Freuder,92] VCSP [Schiex,95] C-semirings [Bistarelli,97] Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  3. Motivation Cont. The problem There are not many solvers for SCSP. Most of them using CLP: CLP(FD,S) [Georget,98] Semiring integration with CHR [Bistarelli, 02] Evaluation-based semiring Meta-Constraints [Kelleher,03] But, what about CCP? Our contribution To integrate mechanisms for handling semiring-based constraints into the Mozart system. Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  4. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  5. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  6. C-semiring formalism Defines a semiring structure � A , + , × , 0 , 1 � where : A is the set of possible valuations × is used to combine constraints + is the operator to order the elements in A ( a ≥ s b iff a + b = a ) 0 , 1 are the min and max elements in A Some instances: Classic CSP: �{ false , true } , ∨ , ∧ , false , true � Fuzzy CSP: �{ x | x ∈ [0 , 1] } , max , min , 0 , 1 � Weighted CSP: �ℜ + , min , + , + ∞ , 0 � Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  7. C-semiring formalism (cont.) Some Definitions A Constraint System is a tuple � V , D , S � where V is a set of variables, D the variable domains and S a c-semiring A Constraint is a tuple � def , con � where con is a set of variables and the function def : D | con | → A represents the tuple valuations. Given c 1 = � def 1 , con 1 � and c 2 = � def 2 , con 2 � , the Constraint Combination c 1 ⊗ c 2 is the constraint c 3 = � def 3 , con 3 � with def 3 ( t ) = def 1 ( t ↓ con 1 con 3 ) × def 2 ( t ↓ con 2 con 3 ) and con 3 = con 1 ∪ con 2 A Soft CSP ( SCSP ) is a tuple � C , con � where C is a set of constraints and con a set of variables Sol(P) : The solution of the SCSP P = � C , con � is the constraint � c i ∈ C ↓ con Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  8. An Example Given the SCSP: Using S Fuzzy , def Sol ( P ) (2 , 1) = min (0 . 6 , 0 . 2 , 0 . 4) = 0 . 2, def Sol ( P ) (1 , 1) = 0 . 3 and � 2 , 1 � ≤ s � 1 , 1 � Using S Weighted , def Sol ( P ) (2 , 1) = +(0 . 6 , 0 . 2 , 0 . 4) = 1 . 2, def Sol ( P ) (1 , 1) = 1 . 1 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  9. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  10. How does CCP work in Mozart Propagation Propagators impose constraints narrowing the variable domains Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  11. How does CCP work in Mozart Distribution Propagation is not complete. When a computation space becomes stable two choices are created: in most cases X i = V and X i � = V Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  12. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  13. Soft Propagators We provide propagators (soft ones) dealing with the c-semiring formalism concepts They exploit standard mechanisms ( CPI ) for extending Mozart with new constraint systems and user-defined constraints Each propagator implements a filter and a valuation ( def ) function. The latter is computed only when the propagator becomes entailed , saving space and time. Filter is written according to the valuation function Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  14. Current Implementation Propagators Soft propagators for: LessThan , Equal , AllDiferent , UnaryPreference , nPreference , Distance constraints. Useful mechanisms that make expressing soft statements easier Softness Degree : Makes propagators harder or softer minLevel of preference ( α ): Rejects solutions where def ( t ) < s α Mechanisms to extend our implementation An abstract class to create new soft-propagators Classes and procedures handling semiring operations Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  15. How does it work? Let X ∈ [3 .. 5] , Y ∈ [1 .. 10] and Z ∈ [2 .. 6]. Imposing { Soft.lt X Y } and { Soft.lt Y Z } we get: minLevel=0.5 and SDegree=0.4 mLevel=0.6 , SDegree=0.5 def ( � 2 , 3 � ) = 1 . 0 Soft.lt is like FD . lt and only def ( � 3 , 3 � ) = 1 . 0 − 0 . 4 = 0 . 6 tuples where d i < d j are def ( � 3 , 2 � ) = 1 . 0 − 0 . 4 − 0 . 4 = allowed. 0 . 2 ≤ s 0 . 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  16. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  17. An over-constrained timetabling problem Problem To allocate conferences with preferences and disjoint constraints a a C. Schulte, G. Smolka. Finite Domain Constraint in Mozart Solution in [Schulte,Smolka. 2004] FD.atMost: enforcing the maximum number of parallel sessions FD. < : imposing precedence constraints FD.distinct: enforcing disjoint constraints Turning it over-constrained Adding some precedence constraint, the solver fail Solution?: Changing FD. < : by Soft. < and/or FD.distinct by Soft.distinct Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  18. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  19. Frequency Assignment Problem This problem tries to assign communication channels to radio links from limited spectral resources. constraints x i = f i pre-assigned frequency (soft) | x i − x j | > d ij when x i and x j may interfere together (soft) | x i − x j | > δ ij defines a duplex link (hard) Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  20. Frequency Assignment Problem (cont.) The Model Use S weighted c-semiring Use Soft.eq to impose pre-assigned constraints and Soft.distance for imposing interference ones Use FD.distance to define duplex links # Vars # Cons Time(ms) 14 20 0 36 27 0 56 167 10 86 338 20 121 543 70 158 795 90 200 1322 140 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

  21. Outline Introduction 1 C-semiring formalism CCP in Mozart Implementing Soft Constraints 2 Soft Propagators Results / Examples 3 An over-constrained timetabling problem Frequency Assignment Problem Imposing Preferences Conclusions 4 Future Work 5 Delgado A., Olarte C., Perez J. and Rueda C. Implementing Semiring-Based Constraints using Mozart.

Recommend


More recommend