A Composition Method to Model Collective Behavior

. It is very important to understand system behavior s in collective pattern for each knowledge domain. However, there are structural limitations to represent collective behaviors due to the size of system components and the complexity of their interactions, causing the state explosion problem. Further composition with other systems is mostly impractical due to exponential growth of their size and complexity. This paper presents an abstraction method to model the collective behaviors, based on a new concept of domain engineering: behavior ontology . Firstly, the ontology defines each collective behavior of a sys-tem from active ontology . Secondly, the behaviors are formed in a quantifiably abstract lattice, called n :2-Lattice . Thirdly, a lattice can be composed with other lattices based on quantifiably common elements. The composition can be interpreted as behavioral composition, and can reduce all the unnecessary composition not related to the behaviors in the lattices. In order to demonstrate the feasibility of the method, two examples, Emergency Medical Service and Health Care Service systems, are selected and implemented on a Behavior Ontology tool, called PRISM, which has been developed on ADOxx Meta-Modelling Platform.


Introduction
There are strong needs to represent system behaviors for each knowledge domain in some collective patterns. However, the needs cannot be easily satisfied due to the structural limitations caused by the considerable size of system components and the complexity of their interactions, generally known as state explosion problem [1]. Further composition with other systems seems to be impractical due to exponential growth of such explosion caused by their size and complexity [2].
In order to overcome these limitations, this paper presents an abstraction method to model the collective behaviors of systems, based on a new concept of domain engineering: behavior ontology [3]. The previous researches have been reported in the literatures [3]. However, the present research in this paper extended the previous researches with other domains and further made composition of the system behaviors possible so that composite collective system behaviors can be constructed for larger and more complex domains. The approach is shown in Fig. 1, as follows: 1) Firstly, a class hierarchy of a domain is constructed based on active ontology, where all the actors of a domain and their interactions are defined as classes. 2) Secondly, each collective behavior of the domain is defined in regular expression [4], where each behavior is defined as a sequence of interactions among actors. The behaviors will be presented in a hierarchical order based on their inclusion relations, forming a special lattice, called n:2-Lattice [5]. 3) Thirdly, each behavior is quantifiably abstracted with a notion of cardinality and capacity for actors in behavior. This notion will be used to select appropriate behaviors and their relations from the lattice and to make quantitatively equivalent composition with other lattices. 4) Fourthly, the abstract behavior lattice, Abstract n:2-Lattice, is constructed. 5) Finally, two abstract behavior lattices can be composed for common actors with same cardinality and capacity between two lattices. It implies quantitatively equivalent composition of two types of collective behaviors.

Fig. 1. An Engineering and Composite Approach to Model Collective Behaviors
In order to demonstrate the feasibility of the approach, Emergency Medical Service (EMS) [3] and Health Care Service (HCS) systems are presented for each steps. The examples show that the method is very effective and efficient to construct a hierarchy of collective behaviors in a lattice and that the composition of two collective behaviors is systematically performed by the composition operation of two lattices. Further, a tool, called PRISM, has been developed on ADOxx Meta-Modelling Platform [6] in order to demonstrate its feasibility and practicality.
This paper is organized as follows. Section 2 presents the approach in steps with an example for both EMS and HCS. Section 3 presents an application of an instance to EMS and HCS examples. Section 4 analyzes the approach and compares it with other approaches. Finally, conclusions and future research will be discussed in Section 5.

Approach
This section presents each steps of the approach to model collective behaviors for a system.

2.1
Step 1: Active Ontology (AO) [Def. 2.1] Actor (Ac) Actor is defined as a set of classes, that is, 1 , … , ∈ . It implies a set of components in a system, and is represented as a set of classes in Active Ontology.
Interaction is defined as a set of an ordered relation between two actors, that is, ∈ . It implies that Ac moves in Ac , as an interaction between two actors, as defined in Def. 2.1.
[Def. 2.3] Active Ontology (AO) Active Ontology is defined as = 〈 , 〉, based on Def. 2.1 and 2.2. It consists of a set of system components as a set of classes and a set of interactions among the classes.
The first step is to design Active Ontology for EMS and HCS services. Active ontology consists of classes and subclasses in the domain, including their interactions.  It follows the basic notion of regular expression, i.e., ' + ' for repetition, ' | ' for choice, etc. For example, ⟨ 1 ⟩ + implies that Actor repeats Interaction 1 , and 1 , ⟨ 2 , 3 , ⟨ 4 ⟩ + ⟩ + | ⟨ 1 , 2 , 3 , ⟨ 4 ⟩ + ⟩ + implies that Actor performs either 1 , ⟨ 2 , 3 , ⟨ 4 ⟩ + ⟩ + or ⟨ 1 , 2 , 3 , ⟨ 4 ⟩ + ⟩ + behaviors. By the definition, each collective behavior is defined as a sequence of interactions from step 1. In order to quantify the behaviors, all behaviors are divided into two kinds of behaviors: the one with one main actor and the other with more than one actors. In the other words, there are different views by different actors. For example, in EMS there are four kind of actors, represented as B(L, A, H, P). Then, there are two behaviors, represented as B(n, 1, n, n) for 1 Ambulance and B(n, n, n, n) for n Ambulances. Similarly to B(C, I) for HCS, B(1, n) for 1 Customer and B(n, n) for n Customer.
A. EMS for B (n, 1, n, n) There are total 18 behaviors possible and are defined in regular expression as follows: 1) 1 = ⟨ 1 , 2 , 3 , 4 , 5 , 6 ⟩: An Ambulance goes to a Location, gets a Patient on, goes to a Hospital, gets the patient off, who goes to the hospital, and the hospital sends a Bill to the patient. 2) 2 = � 1 , 2 , 3 , 4 , 5 , ⟨ 6 ⟩ + �: An Ambulance goes to a Location, gets a Patient on, goes to a Hospital, gets the patient off, who goes to the hospital, and the hospital sends number of Bills to the patient. 3 , ⟨ 4 , 5 , 6 ⟩ + ⟩ + : An Ambulance goes to a Location, gets Patients on, goes to a Hospital, gets the patients off, who go to the hospital, and the hospital sends a Bill to each patient. And it repeats itself. 3 , ⟨ 4 , 5 , ⟨ 6 ⟩ + ⟩ + ⟩ + : An Ambulance goes to a Location, gets Patients on, goes to a Hospital, gets the patients off, which go to the hospital, and the hospital sends Bills to each patient. And it repeats itself.

6)
An Ambulance goes to a Location, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bill to each patient. And it repeats itself.
An Ambulance goes to a Location, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bills to each Patient. And it repeats itself.

12)
12 = �⟨ 1 , 2 ⟩ + , ⟨ 3 , 4 , 5 , 6 ⟩ + � + : An Ambulance goes to Locations, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospital, and the hospital sends Bill to each patient. And it repeats itself. 13) 13 = ⟨⟨ 1 , 2 ⟩ + , 3 , ⟨ 4 , 5 , ⟨ 6 ⟩ + ⟩ + ⟩ + : An Ambulance goes to Locations, gets Patients on, goes to a Hospital, gets the patients off, which go to the hospital, and the hospital sends Bills to each Patient. And it repeats itself.

14)
14 = �⟨ 1 , 2 ⟩ + , ⟨ 3 , 4 , 5 , ⟨ 6 ⟩ + ⟩ + � + : An Ambulance goes to Locations, gets Patients on, goes to Hospitals, to get some of the patients off until all the patients off, each of whose groups goes into its hospitals, and the hospital send Bills to each Patient. And it repeats itself.

B. HCS for B (1, n)
There are total 4 behaviors possible and are defined in regular expression as follows: 1) 1 = ⟨ 1 , 2 , 3 ⟩: A customer calls to an Insurance Company, then sends a Bill to, and Insurance Company pays the Bill. 2) 2 = ⟨ 1 , ⟨ 2 , 3 ⟩ + ⟩ + : A customer calls to an Insurance Company, then sends some Bills to, and Insurance Company pays the Bills.
3) 3 = ⟨⟨ 1 , 2 , 3 ⟩ + ⟩ + : A customer calls to an Insurance Company, then sends a Bill to, and Insurance Company pays the Bill. And it repeats itself Note that regular behaviors for EMS B(n. 1, n, n) and HCS B(1, n) are presented here due to the size of the example. However similar approach can be made for n actors.

Step 3: Abstract Behaviors (AB)
In the second step, the regular behaviors from Step 2 are abstracted with respect to a number of actors and their capacity as follows:

2.4
Step   B (n, 1, n, n) and HCS for B (1, n) The Fig. 3 and 4 show the inclusion relations in EMS for B(n, 1, n, n) and HCS for B(1, n) with arrows, from which the abstract behavior lattices for EMS B(n, 1, n, n) and HCS B(1, n) are constructed as shown in Fig. 5. Note that the EMS lattices are shown in the left side of Fig. 5, and the HCS lattices in the right side of the figure.

Step 5: Composition
The last step is to make composition of two lattices for EMS and HCS. The steps of the composition are as follows: 1) Firstly, the common actors between two abstract behavior lattices have to be selected. For the example, Patient from EMS is defined to be a common actor with Customer from HCS. 2) Secondly, cardinality of the composition has to be selected for the common actors. For the example, there are two cases: one for the single cardinality and the other for the plural cardinality. There are total 36 possible collective behaviors, which is half of the total composition with the same cardinality, that is, 72 behaviors, 24 from EMS by 3 from HCS. Note that there are 8 more behaviors for EMS B(n, n, n, n) with n Ambulances and 3 more behaviors with HCS B(n, n) for n Customers. It is also 5.06% of the total composition with the different cardinality, that is, 189 behaviors, (18+8) from EMS by (4+3) from HCS.

Analysis
The most common approach to address problem of system complexity is the size of system states in other approaches, or the number of behaviors in the approach in this paper. Consequently, the efficiency of the approaches can be measured by the degree of reduction of the complexity with respect to the system states or the number of behaviors.
This paper has presented a new approach to reduce system complexity based on the new notion of Abstract Behaviors Lattice (ABL). It guarantees that the complexity is reduced inverse-exponentially by the definition of the abstract behavior lattice. Further, this method represents composition of two systems with common actors in the minimum states. Table 1 shows the comparing between the Reduction-by-Choice (RbC) method [7] and our approach. Note that the RbC method was compared with other reduction methods in order to prove the efficiency of the method. Table 1

Comparison
In order to comprehend general patterns of behavior of specific targets, i.e., humans or animals, large amount of data are collected by using various sensors, and the data can be used to extract useful information for analysis of the patterns and behavior, i.e., healthcare services based on human living patterns [8]. Such a data collection method using the sensors can increase degree of correctness of the patterns and behavior, but may require large amount of time and efforts to collect the data. Further the method only focuses on the patterns of the singular entities, but as a whole.
However, the method in the paper abstracts all the possible interactive behaviors among objects in the system based on system perspective, that is, as a whole, but as the singular entities. Therefore it is possible to comprehend all the bidirectional behavioral patterns of objects in the systems. In addition, it is possible to reduce the time and efforts to collect the data, including refinement, since the method models conceptually all the possible occurrence cases of the behaviors by limiting combinational conditions from the initial interactions to the target interactions among objects in the systems, not from collecting randomly unconditional data using sensors. For example, in the perspective of Ambulance from the example, an initial interaction can be the state before transport, a target interaction can be the state after transport, and a condition can be the capacity of Ambulance, that is, 1. Table 2 shows the summary of the comparison. The advantages of the method in the paper can be further summarized as follows: 1) The system behaviors are modeling quantitatively and abstracted based on normalization of their quantities in a mathematical structure, namely n:2-Lattice. And further the lattice provides a mathematical base to predict and analyze collective system behaviors.
2) The lattice can be used to reorganize abstract system views with respect to main actor concepts and makes possible the analysis of the behaviors with respect to the individual or combinational actors, for example, Ambulance or Patient views from the example.
3) The lattice can be used to define mathematical relations between collective behaviors of the collecting groups. For example, the group with 1 Ambulance and the group with n Ambulances. The relationship can be represented as a lattice for the lattices.
4) Composition of two lattices is possible with respect to the common main actors. This is the main topic of the paper, and it gives general capability of the method to apply to the real example.
Most importantly, in the perspective of composition, the method provides one of the possible solutions to handle the state explosion problem. Generally the problem is known as one of the most fundamental problem in computer science, and there are a number approaches to handle complexity of the explosion. The best known ones can be summarized as follows:  A compositional analysis of finite state systems to deal with state explosion due to process composition, they tried to reduce base on synchronous and asynchronous execution and showed the method by process algebra [9,10].  A technique to cluster states into equivalent classes which uses a graphical representation into text form [11]. It uses Communicating Real-Time State Machines (CRSMs) that works on automatic verification of finite state real-time systems.  A technique to reduce possible infinite time space into finite time space which is developed for a compositional specification theory for components [12].
Compare to these approaches, the approach in the paper reduces the states with respect to the types of behaviors, that is, a sequence of interactions among actors. Further, it represents the composition of two system states with respect to the same cardinality and capacity of the common actors. In Section 4.1, the outstanding degree of reduction of the states has been demonstrated and compared with others quantitatively with the examples.

Implementation: PRISM
In order to demonstrate the feasibility of the approach in this paper, a tool, called PRISM, has been developed on ADOxx Meta-Modeling Platform [6], and reported as a Behavior Ontology tool [13].

Conclusion and Future research
This paper presented a method for knowledge engineering and composition to model collective behaviors of systems. The method was based on a sequence of processes from constructing active ontology, defining regular behaviors, abstracting regular behaviors, constructing abstract behavior lattice, and finally generating a composite abstract behavior lattice from two abstract behavior lattices. The method was demonstrated with two examples: EMS and HCS systems. And the composite lattice for EMS ⊗ HCS was generated. Application of the examples was shown with the instance examples on these lattices. The efficiency of the method was shown with numbers for reduction of the system state. The method can be considered one of the most innovative approaches for collective representation of knowledge engineering and their composition, as well as state minimization.
The future research includes developing meta-modeling the method and its instantiation to target domains, as well as application to the real systems.