Complex local problems are linked together by a set of constraints which relate vari- ables in two or more local problems. In section 4.3, two sets of constraints in a DisCSP with complex local problems were introduced: Cintra containing the intra-agent constraints and Cinter containing the inter-agent constraints. Specifically, we are interested in naturally distributed subproblems i.e. those for which an imbalance exists between inter-agent and intra-agent constraints, with a higher number of the latter. For example, a University department will be responsible for scheduling most of its classes (its complex local problem) but will have to negotiate with other departments for classes where teaching is shared between departments (inter-agent constraints between complex local problems). It will also need to find classrooms for the classes, which may also be wanted at the same time by other departments.
Multi-Hyb (see Algorithm 4) is a novel two-phase complete distributed hybrid approach for solving DisCSPs with complex local problems which are naturally distributed, i.e. with a high intra-agent to inter-agent constraint ratio. In order to explain each phase and the interaction between the two phases, a very simple university timetabling DisCSP with complex local problems is used (see Figure 6.2).
6.2. Description of approach 80 A University has three schools: Computing, Business and Art. Each school has a number of courses. Schools teach a number of modules. Courses in a school can consist of modules taught by that school or modules taught by other schools (external modules). For example, the Computing school has two courses: C1 and C2. C1 takes the modules Databases, OOP and Management (from the Business school). C2 takes the modules Databases and Web. The Business school has one course (B1) which takes the modules Law, Management and Finance. The Art school has three courses: A1, A2 and A3. A1 takes the modules Databases (from the Computing School) and Sculpting. A2 takes the modules Sculpting and Drawing. A3 takes the modules Drawing and Diagram. Two modules which share a common course cannot be timetabled at the same time. For simplicity, it is assumed that classes can only be scheduled at 9am, 10am, 11am and 12noon on Mondays. Room, resources or lecturer availability are not considered for this simple example. When preparing their individual timetable, schools must consider their internal modules (represented by their intra-agent constraints) as well as ensuring that their times do not clash with external modules (represented by inter-agent constraints). Algorithm 4 Multi-Hyb
1: Initialise all agents with their subproblem and let phase1 ← true
2: while (phase1) CONCURRENTLY do
3: for each agent ai do
4: Run centralised systematic search and dynamically pass local problem solutions to dis- tributed local search
5: if an agent’s centralised systematic search fails to find a solution then
6: return “Problem is unsolvable.”
7: end if
8: end for
9: Run distributed local search on inter-agent constraints.
10: if local search finds solution S then
11: Return S.
12: end if
13: if all centralised systematic searches have found all solutions of external relevance then
14: phase1 ← false
15: end if
16: end while
17: Run distributed systematic search algorithm using solutions found by centralised systematic searches and knowledge learnt by distributed local search.
In Phase 1, each agent finds all ‘relevant’ (non-interchangeable) solutions to its com- plex local problem using a centralised systematic search. The notion of interchangeable
local assignments was introduced by Burke [13]. For example, in the simple scheduling problem described (see figure 6.2), the variable W eb is not involved in any inter-agent con- straints. Consequently, only the variables OOP and Databases have external relevance i.e. inter-agent constraints. Consequently, the solutions (OOP = 9AM , Databases = 10AM , W eb = 9AM ) and (OOP = 9AM , Databases = 10AM , W eb = 11AM ) are identical from an external perspective (agents Business and Art) when solving inter-agent constraints i.e. they are interchangeable and, therefore, only one of them is required. While agents are concurrently searching for solutions to their complex local problem and after each agent has found at least one solution, a distributed local search attempts to find a solution to the global problem. Phase 1 finishes when: (i) an agent determines that there is no solution to its complex local problem and, therefore, the overall problem is unsolvable; (ii) all agents have found all ‘relevant’ local solutions or; (iii) local search finds a solution to the global problem. If a solution is not found, and no unsolvability has been detected by a centralised systematic search, Multi-Hyb starts Phase 2. Phase 2 uses the knowledge learnt from Phase 1 to drive a distributed systematic search algorithm.
An overview of the properties of the different components of Multi-Hyb is given in table 6.2.
Phase Component Variables Domains Constraints
Considered Knowledge Exchanged 1 Centralised Systematic Searches All vari- ables in an agent Static Intra-agent constraints
Solutions to complex local problems passed to distributed local search and distributed systematic search.
1 Distributed Local Search One com- plex vari- able per agent Dynamic Inter-agent constraints
Solutions to complex local problems from centralised systematic searches. Knowledge about difficult variables and best values passed to distributed systematic search. 2 Distributed Systematic Search One com- plex vari- able per agent Static Inter-agent constraints
Solutions to complex local problems from centralised systematic searches. Knowledge about difficult variables and best values from distributed local search.
Table 6.2: Overview of Multi-Hyb components.
6.2.1 Completeness and Termination
In phase 1, any centralised systematic search algorithm can be used to find all non- interchangeable solutions. This type of algorithm is complete with respect to external
6.3. Implementations 82