In addition, it is possible to encode, by means of social rules, the dependence of designer i's module properties from those of other designers. For instance, **given**
an integer d, by means of the following rules designer i **requires that module 4 is**
placed on the same row (rule r18) as designer j**'s module 1 and such that a distance**
of exactly d **cells exists between them (rules** r19, r20).

$18\;\hat{\cdot}$  19 : . 
$\leftarrow$  ←
$$r_{20}:\quad\leftarrow$$
r18 : ← place(4, X 4, Y 4), [Qj ]{**place**(1, X 1, Y1)}, Y 4 <> Y1·
$place(4,X4,Y4),[Q_{j}][place(1,X1,Y1)],Y4\leq Y1$.  $place(4,X4,Y4),[Q_{j}][place(1,X1,Y1)],D<>d,+(X4,XM,X1),$  $X4\leq X1,+(X84,D,XM),mod(4,X84,Y84)$  $place(4,X4,Y4),[Q_{j}][place(1,X1,Y1)],D<>d,+(X1,XM,X4),$  $X1\leq X4,+(X81,D,XM),mod(1,X81,YB1)$
In order to ensure that all modules are properly spaced, rules r21-r24 **(resp. rules**
r25-r28) require that modules owned by designer i (resp. owned by designers i and j such that j 6= i) are mutually spaced by at least k cells, where k **is a given integer** constant.

r21 : ← cell(B, X , Y ), cell(B1, X 1, Y1), B <> B1, \#int(D), +(X , D, X 1), D < k r22 : ← cell(B, X , Y ), cell(B1, X 1, Y1), B <> B1, \#int(D), +(X 1, D, X ), D < k r23 : ← cell(B, X , Y ), cell(B1, X 1, Y1), B <> B1, \#int(D), +(Y , D, Y1), D < k r24 : ← cell(B, X , Y ), cell(B1, X 1, Y1), B <> B1, \#int(D), +(Y1, D, Y ), D < k r25 : ← cell(B, X , Y ), [1, ]{cell(B1, X 1, Y1)}, \#int(D), +(X , D, X 1), D < k r26 : ← cell(B, X , Y ), [1, ]{cell(B1, X 1, Y1)}, \#int(D), +(X 1, D, X ), D < k r27 : ← cell(B, X , Y ), [1, ]{cell(B1, X 1, Y1)}, \#int(D), +(Y , D, Y1), D < k r28 : ← cell(B, X , Y ), [1, ]{cell(B1, X 1, Y1)}, \#int(D), +(Y1, D, Y ), D < k Now we describe the SOLP program P (rules r29-r38**), representing an agent**
which collects from the designers admissible solutions to the placement problem.

Moreover, by means of additional rules (r39-r40), P **possibly requires that the placement layout area either is less than or matches a given value.**
r29 : pcell(X , Y ) ← [1, ]{**cell**( , X 1, Y1)}, X = X 1, Y = Y1 r30 : exists x lt(W ) ← pcell(W , ), **pcell**(W 1, ),W 1 < W r31 : lowest x(X ) ← **pcell**(X , ), not **exists** x lt(X ) r32 : exists y lt(W ) ← pcell( , W ), **pcell**( ,W 1),W 1 < W r33 : lowest y(Y ) ← **pcell**( , Y ), not **exists** y lt(Y ) r34 : exists x ht(W ) ← pcell(W , ), **pcell**(W 1, ),W 1 > W r35 : highest x(X ) ← **pcell**( , X , ), not **exists** x ht(X ) r36 : exists y ht(W ) ← pcell( , W ), **pcell**( ,W 1),W 1 > W r37 : highest y(Y ) ← **pcell**( , Y ), not **exists** y ht(Y ) r38 : design area(A) ← ∗(B, H , A), +(X 1, B, X 2), +(Y1, H , Y2), **lowest** x(X 1),
highest x(X 2), lowest y(Y1), **highest** y(Y2)
Social rule r29 **collects admissible solutions to the placement problem. The rules**
from r30 to r37 **are used to represent the smallest rectangle enclosing all the placed**
modules. Then, the actual design area is computed by rule r38.

In case an an upper bound b to be satisfied (resp. an exact value s **to be matched)**
is given, then the following rule r39 (resp. r40**) may be added:**

$$\begin{array}{r l}{r_{39}:}&{{}\leftarrow\quad d e s i g n_{-}a r e a(A),\,A>b}\\ {(\mathrm{resp.}\quad r_{40}:}&{{}\leftarrow\quad d e s i g n_{-}a r e a(A),\,A<>s)}\end{array}$$
