270 likes | 457 Views
Local consistency in soft constraint networks. Thomas Schiex Matthias Zytnicki INRA – Toulouse France. Special thanks to: Javier Larrosa UPC – Barcelona Spain. Overview. Introduction and definitions Why soft constraints? Weighted CSP Existing approaches
E N D
Local consistency in soft constraint networks Thomas Schiex Matthias Zytnicki INRA – Toulouse France Special thanks to: Javier Larrosa UPC – Barcelona Spain
Overview • Introduction and definitions • Why soft constraints? • Weighted CSP • Existing approaches • Soft as hard: global soft constraints • Soft as… soft: AC, DAC and FDAC • Putting the 2 together (and more…) • Global soft constraints • Bound consistency Tokyo 2004
Why soft constraints? • CSP framework: for decision problems • Many problems are optimization problems • Economics (combinatorial auctions) • Given a set G of goods and a set B of bids… • Bid (Bi , Vi ), Bi requested goods, Vi value • … find the best subset of compatible bids • Best = maximize revenue (sum) Tokyo 2004
Why soft constraints? • Satellite scheduling • Spot 5 is an earth observation satellite • It has 3 on-board cameras • Given a set of requested pictures (of different importance)… • Resources, data-bus bandwidth, setup-times, orbiting • …select a subset of compatible pictures with max. importance (sum) Tokyo 2004
Why soft constraints • Even in decision problems, the user may have preferences among solutions. • It happens in most real problems. Experiment: give users a few solutions and they will find reasons to prefer some of them. Tokyo 2004
[Schiex, Fargier, Verfaillie 1995][Bistarelli, Rossi 95] Soft constraint network • (X,D,C) • X={x1,..., xn} variables • D={D1,..., Dn} finite domains • C={c1,..., ce} cost functions • var(ci) scope • ci(t): E (ordered cost domain, T, ) • Obj. Function: F(X)= ci (X) • Solution: F(t) T • Soft CN: find minimal cost solution annihilator identity • commutative • associative • monotonic Tokyo 2004
[Shapiro 81][Freuder 92] Weighted CSP example ( = +) For each vertex x3 x1 x2 x4 For each edge: x5 F(X): number of non blue vertices Tokyo 2004
[Petit, Regin, Bessiere 2000] 1st approach: Soft as Hard • Soft constraint c reified in c with extra “cost” xc variable. (t,a) c iff a = c(t) • Define cost = SUM(xc) (and more…) • This is it… Now optimize cost. • But how will propagation occur ? Tokyo 2004
[Larrosa, Meseguer, Schiex 1999][Petit, Regin, Bessiere 2001] Propagation: a key issue • Use the PFC-M[R]DAC principles • Associate each constraint to 1 of its var: C(x) • Compute #inc(x,a): cost payed on C(x) if x=a • Sum(Min(#inc(x,a))) is a lower bound on a cost variable associated with all soft constraints. • Requires one artificial “soft” global constraint reifying all soft constraints with a single associated cost variable Tokyo 2004
[Petit et al 2001][van Hoeve et al. 2004][Beldiceanu, Petit 2004]… Global soft constraints • All-diff, GCC… can also be reified • Enforcing performs domain consistency: Removes values that have no supporting tuple in the constraint Value removal in xc and original variables Tokyo 2004
[Larrosa 2002] The CSP approach • T = maximum violation. • Can be set to a bounded max. violation k • Solution: F(t) < k = Top • Empty scope soft constraint c (a constant) • Gives an obvious lower bound on the optimum • If you do not like it: c = Similar to xc of the soft global constraint. Tokyo 2004
[Schiex 2000] A new operation on weighted networks • Projection of cij on Xi with compensation • Equivalence preserving transformation • Can be reversed v v 1 0 0 0 0 w w 1 i j Tokyo 2004
[Larrosa 2002] Node Consistency (NC*) • For all variable i • a, C+Ci (a)<T • a, Ci (a)= 0 • Complexity: O(nd) T = 4 C= 0 1 x v 3 2 z w 0 2 v 0 1 1 0 1 w v 0 1 1 w 1 y Tokyo 2004
[Schiex 2000][Larrosa 2002][Larrosa, Schiex 2003][Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003][Larrosa, Schiex 2004] Arc Consistency (AC*) • NC* • For all Cij • a b Cij(a,b)= 0 • b is a support • complexity: O(n 2d 3) T=4 C= 1 2 x z w 0 2 v 0 1 0 w v 0 1 1 0 1 0 w 1 y Tokyo 2004
PFC-MRDAC/DC on reifieddominated by AC* Tokyo 2004
[Schiex 2000][Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003] Directional AC (DAC*) • NC* • For all Cij (i<j) • a b Cij(a,b) +Cj(b) = 0 • b is a full-support • complexity: O(ed 2) x<y<z T=4 C= 2 1 x v 2 2 z w 0 2 v 0 1 1 0 w 1 v 0 1 1 1 w 0 1 y Tokyo 2004
[Schiex 2000] Full AC (FAC*) • NC* • For all Cij • a b Cij(a,b) +Cj(b) = 0 (full support) T=4 C=0 x 1 v 0 1 z w 0 1 v 0 1 0 1 w That’s our starting point! No termination !!! Tokyo 2004
[Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003] Full DAC (FDAC*) • NC* • For all Cij (i<j) • a b Cij(a,b) +Cj(b) = 0 (full support) • For all Cij (i>j) • a b, Cij(a,b) = 0 (support) • Complexity: O(end3) x<y<z T=4 C= 1 2 x v 2 2 z w 0 2 v 1 2 0 1 0 w v 0 1 1 1 w 0 1 y Tokyo 2004
Hierarchy Special case: CSP (Top=1) NC NC*O(nd) DAC AC*O(n 2d 3) DAC*O(ed 2) AC FDAC*O(end 3) Tokyo 2004
[Larrosa, Schiex 2003] Maintaining LC BT(X,D,C) if (X=) then Top :=c else xj := selectVar(X) forallaDjdo cC s.t. xjvar(c)c:=Assign(c, xj ,a) c:= cC s.t. var(c)= c if (LC) then BT(X-{xj},D-{Dj},C) Tokyo 2004
[Larrosa, Schiex 2003] MFDAC MAC/MDAC MNC BT Tokyo 2004
Maintaining local consistency • Ex: Frequency assignment problem • Instance: CELAR6-sub4 (Proof of optimality) • #var: 22 , #val: 44 , Optimum: 3230 • Solver: toolbar – PIII 800MHz (Linux/gcc 3.3) • MNC* 1 year (estimated) • MFDAC* 1 hour • Typ. much better than PFC{M}RDAC http://carlit.toulouse.inra.fr/cgi-bin/awki.cgi/ToolBarIntro Tokyo 2004
CPU time n. of variables Tokyo 2004
Soft global constraints • A network is -inverse consistent iff • For all c, there is a t s.t. c(t)=0 -inverse+NC* domain consistency on global reified constraints • Weaker than AC, DAC or FDAC • Full -inverse consistency: • For all c, there is a t s.t. c(t)+ci(t[i])=0 • Stronger and terminates: new definition of soft global constraints algorithms ? Tokyo 2004
Large domains and soft constraints • Bound-NC*: for all variable i [lbi,ubi] • C+Ci (lbi)<T, C+Ci (ubi)<T • Bound-AC*: for all variable i [lbi,ubi] • tl,tu s.t. tl[i]=lbi, tu[i]=ubi, c(tl)<T, c(tu)<T • t s.t. c(t)=0 (-inverse consistency) • Requires only two ci per variable • If complete ci are available: full Bound-AC* • Same good properties as 2b-consistency? Tokyo 2004
Conclusion • AC,DAC,FDAC stronger than PFC-MRDAC • Nice integration and possible strengthening of soft global constraints enforcing • Extension of bound-consistency • Offers additional crucial heuristics info: • ci(a) (CELAR6-SUB4: w/o 5955- 1 hour, 5955-7’30”) Seems better to lift classical to soft rather than plunging soft into classical (but for the need for a complete solver rewriting…) Tokyo 2004
References (Send more) • [Baptiste, Le Pape, Peridy 1998] Global constraints for Partial CSPs: A case study of resource and due-date constraints. CP’98. • [Beldiceanu, Petit 2004] Cost evaluation of soft global constraints. CPAIOR 2004. • [Bistarelli, Rossi 1995] Semiring CSP. IJCAI 1995 (see also JACM 1995). • [Brown 2003] Soft consistencies for Weighted CSPs. Soft’03 workshop (CP 2003) • [Cooper, Schiex 2004] Arc consistency for Soft Constraints, AIJ, 2004. • [Cooper 2003] Reduction operations in fuzzy or valued constraint satisfaction, Fuzzy sets and systems, 2003 • [de Givry, Larrosa, Meseguer, Schiex 2003] Solving Max-SAT as weighted CSP. CP 2003. • [Freuder, Wallace 1992] Partial Constraint Satisfaction. AIJ. 1992. • [Larrosa, Meseguer, Schiex 1999] Maintaining reversible DAC for Max-CSP. AIJ. 1999. • [Larrosa 2002] Node and Arc consistency in weighted CSP • [Larrosa, Schiex 2004] Solving weighted CSP by maintaining arc consistency, AIJ, 2004. • [Larrosa, Schiex 2003] In the quest of the best form of local consistency for Weighted CSP. IJCAI. 2003 • [Petit, Régin, Bessière 2000] Meta-constraints on violations for over constrained problems. ICTAI 2000. • [Petit, Régin, Bessière 2001] Specific filtering algorithms for over-constrained problems. CP2001. • [Régin, Puget, Petit 2002] Representation of hard constraints by soft constraints. JFPLC, 2002. • [Régin 2002] Cost-based AC for the global cardinality constraint, Constraints 2002 (see also CP’99) • [Régin, Petit, Bessière, Puget 2001] New lower bounds of constraint violations for over constrained problems. CP’2001. • [Schiex 2000] Arc consistency for Soft constraints • [Schiex, Fargier, Verfaillie 1995] Valued CSP: hard and easy problems. IJCAI. 1995. • [van Hoeve, Pesant, Martin-Rousseau 2004] On Global Warming (Softening global constraints). Soft’04. Tokyo 2004