Download presentation

Presentation is loading. Please wait.

Published byJuliana Barnett Modified about 1 year ago

1
1 Motivation Problem formulation should change to accommodate changes in real world! Some examples: delayed trains, flights, … broken machines, ill workers, … new demands, … interactive solvers, …

2
2 Problem area Dynamic CSP: constraints can be added to and retracted from the constraint model dynamically in an arbitrary order Solving approaches: robust solutions (still valid after small changes) new solutions with minimal perturbations (changes) reusing the original solutions for a new solution reusing the reasoning process maintaining maximal arc consistency after constraint addition or retraction

3
3 Current situation Dynamic versions of AC algorithms AC-4 DnAC-4 fast but large memory consumption AC-6 DnAC-6 fast but still large memory consumption so far fastest algorithm for maintaining dynamic AC AC-3 AC|DC low memory consumption but slow AC-3.1 AC-3.1|DC substitutes AC-3 in AC|DC by an optimal AC algorithm DnAC-4DnAC-6AC|DCAC-3.1|DC Space complexityO(ed 2 +nd)O(ed+nd)O(e+nd)O(ed+nd) Time complexityO(ed 2 ) O(ed 3 )O(ed 2 )

4
4 Constraint retraction base approach 1. restore values that were deleted when propagating through the retracted constraint 2. propagate domain extensions to other variables (like reverted AC) algorithms differ in how many values are returned back to domains 3. remove inconsistencies via “standard” arc consistency algorithms algorithms differ in used AC algorithm

5
5 Our approach improve practical time efficiency of AC|DC while keeping low memory consumption using an optimal (fine-grained) AC algorithm increases memory consumption (AC-3.1|DC) restore only the most promising values (our experiments showed that AC|DC restores many values that are immediately deleted by AC) How? use information about the reason and “time” of value removal

6
6 Removal information When and why a given value has been removed? Justification the first neighboring variable in which the eliminated value lost all supports (like in DnAC) Removal time when the variable was eliminated (a continual counter of all deleted values) Usage: A value V is restored if the neighboring variable is justification for the value V has a restored supporter for the value V has a restored value that has been eliminated before V new

7
7 Example initial pruning A: 2 3 4/C 2 B: 2/D 6 3/D 9 4 C: 1/A 3 2/A 4 3/E 7 4 D: 1/B 1 2/C 5 3/C 8 4 E: 3 B=D (1) C=D (3) A

8
8 Example constraint retraction A: 2 3 4 B: 2/D 6 3/D 9 4 C: 1 2 3/E 7 4 D: 1/B 1 2/C 5 3/C 8 4 E: 3 B=D (1) C=D (3) C≠E (4) Constraint A

9
9 Example propagation A: 2 3 4 B: 2 3/D 9 4 C: 1 2 3/E 7 4 D: 1/B 1 2 3/C 8 4 E: 3 B=D C=D C≠E A: 2 3 4 B: 2 3/D 9 4 C: 1/D 10 2 3/E 7 4 D: 1/B 1 2 3/C 8 4 E: 3 B=D C=D C≠E AC is re-established at the end again Propagate extended domains

10
10 The algorithm modified AC-3 function propagate-ac3'(P, data, revise) 1queue := revise 2while queue not empty do 3 select and remove a constraint c from queue 4 {u,v} := the variables constrained by c 5 (P,data,revise_u) := filter-arc-ac3'(P, data, c, u, v) 6 (P,data,revise_v) := filter-arc-ac3'(P, data, c, v, u) 7 queue := queue revise_u revise_v 8return (P,data) function filter-arc-ac3'(P, data, c, u, v) 1modified := false 2for each d in P.D[u] do 3 if d has no support in P.D[v] w.r.t. c then 4 P.D[v] := P.D[v] - {d} 5 data.justif[u,d].var := v 6 data.justif[u,d].time := data.time 7 data.time := data.time + 1 8 modified := true 9if not modified then 10 return (P,data,Ø) 11return (P,data,{e in P.C|u is constrained by e and e≠c}) new

11
11 The algorithm initialization function retract-constraint-ac|dc2(P, data, c) 1(P,data,restored_u) := 2 initialize-ac|dc2(P, data, c, u, v) 3(P,data,restored_v) := 4 initialize-ac|dc2(P, data, c, v, u) 5P.C := P.C - {c} 6(P,data,revise) := 7 propagate-ac|dc2(P, data,{restored_u,restored_v}) 8(P,data) := propagate-ac3'(P, data, revise) 9return (P,data) function initialize-ac|dc2(P, data, c, u, v) 1restored_u := Ø 2time_u := 3for each d in (P.D 0 [u] - P.D[u]) do 4 if data.justif[u,d].var = v then 5 P.D[u] := P.D[u] {d} 6 data.justif[u,d].var := NIL 7 restored_u := restored_u {d} 8 time_u := min(time_u, data.justif[u,d].time) 9return (P,data,(u,time_u,restored_u)) new

12
12 The algorithm propagation function propagate-ac|dc2(P, data, restore) 1revise := Ø 2while restore not empty do 3 select and remove (u,time_u,restored_u) from restore 4 for each c in P.C|u is constrained by c do 5 {u,v} := the variables constrained by c 6 restored_v := Ø 7 time_v := 8 for each d in (P.D 0 [v] - P.D[v]) do 9 if data.justif[v, d].var = u then 10 if data.justif[v, d].time > time_u then 11 if d has a support in restored_u w.r.t. c then 12 P.D[v] := P.D[v] {d} 13 data.justif[v,d].var := NIL 14 restored_v := restored_v {d} 15 time_v := min(time_v, data.justif[v,d].time) 16 restore := restore {(v,time_v,restored_v)} 17 revise := revise {e in P.C|u is constrained by e}) 18return (P,data,revise) new

13
13 Experiments constraint checks Consistent statesInconsistent states AC|DC AC|DC-2 DnAC-6 (tightness) RCSP 100, 50, 0.3, p2 constraints added incrementally until a given density reached or inconsistency detected and after that 10% of randomly selected constraints retracted

14
14 Experiments runtime comparison Consistent statesInconsistent states AC|DC AC|DC-2 DnAC-6 (tightness) RCSP 100, 50, 0.3, p2 constraints added incrementally until a given density reached or inconsistency detected and after that 10% of randomly selected constraints retracted

15
15 Experiments memory consumption Domain size (d)202530354045 100*p 2 68%74%77%78%80%81% AC|DC20MB22MB27MB38MB44MB51MB DnAC-641MB48MB59MB80MB93MB106MB AC|DC-220MB22MB27MB38MB44MB51MB 50556065707580 18%83%84% 85% 60MB66MB72MB87MB90MB110MB127MB 124MB137MB149MB174MB184MB217MB247MB 60MB66MB72MB87MB90MB110MB127MB NOTE: includes extensional representation of the constraints that is almost identical to memory consumption of AC|DC and AC|DC-2! RCSP 100, d, 0.3, p2

16
A New Algorithm for Maintaining Arc Consistency after Constraint Retraction Pavel Surynek and Roman Barták Charles University, Prague pavel.surynek@seznam.cz roman.bartak@mff.cuni.cz

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google