local consistency in soft constraint networks

27
Local consistency in soft constraint networks Thomas Schiex Matthias Zytnicki INRA – Toulouse France Special thanks to: Javier Larrosa UPC – Barcelona Spain

Upload: minty

Post on 11-Jan-2016

41 views

Category:

Documents


1 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Local consistency in soft constraint networks

Local consistency in soft constraint networks

Thomas SchiexMatthias ZytnickiINRA – ToulouseFrance

Special thanks to:Javier LarrosaUPC – BarcelonaSpain

Page 2: Local consistency in soft constraint networks

Tokyo 2004 2

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

Page 3: Local consistency in soft constraint networks

Tokyo 2004 3

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)

Page 4: Local consistency in soft constraint networks

Tokyo 2004 4

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)

Page 5: Local consistency in soft constraint networks

Tokyo 2004 5

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.

Page 6: Local consistency in soft constraint networks

Tokyo 2004 6

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

identityannihilator

• commutative• associative• monotonic

[Schiex, Fargier, Verfaillie 1995][Bistarelli, Rossi 95]

Page 7: Local consistency in soft constraint networks

Tokyo 2004 7

Weighted CSP example ( = +)

x3

x2

x5

x1 x4

F(X): number of non blue vertices

For each vertex

For each edge:

xi c(xi

)

b 0

g 1

r 1

xi xj c(xi,x

j)

b b T

b g 0

b r 0

g b 0

g g T

g r 0

r b 0

r g 0

r r T

[Shapiro 81][Freuder 92]

Page 8: Local consistency in soft constraint networks

Tokyo 2004 8

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 ?

[Petit, Regin, Bessiere 2000]

Page 9: Local consistency in soft constraint networks

Tokyo 2004 9

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

[Larrosa, Meseguer, Schiex 1999][Petit, Regin, Bessiere 2001]

Page 10: Local consistency in soft constraint networks

Tokyo 2004 10

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

[Petit et al 2001][van Hoeve et al. 2004][Beldiceanu, Petit 2004]…

Page 11: Local consistency in soft constraint networks

Tokyo 2004 11

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.

[Larrosa 2002]

Page 12: Local consistency in soft constraint networks

Tokyo 2004 12

Projection of cij on Xi with compensation

Equivalence preserving transformation Can be reversed

1

A new operation on weighted networks

w

v v

w

0

0

0

i j1

0

[Schiex 2000]

Page 13: Local consistency in soft constraint networks

Tokyo 2004 13

Node Consistency (NC*)

For all variable i a, C + Ci (a)<T a, Ci (a)= 0

Complexity:

O(nd)w

v

v

v

w

w

C =T =

32

2

11

1

1

1

0

0

1

x

y

z

0

0

014

[Larrosa 2002]

Page 14: Local consistency in soft constraint networks

Tokyo 2004 14

0

Arc Consistency (AC*)

NC*

For all Cij a b

Cij(a,b)= 0

b is a support complexity:

O(n 2d 3)

wv

v

w

w

C =T=4

2

11

1

0

0

0

0

1

x

y

z

1

12

0

[Schiex 2000][Larrosa 2002][Larrosa, Schiex 2003][Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003][Larrosa, Schiex 2004]

Page 15: Local consistency in soft constraint networks

Tokyo 2004 15

PFC-MRDAC/DC on reifieddominated by AC*

Page 16: Local consistency in soft constraint networks

Tokyo 2004 16

1

1

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)

w

v

v

v

w

w

C =T=4

22

2

1

1

1

0

0

0

0

x

y

z

x<y<z

0

1

1

12

[Schiex 2000][Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003]

Page 17: Local consistency in soft constraint networks

Tokyo 2004 17

0

1

Full AC (FAC*)

NC*

For all Cij a b

Cij(a,b) + Cj(b) = 0

(full support)

w

v

v

w

C =0 T=4

01

0

1

0

x

z1

1

That’s our starting point!No termination !!!

[Schiex 2000]

Page 18: Local consistency in soft constraint networks

Tokyo 2004 18

0

0

1

1

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)

w

v

v

v

w

w

C =T=4

22

2

11

1

0

0

0

x

y

z

x<y<z

21

12

[Copper 2003][Cooper, Schiex 2004][Larrosa, Schiex 2003]

Page 19: Local consistency in soft constraint networks

Tokyo 2004 19

Hierarchy

NC* O(nd)

AC* O(n 2d 3) DAC* O(ed 2)

FDAC* O(end 3) AC

NC

DAC

Special case: CSP (Top=1)

Page 20: Local consistency in soft constraint networks

Tokyo 2004 20

Maintaining LC

BT(X,D,C)if (X=) then Top :=c

else xj := selectVar(X)

forall aDj do

cC s.t. xj var(c) c:=Assign(c, xj ,a)

c:= cC s.t. var(c)= c

if (LC) then BT(X-{xj},D-{Dj},C)

[Larrosa, Schiex 2003]

Page 21: Local consistency in soft constraint networks

Tokyo 2004 21

BT

MNC

MAC/MDAC

MFDAC

[Larrosa, Schiex 2003]

Page 22: Local consistency in soft constraint networks

Tokyo 2004 22

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

Page 23: Local consistency in soft constraint networks

Tokyo 2004 23

CPU time

n. of variables

Page 24: Local consistency in soft constraint networks

Tokyo 2004 24

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 ?

Page 25: Local consistency in soft constraint networks

Tokyo 2004 25

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?

Page 26: Local consistency in soft constraint networks

Tokyo 2004 26

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…)

Page 27: Local consistency in soft constraint networks

Tokyo 2004 27

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.