P System Framework for Ant Colony Algorithm in IoT Data Routing

The Internet of Things (IoT) is a critical part of current information technology. When designing IoT data routes, device limited resources such as the computation speed, available amount of memory, remaining battery power or channel bandwidth, to name a few, must be considered. Since the Ant Colony System (ACS) is successfully applied to solving different routing problems, the implementation of ACS for routing in the IoT has also been considered. A P system inspired by the nature of membrane processes not only simplifies a complex system behavior annotation but also delivers a good balance between performance, flexibility and scalability. For this reason, the P system framework for ACS in IoT data routing has been investigated. From the research conducted, MMAPS, which is a combination of the P system and the Max-Min Ant System, is seen to perform better than the ACS. Keywords—Membrane computing; P system; Ant Colony System; Internet of Things; energy consumption; load balancing


I. INTRODUCTION
The Internet of Things (IoT) is a critical part of current information technology [1]. The International Telecommunication Union has reported [2] that the IoT is changing content networking hence being diverse. Also, it has been indicated that the connection has to be safe [3] and always present: anytime, anywhere and among any devices. Consequently, if the sensor nodes are dispersed on edge and find essential to interact with the other nodes outside, such nodes are supposed to have reasonable routes for the interaction. Limited resources such as the computation speed, available amount of memory, remaining battery power or channel bandwidth, to name a few, of the device when designing the data routes must be considered. Therefore, this paper is tailored to discuss the implementation of original routing in the IoT by using a membrane-inspired P system framework.
The Ant System (AS) has been considered as a successful evolutionary model of swarm intelligence which has been derived from the common traits of bugs and other creatures. It was developed by Marco Dorigo [4] to contribute to tackling several combinatorial optimization challenges. The AS imitates the qualities of real ants which are utilizing pheromone tails to detect their routes to the food sources. The major AS algorithms in research are the following original ant colony structures: Max-Min Ant System (MMAS), Rank-Based Ant System, Hyper-Cube Ant System, and the Ant Colony System (ACS), the last being noted as one of the most robust. The Ant Colony System is successfully applied to different kinds of matters, e.g., traveling salesman problem (TSP) or distribution network. Therefore, the implementation of ACS for routing in the IoT has also been analyzed.
Over the last half a decade, the optimization of the bioinspired algorithm has become a major issue of concern. The P system inspired by the nature of membrane processes not only simplifies a complex system behavior annotation but also delivers a good balance between performance, flexibility and scalability. According to [5], membrane computing models also known as the P-computing help to solve different optimization problems. That is why the P system framework for ACS in IoT data routing has been investigated.
In this paper, an optimization algorithm integrating the P system and Max-Min AS technique, called Max-Min Ant P system (MMAPS) has been proposed. At first, related work in the area has been presented. Afterwards, the ACO algorithm and MMAS have been recaptured. Then MMAPS has been described in detail, and its use for IoT routing benefits has been experimentally confirmed.

II. RELATED WORK
The IoT has been proven to be an emerging step in the evolution of the Internet. Correspondingly, it is a gradual transformation of the embedded deviceswireless sensor networks. According to the research [7], it is evident that the embedded nodes of sensors can be addressed directly using internet protocol version six (IPv6) and the Internet that owes to the adaptation layer 6LoWPAN. In this context, the IETF Operating Association routed the ROLL in 2012, and set the introduction of RPL-IPv6 protocol for routing for the ROLL to offer an efficient and effective routing solution for the abstraction of layer 6LoWPAN [8]. The abstraction layer runs over 802.15.4 IEEE standard offering MAC and PHY for reduced rate wireless personal area network (WPAN).
All the standard rules governing communication as well as Recognition of Prior Learning (RPL) ensure that the sensors make minimal utilization of energy. The RPL builds Destination-Oriented Directed Acyclic Graph (DODAG) using the objective function which focuses on rank fixation of the node as well as selecting the best parent and Directed Acyclic Graph. Therefore, the small integrated network sensor nodes lead to the implementation of vast sensor networks which are the colony of ants [9]. The optimization of Ant Colony has been regarded as an essential swarm intelligence www.ijacsa.thesai.org approach under the computational intelligence paradigm [10]. The technique is inspired by a combination of the intellectual variety of homogenous agents which are referred to as ants that have been primarily used in IoT [11]. Therefore, the ant colony routing can be implemented in order to discover the most efficient route, thus preparing for the DODAG.
For instance, a program of mosquito which was based on Message Queuing Telemetry Transport (MQTT) protocol was developed with the use of a modified ant colony algorithm that is based on the constraints of the resource to implement route planning in the IoT sector [12]. Consequently, by updating a global approach of pheromone as well as considering constraints of resources, a device can evade excess attention caused by the local information, and as a result, dynamic optimization is achieved [13]. On the other hand, the load balancing goal is achieved by estimating the remaining usable device energy [14]. This researches implies that implementation of the ant colony routing helps to improve the IoT performance.
Additionally, during the implementation of the ant colony routing in the IoT, the ant colony algorithms are also applied. Such ant algorithms are not extremely sensitive because they need to be arranged and operate along, and as a result, they dependably know the limited way between the ant nest and nourishment source during the implementation of the route node. The ants may seem to discharge non-concentrated charges during their rummaging. In the same context, the calculation of the ant settlement for the implementation can be heuristic that can be sorted out and learned quickly [15]. Furthermore, as is evident during the application of this routing in various situations, some distinct elements which include recovery, vigor, parallelism as well as discreteness are incorporated during the implementation. Therefore, the ant colony algorithms are used for the issues mentioned above during construction of the routing in the IoT. In the same context, ant colony algorithms are also applied to the determination of the TSP [16]. Further, they are involved in the combinatorial advancement unrevealing issues such as Quadratic Equations problem and the problem of vehicle direction [17]. Consequently, the critical stride for the application of the ant colony algorithm in the combinatorial matters is to provide a particular estimation of the constructed subterranean colony. During this phase of implementation, each ant needs to be empowered to build ants on the underlying state.
From the research [26] conducted, offered new algorithm which is called ACOPS, and is a combination of the P systems and the AS, is seen to perform better than the AS in solving the best path finding problem for TSP. Further research suggests that an ant colony algorithm can be defined as a semi-robotic evolutionary process which is founded on the populace.
Currently, the topic is actively being discussed and used in intelligent computing. Studies [27] indicate that the combination of membrane computing and the ACS has the potential to enlarge the dispersed traits and equivalent of the AS search, and also advance the search effectiveness of the AS algorithm. The aspect of membrane computing is a new concept that is centered on calculating the different devices by solving all constraints and unconstraint devices especially in the case of mathematical computation. The process of natural selection is instrumental in searching for problems to ensure optimization of problems thus resulting in viable solutions. In this scenario, aspects such as evolution, mutation, inheritance, and crossover are inspired techniques which provide optimized solutions.

III. ANT COLONY OPTIMIZATION ALGORITHM
As an intelligent optimization algorithm, the ACO algorithm forms its idea from the foraging behavior of the real ant colony [19]. The ants are elementary, but they can perform difficult tasks when they unite [20]. In the routing process of IoT, the traffic of network distributed changes constantly; network nodes and links are added or sometimes fail in stochastic process. The positive feedback and autocatalytic mechanism of the ACO algorithm adjusts to the route searching characteristics. The IoT uses the broadcasting, with the random multi-sending and the short life cycle, to overcome problem of nodes and the variable network structure [22].
Dorigo suggested the ACO from ant colony foraging process [4]. In an ant colony, a single ant cannot be brainy as there is no centralized instruction. However, they can be coordinated to function together thus capable of finding the shortest path.
ACO algorithm is a type of a self-organized heuristic algorithm which is enabled to learn automatically regarding the application to the various environments [20]. This algorithm is suitable for solving a combinatorial optimization problem [21] and the TSP [15]. When applied to solve a practical problem, the initial step is usually to generate an artificial ant colony. Afterwards, it enables each ant to create either a partial or full solution [15]. On the initial state the artificial ants start from question, and then and select the second nodes to arrive until set up a full solution. The ant then releases a pheromone proportionally to the quality level of the solution it has found in the path, and each ant solves the problem by starting a new process until a satisfactory solution is found. ACO algorithm has obtained achievements through its application in the routing research [23]. The research in [24] has offered a simpler ant routing algorithm for restricted self-organizing network energy features. In every searching route stage, a group is only found by one broadcast routing of the neighbor nodes thus reducing the routing consumption though creating a more significant delay.
ACO algorithm represents a construction of a random process for solution. The algorithm begins with an empty solution, then continuously adds components to the partial solution thereby establishing a complete solution. The model can be demonstrated by getting the solution to a network with n nodes [22]. Fist establishing a network routing, at the same time, the nodes transmit the searching signal. The dij (i, j = 1, 2,…, n) is a representation of the space between nodes i and j, whereas τij(t) is a representation of the number of effective signals acknowledged during the path between nodes i and j at the time t. www.ijacsa.thesai.org While initializing, different nodes, m, are selected at random, and send the signal between nodes i and j. The first element of each signal k is taken to be a starting node [22]. The pij (k) (t) is the probability that signal k is transmitted from node i to node j at the time t, therefore: The allowedk = {0, 1,…, n-1} represents the signal k set of nodes next allowed passing through. The artificial ant group has memory ability. The allowedk, k = 1,…, m is the list of ant k, while parameters α and β specify the impact of path and attractiveness, respectively. The τij (α) (t) will be accepted with time; 1 − φ represents the degree of fading away. The α and β are separately used to show the accumulated volume of signal information in the retransmission process, and the roles of heuristic played differently in the path designated during retransmission of the signal; ηij (β) (t) is the expected amount of transfer between node j and i.
After the n moments, signal k passes through all the nodes and forms a complete cycle. The quantity of pheromone (information) in all paths should be updated based on the equation: Variable Δτij (k) (t) represents the quantity of data by signal k left pheromone between i and j nodes. The commonly used ant cycle model is: Here Q represents the pheromone intensity, and Lk is the total length of the k-th signal.

IV. MAX-MIN ANT P SYSTEM
The Max-Min Ant System (MMAS) was proposed by Stützle and Hoos [28]. The MMAS is an extension of the AS with higher performance for many optimization problems. The MMAS has several advantages compared to the AS. The MMAS investigates the best found paths and allows the ant which has found the best solution or which has been the best, to leave the pheromone. Such strategy means that very quickly all the ants choose only one path which is the best. When all the ants find solutions, the pheromone is renewed by applying the evaporation system to the ant, leaving a new amount of pheromone: Currently, the topic is actively being discussed and used in intelligent computing. Research [27] indicates that the combination of membrane computing and the AS has the potential to enlarge the dispersed traits and equivalent of the AS search. The ACO has been integrated into the P system as a sub-algorithm which ensures that the P systems have the evolution rules of the membrane computing prototypes. P systems can theoretically be classified into cell-like P systems, tissue-like P systems, and neural-like P systems. A P system is considered as a prototype of computation which is useful in providing an appropriate structure for dispersed analogous calculation that advances in stages. The P system is advantageous in that it allows for the development of algorithms significantly condensed related to the standard algorithms [18]. Additionally, the P system gives better and more accurate results, while at the same time help to resolve challenges that seem unsolvable using the classic algorithms.
The proposed Max-Min Ant P system (MMAPS) uses the pheromone prototype and the pheromone update rules as outlined by AS, and the graded membrane assembly communication rules of the cell-like P systems. In more detail, MMAPS utilizes the one-level membrane structures to arrange objects and establish evolution rules. The evolutionary rules are set for evolving the system and choosing the most efficient ant. Communication rules are implemented by utilizing local and global pheromone update rules. Some researchers advocate novel algorithms mimicking the combined characteristics of decentralized self-organized colonies with ACO being a good example, instead of simulating the natural selection. Initially, ACO was applied in solving the TSP, a well-known NP-complete challenge as well one of the most researched combinatorial optimization challenges in computational arithmetic and computer science [5]. Currently, studies revolving around ACO are focusing on the development of various ACO algorithms, applications, and theoretical analysis of the algorithm which also act as stepping stones towards the optimization of MMAPS.

V. SELF-ORGANIZING MAX-MIN ANT P SYSTEM FOR IOT
ACO [25] is a study of probabilistic algorithms based on the behavior of food-seeking ants and their implementation in search and optimization. Ants spread pheromones along the path they travel from a colony to a food source (Fig. 1).
They emit pheromones both on the way back and forth. Pheromones are degraded in the environment. At each intersection there is a possibility to choose one of several links. In the case where all plausible routes are new and none of the pheromone trails are cascaded, the probability of choosing one or another route is equal as the ants move back and forth. Depending on the oftenness of travel, the amount of pheromone deposition on the shorter path increases. We can use these features to develop a methodology for autonomous self-organizing of the IoT. www.ijacsa.thesai.org The basic MMAS is upgraded to accommodate the specific task of routing data in the IoT. First and foremost, we have to assume that the devices on the chosen IoT system send and receive different amounts of data, so each iteration must have a different data transfer path. Using the proposed technique, the path between two IoT nodes is evaluated according to its difficultness instead of path length calculated from geographic location of nodes. The path difficultness d (k) ij is estimated by an aggregation of estimated node energy consumption and link delays: Here Ek denotes the normalized residual energy of the node k, tij indicates the normalized i and j link delay, we and wt denote the weights of corresponding variables and are selected during system training. Accordingly, pheromone updating is adjusted by the formula: In (7), F symbolizes the pheromone intensity, and Pij denotes the total cost of the link between the i and j nodes. This technique uses an objective weighting method called entropy weight, where the weights are determined at the initial stage. It is intended to determine the weighting of the indicators under objective conditions taking into account their relevance and objectivity. The entropy weighting technique determines the weight based on the entropy size of the information provided by each indicator.
A Second important part is to apply membrane computing models to solve optimization problems. According to [6], a combination of the P systems and ACO is seen to perform better than ACO. The developed Max-Min Ant P system (MMAPS) algorithm pseudo code is presented in Fig. 2. To specify the MMAPS algorithm the structure of P systems is combined with its evolution rules and the parameterized probabilistic model which is based on the pheromone model of ACO. The objects consist of IoT nodes (or ants) graphs. The tour is constructed by evolution rules, the same which are responsible to select the best ant, and communication rules implemented by using local and global pheromone update rules of MMAS.

VI. EXPERIMENTAL RESULTS
For the experiment, a virtual 6 node IoT has been simulated with software package MATLAB. The network topology is shown in Fig. 3.
All the sensor nodes are on the edge of the network. Initial random valuesenergy consumption and link delaysare set for each node. Each node has a MMAPS algorithm described and can implement messaging.
Additionally, has been implemented an ACO-based client that can analyze, store and calculate the best path. To simulate the environment of an IoT network model, low bandwidth and long delays have been used. For the power consumption estimation, the energy of each node has first been randomly set and the residual energy has been updated at every iteration. During initialization, one of the first tasks is to build the topology of the existing network (Fig. 3). First, a graph is produced containing all nodes and interconnections. In the second step, this graph connects the senders and recipients of the information, or in other words, the things (computers).
The value between the sensors is path difficultness d which is calculated by measuring energy consumption values and link delays.
The proposed technique relies on uncommon features in traditional networks; knowledge of the entire network topology state and all related information. This helps to automatically find and apply the best configuration for data routing without the intervention of a system administrator. The technique allows reacting dynamically to changes in network characteristics and making better use of available network resources by changing a data routing path.
The steps of the experiment are: a) Network initialization; b) Calculation of the best path using MMAPS; c) Corresponding data routing; d) Monitoring of qualitative parameters; e) Update of the node residual energy. After the first iteration the qualitative parameters are immediately computed to find the best path for data routing. On the basis of the data received, the main and alternative data transmission paths are established for each node.
The process of calculating qualitative parameters is continuous: monitoring [29] the current network situation and responding to changes that have occurred. For example, increasing the delay for a given connection and exceeding the threshold for some traffic will enable finding an alternative path for the traffic that meets the required quality characteristics.
In the data routing part, the calculated paths of the abovementioned parts are transferred to the rule tables of the nodes by using the created algorithm.
With the suggested MMAPS, once the source node transfers data to another sensor node during given session period, it will start requesting and updating information on the current (used) routes and will also check for possibly better routes. Such process periodically checks for IoT changes caused by a broken connection due to the movement of sensor nodes or energy depletion in sensor nodes on the available path. It involves the same concept of path finding and updating of pheromone information so that ants can follow new data paths by spreading the value of the pheromone through a spread message, neighbors, and checking energy levels to calculate path quality.
Prior to conducting the research, the complexity of the task should be evaluated and the initial parameters of the MMAS should be provided. Since ants can visit the nodes they have already visited, the number of possible solutions may be n lmax . Knowing that the number of ant's m is equal to the number of nodes n, in one iteration, the MMAS can check n solutions. After applying the proposed technique, the best path search result is shown in Fig. 4 (marked with a black thick line). By using the same data set and the previously calculated path length between nodes, membrane computing calculations have been performed. Summarized simulation results in Table I indicate that after 21.8 iterations on average the pheromone settles on the best path (evaporates on the other roots), and this is 25% faster than the result achieved by the Ant Colony System. This experiment confirms the significance of the technique in terms of speed.
Simulated IoT networks could be treated as a traditional graph consisting of nodes N and edges E. Each edge has not only path lengths calculated from geographic location of nodes, but also the qualitative parameter d (k) ij which is estimated by a combination of measured node energy consumption and link delays (6).
The measured path delay parameter T for all the edges is obtained after the pheromone has settled on the best path for MMAS and MMAPS algorithms. The measured value is determined by: It is evident that the new approach to finding the best route by using MMAPS algorithm reduces delay of the overall path by 27% on average.
Proceeding from the results in Table I, it can be assumed that the optimal routing path of data is always found by the MMAPS irrespective of the settings of simulated IoT network parameters.
Half node dead duration value is shown in Table II. It is the time to take the half of the nodes run out of energy. The experiment shows that the proposed algorithm has achieved better results. It takes 26% longer time for half of node run out of energy. It means that the higher number of nodes which has more remaining energy. The proposed algorithm provides a more balanced best path searching mechanism which has more nodes with the nearly equivalent energy.   The MMAPS algorithm provides a more balanced best path searching mechanism to balance the energy between nodes. As a result, all nodes can send data in the optimal path thus saving overall power and significantly extending the system lifetime.

VII. CONCLUSIONS
In this paper, author proposes a new Max-Min Ant System (MMAPS) algorithm based on P system framework for IoT routing has been developed. The optimal routing path of data is always found by the MMAPS irrespective of the settings of simulated IoT network parameters. The MMAPS algorithm for IoT data routing contributes to finding a path 25% faster than the Ant Colony System does. Finally, the MMAPS algorithm provides a more balanced best path searching mechanism to balance the energy consumption of the entire network.
In the future, we aim to use the advantages offered MMSPS algorithm for IoT networks with boundary nodes.