• Aucun résultat trouvé

dAOBB: AND/OR Branch and Bound for DCOP

2.3 Example Applications

2.3.5 Takeoff and Landing Slot Allocation

3.1.1.3 dAOBB: AND/OR Branch and Bound for DCOP

The simpledAO-optdoes not take advantage of any pruning techniques, and therefore it explores the full search space. This is not a problem for enumeration tasks such as counting solutions or computing the probability of evidence [135]. However, for simpler tasks like finding the optimal solution, travers-ing the whole search space is not always required, and implies spendtravers-ing unnecessary effort. Marinescu and Dechter introduced in [131] an adaptation of the classical branch and bound algorithm on a pseu-dotree, thus yielding an algorithm called AOBB (AND/OR Branch and Bound). AOBB was shown in [131] to be quite efficient in a centralized setting, especially when using minibucket heuristics for generating tighter upper bounds.

We present heredAOBB, an adaptation of the AOBB algorithm for the distributed case. The algo-rithm is described in Algoalgo-rithm2. As indAO-opt, the search starts top-down, with agents assigning themselves values, and sendingEVALmessages to their children. However, in order to be able to prune parts of the search space according to the branch and bound scheme, each agentXineeds some information about the current cost structure:

1. the costcpa(Xi,Sepi)already accumulated by the current partial assignment from the root, to the current agent.

2. the costlocal cost(vij,Sepi)of each one of the values ofXi, given the current values ofXi’s ancestors

3. the cost of the best currently known solution of the subtree rooted atXi, i.e. the current upper bound

Definition 9 (Cost of current Partial Assignment - CPA) We define the cost of the current partial assignmentcpa(Sepi)as the cost accumulated from all the cost functions along the current branch which are fully instantiated:

cpa(Sepi) =

Xjancestorof Xi

local cost(vj,Sepj) (3.1)

The CPA represents the sum of the cost functions encountered from the root to the parent ofXi, which are fully instantiated. Normally (e.g. indAO-opt, or ADOPT), agents do not have access to these costs incurred above themselves. Therefore, we introduce a modification to theEVALmessages: now, they also include the cost of the partial assignment so far. These partial costs accumulate and propagate down together with theEVALmessages sent from agents to their children.

The CPA received from the parent in theEVALmessage, plus the evaluationlocal cost(vij), give the cost of the current partial assignment, extended byXi=vji:cost(Sepi, Xi=vji=cpa(Xi,Sepi)+

local cost(vji,Sepi, Xi =vji). Clearly, this cost is a lower bound on the cost of any complete as-signment, for any instantiation of the variables in the subtree ofXi.

The propagation of theEVALmessages proceeds down the DFS tree, towards the leaves as in dAO-opt. Initially, all agents start with lower bounds equal to the cost of the current partial assignment (see Algorithm2, line 7), and infinite upper bounds (line 4).

When a leaf receives anEVALmessage, it computes the cost of each one of its values with the constraints it has with ancestors, just like a normal agent. As the leaf has no children, it can simply select the best value from its domain (lowest cost with ancestors), and reply back to the parent with a COSTmessage that reports this lowest cost.

When an agentXireceives COST messages from its children, it does the following:

1. sum up all COST messages from children - lines 9-12. The result is the optimal cost for all the subtree rooted atXi,for the current instantiation ofSepi.

2. If this optimal cost improves the current upper bound, then update the upper bound as a better solution has been found - line 13.

3. Consider next untried valuevij∈dom(Xi). Compute its lower bound:LB(vij) =cpa(Xi,Sepi)+

local cost(vji). IfLB(vji)> U B(i.e. the minimal cost incurred by choosingXi=vji is larger than the best solution found so far), then it is useless to try assigningXi=vji, as this could not lead to a better solution. Therefore, pruneXi=vij, and try another value.

4. Otherwise, tryXi =vij. SendEV AL(Xi =vij, LB(vji))to all children (LB(vji), computed asLB(vji) =cost+cost(vij)represents the cost of the current partial assignment extended by Xi=vji). Wait forCOSTreplies, and repeat previous step until no more values to try.

5. when all values are tried, pick optimal valuevithat minimizestotal cost(vi) =cost+cost(vi)+

CiCOSTCi(vi). Send to parentPia cost message:COSTXi(total cost(vi))

6. when parent sends anotherEVALmessage, reset bounds, and repeat the process (cycle through all the values in own domain).

When the root has receivedCOSTmessages for all its values (or pruned them), the optimal cost for all the problem has been found.

Remark 5 As with dAO-Opt (Section3.1.1.2), when caching is not allowed, one needs to revisit parts of the search space to rediscover the optimal solutions for certain subtrees. However, in the case of dAOBB the problem may not be as severe as for dAO-Opt, as the pruning mechanism may limit the amount of extra effort required.

Proposition 5 (dAOBB complexity) dAOBB (Algorithm2) requires a number of messages which is exponential in the depth of the DFS tree used. Message size and memory requirements are linear for each agent.

PROOF. Follows from Proposition4, and from the fact that the branch and bound scheme has the same worst case complexity as the AND/OR search.2

dAOBB with heuristics: It is well known that good initial bounds are essential to the efficiency of a branch and bound scheme. For this purpose, the centralized AOBB algorithm has been enhanced in [131] with both static and dynamic heuristics based on mini-buckets. The static bounds based on minibuckets are computed by running a bounded inference phase in a preprocessing step, and saving the bounds obtained as lower bounds, which are then used in the main branch and bound phase. The dynamic bounds are computed by interleaving the bounded inference phase with the branch and bound process, and continuously updating the lower bounds. Petcu and Faltings [158] introduce A-DPOP, an adaptation of the minibucket scheme to a distributed setting; A-DPOP can be easily used in conjunction with dAOBB to produce better bounds, either static or dynamic.

Algorithm 2dAOBB - distributed AO B&B search for cost minimization.

dAOBB(X,D,R): each agentXidoes:

Construct DFS tree; after completion,XiknowsPi, P Pi, Ci, P Ci 1 ifXiis rootthendo EVAL

2 elsewait for EVAL messages from parent

procedure EVAL:Xireceived an EVAL(Sepi, cost) message fromPi 3 letSepibe the received assignment of variables inSepi

4 U B← ∞

11 wait for theCOSTXj(vi)replies from children

12 cost(vi)+ =COSTXj(vi)

13 ifcost(vi)< U BthenU B=cost(vi)

14 pickvi s.t.vi=argminvi∈dom(Xi)(cost(vi))

15 ifXiis rootthenviis the root’s value in the optimal solution

16 elsesendCOST(cost(vi))toPi

dAOBB(i): Distributed AND/OR Branch and Bound with caching Similarly to AOBB with caching [132], one can extend dAOBB to equip it with a customizable and adaptable caching scheme.

The user can specify the parameteriwhich represents the maximal size of any cache table; subse-quently, each agentXicaches in its table results of searches for a subset of variables in itsSepiwhich is bounded byi. Previous search results can be retrieved from the cache; however, whenever one of the agents inSepinot included in the cache changes its value, the cache table has to be purged and recomputed. Depending on the structure of the problem,dAOBB(i)can provide exponential speedups over simpledAOBB.

Concretely, the caching mechanism can be added to dAOBB by making the following changes to Algorithm2:

• initialize cache of sizediafter line 2;

• inEVAL(after line 3) purge cache if any agent inSepiwhich is not in the cache changed its value inSepi;

• inEVAL(after line 3) check if the received assignment forSepiis found in the cache; if so, return it with its corresponding cost. Otherwise, after line 14 cache(Sepi, vi, cost(vi))

Proposition 6 (dAOBB(i) complexity) dAOBB(i) requires at mostO(exp(i))memory at each agent.

Messages are of linear size. The number of messages required varies with the level of caching:

O(exp(w))when using full caching (i.e. i ≥ w) andO(exp(depth))when using bounded caching (i.e.i < w).

PROOF. Follows straightforwardly from the centralized case [132].2

Similar to dAO-opt,dAOBB(i)can also benefit from DFS arrangements with low depth (see Section3.4.2.1for some heuristics). However, considering that the number of messages depends also on the induced width (when full caching is used) it becomes apparent that it is desirable to minimize not only the DFS depth, but also the induced width.