## 3 Improved Multi Mobile Agent Data Fusion Scheme
### Mobile Agent Migration Path Algorithm  
A mobile agent has four characteristics: identification, route, processing code, and memory. The identification registers identity on the network. The route can be pre-determined or adjusted to the network condition. The agent executes processing code locally and uses it both for routing and data collection. The code is adaptable to the task, and the sensor be promoted or demoted as needed. The agent uses memory to store raw data and fused data, depending on the state of integration. Agents can move either on mobile sensors, or the software can move wirelessly from stationary sensor to stationary sensor. In the latter, the source node starts the transmission process, the agent suspends all data collection and starts processing code, the sensor transfers the state information of the agent to the new node according to the routing protocol, and the agent resumes processing at the new sensor. Nodes send results if they are the last hop in the migration route, or if the accuracy of the results meets the required accuracy. After visiting each node, the agent either returns to the host or terminates itself. Throughout the process, service provider (AMS and DF) updates trigger the migration path from source node to destination node [43]. Figure 13 shows the process from agent production, the cycle of data collection and movement, to agent termination. The choice between static and dynamic routing affects computing time and energy consumption. Dynamic route planning is flexible and adapts to the change of environment in real time [44]. However, it increases computing time and energy consumption. Static routing may not adapt to the changes  
Figure 12: Distributed computing model of link break arrival time. Figure 13: State transition diagram of mobile agent. of the network environment, but saves processing and energy, and calculates static routes only once. Time, energy efficiency, and flexibility are mutually exclusive. Selection of the best path also depends on the number of sensors, which is helpful for node scheduling [45]. With large numbers of sensors deployed, data redundancy can give error tolerance and allow the network to stop collecting data as soon as the fused data has met the specific requirements of the task. It is no longer necessary to visit the remaining nodes in the network. In this paper, we use a simple sub optimal dynamic path generation method to determine the next hop node in real-time. It considers three parameters: residual energy in candidate nodes for the next hop, energy needed for the next hop, and the geographical distance between current node and potential next node. With identical packet size, communication overhead is proportional to the distance between source and destination nodes. The choice of node for the next hop is the key point. We discussed the different software agents in Section 3.1.3. The main purpose of the directory facilitator (DF) is exchanging information between neighboring nodes through the agent communication channel. This includes residual energy, signal energy, and positional information. It communicates changes in the network promptly. Table 3 shows the information format for the DF exchange. Our network has two functional levels of agents: data collection agents and managerial agents. We will not discuss the clustering method in the network, but each cluster as an RMS, a DM, and other intermediate components which communicate directly with each other. When sensors detect an event in their monitoring area, they automatically start to collect data. As soon as an amount of data crosses the threshold, sensors send a notification packet to the RMS. The format of the data packet shows in Table 4. Each sensor sends notification packets independently. Upon receipt of notification packets, the RMS checks the source node ID and the geographical coordinates. If the RMS receives more than one packet from the same source ID, it saves the most recent packet and discards the others.