• Keine Ergebnisse gefunden

3.3 Querying Suitable Agents

3.3.1 Feasible Agents

functionality to support the reasoning with qualified cardinality constraints, and hence serves as backend in the implementation ofMoreOrg.

As mentioned in Chapter2, this thesis’ reference systems use anEMIto couple two agents via a single link. A male and female (also referred to asEmiPassiveandEmiActive) variant of the interface exist, whereas only a male and a female interface can be coupled. Atomic agents can comprise any number of interfaces, however, following Assumption2.2exactly one interface can be used for the connection to another agent’s interface. For a successful connection, both interfaces need to be compatible.

The compatibility of interfaces can limit the connectivity, and therefore MoreOrg supports checking the feasibility of forming a composite agent from a collection of agents. To be able to perform this check, the model requires information about the interfaces which are part of an atomic agent. The class hierarchy as illustrated in Figure 3.6comprises the definition of theEmiActiveandEmiPassiveclass, which are used to exemplify the compatibility checking problem for the reference system.

Checking the feasibility of a reconfigurable multi-robot system can be understood as a match-ing problem for a graphG= (V , E), where each vertexvV represents a single interface. The matching problem is restricted through a set of constraintsXlimiting the existence of edges.

IAdenotes the set of all interfaces of a set of agentsA, so that|V|=|IA|with the corresponding partitioningIA=I1I2. . . I|A|.

The set of interfaces of an agentak is represented asIk={ik,1, ik,2, . . . , ik,|Ik|}. To reflect that each interface belongs to an atomic agent, the interface symbol ia,l has two subindexes: the first indicates the atomic agent to which the interface belongs to, and the second defines the local (per atomic agent) index of this interface.

The adjacency matrix of the graphGis an n×nmatrixC, wheren=|IA|, and∀i, jIA:ci,j ∈ {0,1}. The rows and columns in the following equation are annotated with the corresponding interface symbol to improve readability.

C=

i1,1 i1,2 · · · in,n

⎜⎜

⎜⎜

⎜⎜

⎜⎜

⎜⎜

⎜⎜

⎟⎟

⎟⎟

⎟⎟

⎟⎟

⎟⎟

⎟⎟

ci1,1,i1,1 ci1,1,i1,2 · · · ci0,0,in,n i1,1 ci1,2,i1,1 ci1,2,i1,2 · · · ci0,1,in,n i1,2 ... ... ... . .. ... cin,n,i1,1 cin,n,i1,2 · · · cin,n,in,n in,n

(3.3)

This matrixC is symmetric, i.e., cp,q =cq,p, where p, qIA. Checking connectivity involves searching for a valid assignment for the adjacency matrix C, subject to the following con-straints:

Constraint 3.1(No self-connection). An atomic agent cannot create a composite agent, by connect-ing to itself. Therefore, no self-links are allowed for an atomic agent:

akA, p, qIk:cp,q = 0 (3.4)

Constraint 3.2(One link per interface). The design of existingEMIsrestricts each interface to be part of maximum one link:

akA, pIk: ∑

qIA

cp,q ≤ 1 (3.5)

Constraint 3.3 (One link between any two agents). According to Assumption 2.2 two atomic agents can be connected by one and only one link:

ak, alA:∑

pIk

qIl

cp,q ≤ 1 (3.6)

To define a single composite agent, any resulting graph has to be connected, i.e., at least one path has to exist between any two vertices. Depending upon the features of a reconfigurable multi-robot system, loops in the connection graph might be possible. For example, a robot that attaches its manipulator to pick an already mounted payload is creating such a loop.MoreOrg assumes a tree-based composition of atomic agents as the default, since loops are not manda-tory for a feasible composite agent. The tree shape is verified by additional constraints on the connection graph: the connection graphG= (V , E) has to be connected, and|E|=|V| −1 (see (Newman2010, p. 129)).

The assignment problem is solved using constraint-based programming and implemented us-ingGeneric constraint programming framework (Gecode)(Schulte and Tack2012), where the matrix entries represent theconstraint-satisfaction problem (CSP)variables, each with the do-main Dc ={0,1} (The domain directly corresponds to the binary element assignments of the adjacency matrix). The constraint-based programming framework allows to generate candi-date solutions for feasible agents, and each resulting graph is finally tested if it is connected. If a candidate assignment does not represent a connected graph the search is restarted.

Figure3.11 shows the result of a successful search for a feasible composition for a set of 20 atomic agents, 10 for each of type Sherpa and CREX. Each vertex represents a single atomic agent - the vertex label shows the atomic agent type. Edges are coloured according to the inter-face which belongs to the source vertex. For a compact representation only the used interinter-faces are part of the visualisation: the atomic agent type Sherpa comprises in total fourEmiPassive and twoEmiActiveinterfaces, the atomic agent type CREX has oneEmiActive. The existence check proofs that the composite agent consisting of 10 Sherpa and 10 CREX is feasible.

Figure 3.11: One feasible link structure (out of many) for a composite agent after solving the assignment problem. Edges are annotated with the interface corresponding to the source ver-tex. Agent models and interfaces are related to the reference system described in Section2.2.

Atomic agents of the same agent type are interchangeable, and interfaces of the same type with the same agent are likewise interchangeable. Therefore, corresponding column assignments

in the adjacency matrix are interchangeable. This information about interchangeable columns can be exploited for symmetry breaking (Mears, De La Banda, and M. Wallace2014) which is applied in MoreOrgto reduce the number of redundant solutions. A further speed up of the search for a feasible solution has been achieved with the introduction of a heuristic vari-able assignment. The heuristic assigns varivari-ables by preferring interfaces of the currently least constrained atomic agent denoted bya:

a=b+ argmin

akA

1

|Ik|

qIA

pIk

cp,q , (3.7)

where

cp,q=

⎪⎪

⎪⎪

1 ifcp,qis already assigned

0 otherwise and

b= uniformly distributed random number on [0,1×106]

The small fractional random biasbserves as tie breaker when multiple variables with minimal heuristic value exist. Figure3.12illustrates a comparison between a random variable selection strategy, and using the least constrained atomic agent (referred to asmerit minstrategy). The comparison checks the feasibility of a composite agent, which is formed from multiple instance of the same atomic agent type with male and female interfaces. For compositions of atomic agents with hardly any options for connecting to another atomic agents, themerit minstrategy shows a worse performance compared to a random selection strategy. The computation of the least constrained atomic agent is an overhead, which cannot be compensated for in this case.

Figure3.12illustrates the evaluation of the feasibility checking for a set of standard blocks. A standard block can have multiple male and female interfaces. The plots are labelled accord-ingly: Block<num of female interfaces>-<num of male interfaces>. The feasibility checking for the model of the robot Sherpa is depicted in the bottom right figure. Particularly the eval-uation with Block 2-2 and Sherpa show the advantage of the custom selection heuristic. While the number of connection options rises, the random selection strategy is clearly outperformed.

The evaluation also indicates how the feasibility checking performs for larger coalitions, here for up to 50 agents.