# Optimization Algorithm and Simulation of Public Resource Emergency Scheduling Based on Wireless Sensor Technology

Authors: Yi Zhou; Weili Xia
Journal: Journal of Sensors
 (2021)

---

## Abstract

Public resource scheduling refers to the rational allocation and effective use of resources, while public emergency scheduling refers to the rational allocation and effective use of resources in the context of emergencies. Its main purpose is to reduce casualties and property losses caused by emergencies. This paper mainly studies the emergency scheduling of public resources based on line sensing technology and solves the scheduling problem of public resources through algorithm optimization. Firstly, combined with the positioning algorithm of wireless sensor, this paper optimizes the positioning and detection technology of wireless sensor technology. Then, we design an improved multiagent genetic algorithm (MAGA-MTERS) using natural number coding and design a penalty function to solve the model. Then, the algorithm is compared with the traditional genetic algorithm. The results show that the accurate positioning of wireless sensor technology can improve the efficiency of public resource scheduling and save the scheduling cost. The multiagent genetic algorithm optimizes the positioning function of wireless sensor. Compared with the traditional genetic algorithm, MAGA-MTERS algorithm can obtain a better solution.


---

## Body

## 1. Introduction

With the continuous development of science and technology, great progress has been made in the prediction and prediction of some disasters [1]. For example, the prediction of natural disasters such as hurricanes and floods is quite accurate. However, from a local perspective, regional sudden disasters and emergencies still occur from time to time [2]. In addition, generally speaking, for most natural disasters, the current technical means can either not predict very accurately or cannot predict, such as earthquakes. Therefore, it is very necessary to formulate a detailed emergency plan before the disaster or adopt a reasonable emergency rescue plan after the disaster to protect the safety of people’s lives and property [3]. Strengthening the research on public resources is of great significance to improve the efficiency of emergency management and ensure the rational utilization of resources [4]. Since these disasters often cause heavy casualties and economic property losses, it is necessary to rescue the affected areas to ensure the safety of people’s lives and property in the affected areas [5]. Therefore, for the resource scheduling of emergencies, in order to maximize the time benefit and minimize the disaster loss, emergency resource scheduling came into being.In recent years, with the continuous development of science and technology, especially the latest progress in the fields of embedded computer technology, communication technology, and sensor technology, it has laid a solid foundation for the development of multidisciplinary wireless sensor networks [6]. This large-scale wireless sensor network with multihop and self-organizing network structure formed by wireless communication has been widely used in many industries [7]. In these fields, WSN composed of sensor nodes with the idea of cooperative work is used to monitor, track, collect, and process relevant data information in real time and upload the processed data to the server [8]. For example, in environmental monitoring, some environmental applications of wireless sensor networks include tracking the movement of birds, small animals, and insects and studying their habits [9]. It can also monitor the factors affecting crop growth, such as pests in crops, soil pH, and fertilization, so as to improve agricultural yield. With forest fire detection, by randomly and intensively deploying a large number of sensor nodes in the forest, we can feed back the early position of fire, help to plan appropriate emergency treatment plans, help to prevent disaster events, or reduce corresponding personnel casualties and property losses [10]. In medical care, wireless sensor networks can provide services such as remote human physiological data monitoring, hospital drug management, real-time monitoring, and detecting the behavior and health status of the elderly [11].Most famous universities in the United States have teams engaged in wireless sensor network research, such as the University of California, Los Angeles, Massachusetts Institute of Technology, Cornell University, and the University of California, Berkeley. Many enterprises have also started research on wireless sensor networks [12]. The most famous are Crossbow and Mote IV; their products Mica2, Micaz, and Telos have built development platforms for many research institutions [13]. The priority development areas identified in the EU’s sixth framework plan include “information society technology,” in which the research of wireless sensor networks is mentioned. Wu et al. [14] proposed a mobile node location scheme based on TDOA ranging method in 2000, which is called cricket location support system. In the study of Priyantha, it is very important to find the location from the Euclidean distance between each pair of nodes [15]. Therefore, Priyantha et al. provided a novel solution by designing a motion strategy, which generates a global rigid graph of the known distance between static sensor nodes [16]. Unknown sensor nodes calculate their own positions by using these known distances [17]. In addition, based on the research results of Priyantha and others, the cricket indoor positioning system developed by MIT has become a commercial product of crossbow. Its positioning effect is in the indoor environment and reaches the positioning accuracy within 10 cm [18]. In this article, Pandi et al. [19] discussed the need to improve the efficiency of resource transportation in emergency resource scheduling, pointed out the problems that need to be paid attention to in the process of international rescue, and gave relevant suggestions and opinions. In 2000, Ramamoorthy et al. [20] designed a dynamic resource allocation model and solution algorithm to optimize the resource allocation after the earthquake, with the goal of reducing the casualty rate. In addition, based on the urban emergency evacuation problem, Mortazavi-Dehkordi and Zamanifar [21] designed a shortest path model to obtain the shortest path evacuation scheme and proposed two network flow methods to optimize the urban emergency evacuation plan. In their work, Tao et al. [22] discussed the emergency resource allocation problem of single resource type and multiple disaster sites based on continuous consumption of resources and analyzed the characteristics of resource scheduling problem under constraints. Aiming at the multiresource emergency scheduling problem in disaster rescue, Kumar et al. [23] established a multiresource and multidisaster point emergency scheduling model and designed a heuristic algorithm based on graph theory and linear programming. The algorithm can solve the calculation of large-scale data. In addition, for the secondary disasters that may be brought by emergencies, Wang et al. [24] studied it on the basis of considering multiresources and multisupply points and designed relevant models and algorithms. Relevant research shows that the purpose of emergency logistics system is to ensure the material demand after the time of sudden disaster. It is a closely related and interactive whole composed of many elements. The emergency logistics system requires a strong timeliness to quickly respond to the needs of disaster areas and start material transportation. Emergency logistics system is a part of postdisaster emergency management. Therefore, its openness should be considered when building the system, which can effectively connect and cooperate with other parts, so as to better carry out postdisaster rescue work. The location and tracking of wireless sensor technology play an important role in the scheduling of public resources. Through the positioning function of wireless sensor technology, some emergency resources can be allocated more quickly and effectively. In addition, through the optimization of the algorithm, the arrival time of materials and the cost of material transportation can be shortened in the mode of resource transportation.


## 2. Localization Algorithm in Wireless Sensor Networks

### 2.1. Wireless Sensor Network Architecture

Wireless sensor network is composed of a group of nodes with data collection characteristics by wireless communication. It is mainly composed of three parts: sensor node, sink node, and management node. Among them, sensor nodes are generally divided into two types: beacon nodes (or anchor nodes) and unknown nodes (or nodes to be located). In the monitoring area of WSN, sensor nodes will be deployed to collect data information. Then, the node sends the collected data information to the sink node in a multihop manner. Finally, the sink node transmits the received data information to the user through the communication network. Through the mutual transmission between different nodes, the speed of data transmission to target users is improved, and the work efficiency is greatly improved. The architecture of wireless sensor network is shown in Figure1. At present, the research difficulties of wireless sensor networks mainly involve networking, communication, management, and distributed information processing. According to the logical relationship of the key technologies in the system, we design the wireless sensor network architecture. We divide wireless sensor networks into three levels, from bottom to top: communication and networking, management and basic services, and application systems.Figure 1
Architecture of wireless sensor network.In wireless sensor networks, the node composition generally includes power supply, microprocessor, external memory, sensor, analog-to-digital converter, and transceiver. It is mainly divided into four parts: the first is the power supply module, the second is the data processing and control module, the third is the communication module, and the last part is the data acquisition module, as shown in Figure2. At the same time, according to different application scenarios, wireless sensor nodes may also include other devices.Figure 2
Node structure of wireless sensor network.In the structure of the whole WSN node, the internal memory of the microprocessor is limited. Therefore, an external memory is also provided in the node to store sensing data. The function of the sensor is to collect the environmental data as analog signals and convert the analog signals of the data into digital signals with the help of the analog-to-digital converter in the node. The transceiver is a device used by the node to receive the control signal from the transmitter. It sends and receives the information and control signal from the management node. In wireless sensor networks, the communication channel is spectrum. The power supply provides energy for the operation of the node, which is usually provided to the sensor node in three ways: battery, wire, or energy collection module. However, in most application environments, these nodes usually take a long time to replace the battery after deployment. Therefore, energy consumption also affects the research and design of WSN to a great extent.


### 2.2. MAGA-ERS Algorithm

In order to search the best deployment scheme more effectively, we propose a multiagent genetic algorithm (MAGA-ERS) based on emergency resource scheduling. In MAGA-ERS, the neighborhood competition operator is to randomly select an agent from the agent grid, find out the largest agent in the neighborhood of the agent, calculate the fitness of the two agents, and compare the fitness of the two agents. If the fitness of the agent is greater than the energy value of the agent with the largest fitness in the neighborhood, we will keep the agent alive in the grid. Otherwise, the agent with the largest fitness in the neighborhood is used to replace its location, so as to complete the update. Neighborhood crossover operator is to randomly select an agent from the agent grid, find the neighborhood of the agent, and find the agent with the greatest fitness in the neighborhood. Then, two different intersection points are randomly selected to exchange the intersection areas between the two agents, so as to complete the neighborhood intersection. Through the neighborhood crossover operator, new agents are generated in the agent grid, which increases the diversity of the population. Mutation operator and self-learning operator are mainly to improve the search efficiency and get the global optimal solution as quickly as possible. The algorithm framework of MAGA-ERS is shown in Figure3.Figure 3
MAGA-ERS algorithm framework.Figure4 shows an agent grid model. The agent is represented by the circle in the figure. The position of the agent in the grid is represented by the number in the circle. If two agents interact, we connect the two circles. Otherwise, there is no connection between the two circles.Figure 4
Agent network model.


## 2.1. Wireless Sensor Network Architecture

Wireless sensor network is composed of a group of nodes with data collection characteristics by wireless communication. It is mainly composed of three parts: sensor node, sink node, and management node. Among them, sensor nodes are generally divided into two types: beacon nodes (or anchor nodes) and unknown nodes (or nodes to be located). In the monitoring area of WSN, sensor nodes will be deployed to collect data information. Then, the node sends the collected data information to the sink node in a multihop manner. Finally, the sink node transmits the received data information to the user through the communication network. Through the mutual transmission between different nodes, the speed of data transmission to target users is improved, and the work efficiency is greatly improved. The architecture of wireless sensor network is shown in Figure1. At present, the research difficulties of wireless sensor networks mainly involve networking, communication, management, and distributed information processing. According to the logical relationship of the key technologies in the system, we design the wireless sensor network architecture. We divide wireless sensor networks into three levels, from bottom to top: communication and networking, management and basic services, and application systems.Figure 1
Architecture of wireless sensor network.In wireless sensor networks, the node composition generally includes power supply, microprocessor, external memory, sensor, analog-to-digital converter, and transceiver. It is mainly divided into four parts: the first is the power supply module, the second is the data processing and control module, the third is the communication module, and the last part is the data acquisition module, as shown in Figure2. At the same time, according to different application scenarios, wireless sensor nodes may also include other devices.Figure 2
Node structure of wireless sensor network.In the structure of the whole WSN node, the internal memory of the microprocessor is limited. Therefore, an external memory is also provided in the node to store sensing data. The function of the sensor is to collect the environmental data as analog signals and convert the analog signals of the data into digital signals with the help of the analog-to-digital converter in the node. The transceiver is a device used by the node to receive the control signal from the transmitter. It sends and receives the information and control signal from the management node. In wireless sensor networks, the communication channel is spectrum. The power supply provides energy for the operation of the node, which is usually provided to the sensor node in three ways: battery, wire, or energy collection module. However, in most application environments, these nodes usually take a long time to replace the battery after deployment. Therefore, energy consumption also affects the research and design of WSN to a great extent.


## 2.2. MAGA-ERS Algorithm

In order to search the best deployment scheme more effectively, we propose a multiagent genetic algorithm (MAGA-ERS) based on emergency resource scheduling. In MAGA-ERS, the neighborhood competition operator is to randomly select an agent from the agent grid, find out the largest agent in the neighborhood of the agent, calculate the fitness of the two agents, and compare the fitness of the two agents. If the fitness of the agent is greater than the energy value of the agent with the largest fitness in the neighborhood, we will keep the agent alive in the grid. Otherwise, the agent with the largest fitness in the neighborhood is used to replace its location, so as to complete the update. Neighborhood crossover operator is to randomly select an agent from the agent grid, find the neighborhood of the agent, and find the agent with the greatest fitness in the neighborhood. Then, two different intersection points are randomly selected to exchange the intersection areas between the two agents, so as to complete the neighborhood intersection. Through the neighborhood crossover operator, new agents are generated in the agent grid, which increases the diversity of the population. Mutation operator and self-learning operator are mainly to improve the search efficiency and get the global optimal solution as quickly as possible. The algorithm framework of MAGA-ERS is shown in Figure3.Figure 3
MAGA-ERS algorithm framework.Figure4 shows an agent grid model. The agent is represented by the circle in the figure. The position of the agent in the grid is represented by the number in the circle. If two agents interact, we connect the two circles. Otherwise, there is no connection between the two circles.Figure 4
Agent network model.


## 3. Research on Emergency Dispatching Optimization of Public Resources

### 3.1. Functional Requirements of Dispatching System

The emergency vehicle dispatching system mainly includes the emergency dispatching command center subsystem, dispatching station subsystem, and on-board terminal subsystem. This system provides emergency vehicle dispatching services for the society by answering the phone. It is a comprehensive service platform to accept the requests of the masses in case of emergency. The emergency vehicle dispatching system consists of three parts: emergency dispatching command center, dispatching station, and on-board terminal (emergency material dispatching vehicle). The frame diagram is shown in Figure5. The emergency dispatching command center system is responsible for the unified management of the dispatching station to realize the accurate issuance of dispatching instructions and vehicle monitoring and query of the dispatching station. The dispatching station system receives the instructions from the emergency dispatching command center, realizes the accurate issuance of dispatching instructions, dispatches the vehicles of the station, and realizes the vehicle monitoring and query of the dispatching station. Realize voice/video communication with dispatching vehicles. The on-board system of the dispatching vehicle responds to the vehicle dispatching command of the dispatching station. Realize dual screen display output: including a vehicle navigation screen and information display screen. The navigation screen can realize real-time road navigation; The information display screen can realize the collection and transmission of audio and video and realize the real-time upload of information during vehicle driving.Figure 5
Flowchart of emergency resource scheduling.Generally, the dispatching station and emergency material vehicles can become a system to complete the dispatching task of emergency material vehicles. The dispatching station first issues dispatching instructions to the dispatching vehicles. After receiving the task, the vehicles report the material allocation and vehicle information of the vehicle to complete material distribution. When a major disaster occurs, the emergency dispatching command center is required to coordinate the dispatching.


### 3.2. Emergency Command and Dispatching Optimization

The emergency command is mainly aimed at the major disaster. When an accident occurs, a dispatching station belonging to the disaster location cannot complete the dispatching task by itself. It is necessary to coordinate with the surrounding dispatching stations to complete the dispatching task. The dispatching optimization platform is to guide the traveling route of the truck to reach the destination in case of emergency, monitor various information of the vehicle and the road conditions on the determined route in real time during the operation of the truck, and timely notify the driver to change the route in case of unexpected road conditions, so as to provide safe, effective, and timely support to the disaster area. The transportation of emergency rescue materials is the prerequisite for the smooth progress of rescue work, and the route selection of material vehicles responsible for the transportation of emergency rescue materials is the top priority to ensure the smooth progress of rescue work. Emergency logistics under dynamic road conditions is a special case of emergency logistics. Reasonable scheduling of material distribution vehicles can effectively reduce the no-load rate of vehicles and improve the utilization rate of vehicles.


## 3.1. Functional Requirements of Dispatching System

The emergency vehicle dispatching system mainly includes the emergency dispatching command center subsystem, dispatching station subsystem, and on-board terminal subsystem. This system provides emergency vehicle dispatching services for the society by answering the phone. It is a comprehensive service platform to accept the requests of the masses in case of emergency. The emergency vehicle dispatching system consists of three parts: emergency dispatching command center, dispatching station, and on-board terminal (emergency material dispatching vehicle). The frame diagram is shown in Figure5. The emergency dispatching command center system is responsible for the unified management of the dispatching station to realize the accurate issuance of dispatching instructions and vehicle monitoring and query of the dispatching station. The dispatching station system receives the instructions from the emergency dispatching command center, realizes the accurate issuance of dispatching instructions, dispatches the vehicles of the station, and realizes the vehicle monitoring and query of the dispatching station. Realize voice/video communication with dispatching vehicles. The on-board system of the dispatching vehicle responds to the vehicle dispatching command of the dispatching station. Realize dual screen display output: including a vehicle navigation screen and information display screen. The navigation screen can realize real-time road navigation; The information display screen can realize the collection and transmission of audio and video and realize the real-time upload of information during vehicle driving.Figure 5
Flowchart of emergency resource scheduling.Generally, the dispatching station and emergency material vehicles can become a system to complete the dispatching task of emergency material vehicles. The dispatching station first issues dispatching instructions to the dispatching vehicles. After receiving the task, the vehicles report the material allocation and vehicle information of the vehicle to complete material distribution. When a major disaster occurs, the emergency dispatching command center is required to coordinate the dispatching.


## 3.2. Emergency Command and Dispatching Optimization

The emergency command is mainly aimed at the major disaster. When an accident occurs, a dispatching station belonging to the disaster location cannot complete the dispatching task by itself. It is necessary to coordinate with the surrounding dispatching stations to complete the dispatching task. The dispatching optimization platform is to guide the traveling route of the truck to reach the destination in case of emergency, monitor various information of the vehicle and the road conditions on the determined route in real time during the operation of the truck, and timely notify the driver to change the route in case of unexpected road conditions, so as to provide safe, effective, and timely support to the disaster area. The transportation of emergency rescue materials is the prerequisite for the smooth progress of rescue work, and the route selection of material vehicles responsible for the transportation of emergency rescue materials is the top priority to ensure the smooth progress of rescue work. Emergency logistics under dynamic road conditions is a special case of emergency logistics. Reasonable scheduling of material distribution vehicles can effectively reduce the no-load rate of vehicles and improve the utilization rate of vehicles.


## 4. Optimization Algorithm and Simulation of Emergency Dispatching of Public Resources

### 4.1. Improved MAGA

#### 4.1.1. Scheduling Model

In the existing literature, most researchers focus on shortening the time of resource distribution, and the resource transportation mode used in the research is single. In fact, when a disaster occurs, we can choose a variety of resource distribution methods. In addition, they did not consider the cost of resource distribution when choosing different transportation modes. However, the cost of emergency logistics is a very important part that cannot be ignored. In this paper, we design a mathematical model for emergency resource scheduling considering multiple transportation modes. The optimization goal is not only the transportation time but also the cost of transportation resources, so as to be closer to the reality. At the same time, we design a MAGA-MTERS algorithm based on the Maga algorithm framework to solve the emergency resource scheduling under various transportation modes. The experimental results show that the MAGA-MTERS algorithm is effective. Emergency management is a very complex system engineering. Its core is to deal with the relationship between different disaster sites and resource supply sites. When an emergency occurs, the disaster site needs a lot of different resources. When we design the distribution scheme, the first consideration is to meet the material needs of the affected areas, and then, we should reduce the distribution cost of resources as much as possible.


#### 4.1.2. Model Representation

Based on the above description, an emergency resource scheduling model under multiple transportation modes is designed as follows:(1)Minf1∬klimS⟶∞∑ijsGijs×Mijs−f2limS⟶∞∑s=1S∬KGijsM2−MG,(2)∬klimS⟶∞∑ijsGijs=ni,i=1,2,⋯,m,(3)limx⟶∞∑ijsGijx≤∬Knijs,i=1,2,⋯,m,j=1,2,⋯,n,(4)limx⟶∞∑ijsKijx≤∬Knijs,(5)∏Cijx≤1,i=1,2,⋯,m,j=1,2,⋯,n,s=1,2,⋯,u.In the above model, the objective function (1) means that our optimization goal includes two parts; the first part is the resource distribution time, and the other part is the cost of resource distribution. i and j, respectively, represent the weight of resource distribution time and cost in decision-making, and the sum of i and j is equal to 1. Constraint condition (2) means that the resources transported by a certain mode of transportation should meet the demand for the materials at the disaster point. Constraint condition (3) means that the total amount of resources actually supplied at each supply point is not less than the total amount of demand at the demand point. Condition (4) indicates that in each disaster point, the total demand for resources cannot exceed the total amount of actual transportation. Constraint (5) indicates that the amount of resources transported cannot be negative when transporting resources.


#### 4.1.3. Penalty Function

In the process of solving the optimization problem, we design two penalty functions to improve the problem-solving ability of the algorithm.(6)panel1=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy1,(7)panel2=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy2.Formula (6) indicates that the supply point cannot provide resources beyond its capacity. Once this condition is not met, the formula will work and punish. Formula (7) indicates that the demand of the demand point must be met, and the disaster point should not obtain resources exceeding its demand. y1 and y2 are two control parameters used to control the degree of punishment. The greater the y1 and y2 values, the more severe the penalty. Conversely, the smaller the value, the lighter the punishment.


#### 4.1.4. MAGA-MTERS Algorithm

In function optimization and approximate linear system problems, multiagent genetic algorithm MAGA has good performance. In MAGA, an agent represents a solution of the optimization problem. All agents live in a mesh environment. In order to get a better fitness value, they will compete and cooperate with each other in each generation. Adopting the natural biological evolution criterion of “survival of the fittest” will eventually retain the individuals with the best fitness. There are four operators in MAGA algorithm: crossover operator, mutation operator, competition operator, and self-learning operator. Considering the model designed in this chapter, we design an improved multiagent genetic algorithm MAGA-MTERS and redesign some operators in Maga to better solve the designed model. In this part, we will give the specific implementation details of MAGA-MTERS algorithm. Firstly, we introduce the representation of agent and the method of generating initialization population in MAGA-MTERS and then describe the specific operation processes of crossover operator, neighborhood competition operator, mutation operator, and self-learning operator. Finally, the whole algorithm framework of MAGA-MTERS is summarized.We used data from the literature for testing. The scenario is as follows: suppose there are three supply pointsSi (S1, S2, and S3), two demand points DJ (D1 and D2), and three transportation modes MK (M1, M2, and M3). We use MAGA-MTERS to solve the scheduling problem of emergency resources. The population size at initialization is size×size=20×20; u1 and u2 are all 1 in size. The population size of self-learning operator is size×size=25, variation probability PM is 0.1, and crossover probability changes from 0.1 to 0.9. Then, the average fitness under different maximum iterations and the iteration algebra to obtain the best individual are recorded, as shown in Figure 6. In order to ensure the reliability of the data, each group of experiments was tested for 5 times, and then, the average value of each group of experimental results was taken.Figure 6
Comparison of results between GA and MAGA-MTERS.The experimental results are shown in Figure6. It can be seen that MAGA-MTERS can obtain an effective solution in a specific number of iterations. The best fitness value occurs when the maximum number of iterations is 10000 and the crossover probability is 0.7, and the fitness=24040.40. At the same time, when the crossover probability is constant and the number of iterations is from 1000 to 10000, the fitness value is basically reduced. In other words, MAGA-MTERS can get an effective solution according to the actual number of iterations.


### 4.2. Experimental Simulation and Analysis

This experiment uses the MATLAB platform to simulate the proposed improved algorithm and compares it with the original MAGA-MTERS algorithm. In the experiment, node coordinates are randomly generated in a positioning area of100m×100m. The relative error used in the calculation is
(8)error=∏x=1kSx0−Sx1mSx02+Sx12,wheren is the number of unknown nodes, S is the coordinate of the modified unknown node k, Sx0 is its actual coordinate, and m is the communication radius. And each experimental data point is subjected to 100 experimental operations to obtain the average value.As can be seen from Figure7, the positioning error of the improved algorithm proposed in this paper decreases with the increase of communication radius. When the communication radius is 55, the positioning error of the original MAGA-MTERS algorithm is about 26%, but after the improvement of the algorithm in this paper, the positioning error is reduced to about 18%. Overall, the improved algorithm is 7%-9% better than the original MAGA-MTERS algorithm. Figure 7 shows the influence of the total number of nodes on the relative error. Set the number of beacon nodes to 20, and experiment the total number of nodes to 105, 120, 145, 165, 185, 205, 225, 245, and 265, respectively.Figure 7
Influence of communication radius on relative error.Figure8(a) shows the experimental results when the communication radius is R=25m. It can be seen that when the number of nodes exceeds 165, the increase of nodes has little effect on improving the positioning accuracy. The improved algorithm basically maintains the positioning error of 0.25-0.26, and the overall positioning accuracy is optimized by 5%-7%. When the communication radius is 50 m, the experimental results are shown in Figure 8(b), and the improved algorithm is 7%-9% better than the original MAGA-MTERS algorithm. When the communication radius is 25 m, the larger the node, the greater the accuracy. When the communication radius is 50 m, the larger the node, the smaller the accuracy.Figure 8
(a) The experimental results when the communication radius isR=25m. (b) The experimental results when the communication radius is R=55m.
(a)(b)


## 4.1. Improved MAGA

### 4.1.1. Scheduling Model

In the existing literature, most researchers focus on shortening the time of resource distribution, and the resource transportation mode used in the research is single. In fact, when a disaster occurs, we can choose a variety of resource distribution methods. In addition, they did not consider the cost of resource distribution when choosing different transportation modes. However, the cost of emergency logistics is a very important part that cannot be ignored. In this paper, we design a mathematical model for emergency resource scheduling considering multiple transportation modes. The optimization goal is not only the transportation time but also the cost of transportation resources, so as to be closer to the reality. At the same time, we design a MAGA-MTERS algorithm based on the Maga algorithm framework to solve the emergency resource scheduling under various transportation modes. The experimental results show that the MAGA-MTERS algorithm is effective. Emergency management is a very complex system engineering. Its core is to deal with the relationship between different disaster sites and resource supply sites. When an emergency occurs, the disaster site needs a lot of different resources. When we design the distribution scheme, the first consideration is to meet the material needs of the affected areas, and then, we should reduce the distribution cost of resources as much as possible.


### 4.1.2. Model Representation

Based on the above description, an emergency resource scheduling model under multiple transportation modes is designed as follows:(1)Minf1∬klimS⟶∞∑ijsGijs×Mijs−f2limS⟶∞∑s=1S∬KGijsM2−MG,(2)∬klimS⟶∞∑ijsGijs=ni,i=1,2,⋯,m,(3)limx⟶∞∑ijsGijx≤∬Knijs,i=1,2,⋯,m,j=1,2,⋯,n,(4)limx⟶∞∑ijsKijx≤∬Knijs,(5)∏Cijx≤1,i=1,2,⋯,m,j=1,2,⋯,n,s=1,2,⋯,u.In the above model, the objective function (1) means that our optimization goal includes two parts; the first part is the resource distribution time, and the other part is the cost of resource distribution. i and j, respectively, represent the weight of resource distribution time and cost in decision-making, and the sum of i and j is equal to 1. Constraint condition (2) means that the resources transported by a certain mode of transportation should meet the demand for the materials at the disaster point. Constraint condition (3) means that the total amount of resources actually supplied at each supply point is not less than the total amount of demand at the demand point. Condition (4) indicates that in each disaster point, the total demand for resources cannot exceed the total amount of actual transportation. Constraint (5) indicates that the amount of resources transported cannot be negative when transporting resources.


### 4.1.3. Penalty Function

In the process of solving the optimization problem, we design two penalty functions to improve the problem-solving ability of the algorithm.(6)panel1=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy1,(7)panel2=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy2.Formula (6) indicates that the supply point cannot provide resources beyond its capacity. Once this condition is not met, the formula will work and punish. Formula (7) indicates that the demand of the demand point must be met, and the disaster point should not obtain resources exceeding its demand. y1 and y2 are two control parameters used to control the degree of punishment. The greater the y1 and y2 values, the more severe the penalty. Conversely, the smaller the value, the lighter the punishment.


### 4.1.4. MAGA-MTERS Algorithm

In function optimization and approximate linear system problems, multiagent genetic algorithm MAGA has good performance. In MAGA, an agent represents a solution of the optimization problem. All agents live in a mesh environment. In order to get a better fitness value, they will compete and cooperate with each other in each generation. Adopting the natural biological evolution criterion of “survival of the fittest” will eventually retain the individuals with the best fitness. There are four operators in MAGA algorithm: crossover operator, mutation operator, competition operator, and self-learning operator. Considering the model designed in this chapter, we design an improved multiagent genetic algorithm MAGA-MTERS and redesign some operators in Maga to better solve the designed model. In this part, we will give the specific implementation details of MAGA-MTERS algorithm. Firstly, we introduce the representation of agent and the method of generating initialization population in MAGA-MTERS and then describe the specific operation processes of crossover operator, neighborhood competition operator, mutation operator, and self-learning operator. Finally, the whole algorithm framework of MAGA-MTERS is summarized.We used data from the literature for testing. The scenario is as follows: suppose there are three supply pointsSi (S1, S2, and S3), two demand points DJ (D1 and D2), and three transportation modes MK (M1, M2, and M3). We use MAGA-MTERS to solve the scheduling problem of emergency resources. The population size at initialization is size×size=20×20; u1 and u2 are all 1 in size. The population size of self-learning operator is size×size=25, variation probability PM is 0.1, and crossover probability changes from 0.1 to 0.9. Then, the average fitness under different maximum iterations and the iteration algebra to obtain the best individual are recorded, as shown in Figure 6. In order to ensure the reliability of the data, each group of experiments was tested for 5 times, and then, the average value of each group of experimental results was taken.Figure 6
Comparison of results between GA and MAGA-MTERS.The experimental results are shown in Figure6. It can be seen that MAGA-MTERS can obtain an effective solution in a specific number of iterations. The best fitness value occurs when the maximum number of iterations is 10000 and the crossover probability is 0.7, and the fitness=24040.40. At the same time, when the crossover probability is constant and the number of iterations is from 1000 to 10000, the fitness value is basically reduced. In other words, MAGA-MTERS can get an effective solution according to the actual number of iterations.


## 4.1.1. Scheduling Model

In the existing literature, most researchers focus on shortening the time of resource distribution, and the resource transportation mode used in the research is single. In fact, when a disaster occurs, we can choose a variety of resource distribution methods. In addition, they did not consider the cost of resource distribution when choosing different transportation modes. However, the cost of emergency logistics is a very important part that cannot be ignored. In this paper, we design a mathematical model for emergency resource scheduling considering multiple transportation modes. The optimization goal is not only the transportation time but also the cost of transportation resources, so as to be closer to the reality. At the same time, we design a MAGA-MTERS algorithm based on the Maga algorithm framework to solve the emergency resource scheduling under various transportation modes. The experimental results show that the MAGA-MTERS algorithm is effective. Emergency management is a very complex system engineering. Its core is to deal with the relationship between different disaster sites and resource supply sites. When an emergency occurs, the disaster site needs a lot of different resources. When we design the distribution scheme, the first consideration is to meet the material needs of the affected areas, and then, we should reduce the distribution cost of resources as much as possible.


## 4.1.2. Model Representation

Based on the above description, an emergency resource scheduling model under multiple transportation modes is designed as follows:(1)Minf1∬klimS⟶∞∑ijsGijs×Mijs−f2limS⟶∞∑s=1S∬KGijsM2−MG,(2)∬klimS⟶∞∑ijsGijs=ni,i=1,2,⋯,m,(3)limx⟶∞∑ijsGijx≤∬Knijs,i=1,2,⋯,m,j=1,2,⋯,n,(4)limx⟶∞∑ijsKijx≤∬Knijs,(5)∏Cijx≤1,i=1,2,⋯,m,j=1,2,⋯,n,s=1,2,⋯,u.In the above model, the objective function (1) means that our optimization goal includes two parts; the first part is the resource distribution time, and the other part is the cost of resource distribution. i and j, respectively, represent the weight of resource distribution time and cost in decision-making, and the sum of i and j is equal to 1. Constraint condition (2) means that the resources transported by a certain mode of transportation should meet the demand for the materials at the disaster point. Constraint condition (3) means that the total amount of resources actually supplied at each supply point is not less than the total amount of demand at the demand point. Condition (4) indicates that in each disaster point, the total demand for resources cannot exceed the total amount of actual transportation. Constraint (5) indicates that the amount of resources transported cannot be negative when transporting resources.


## 4.1.3. Penalty Function

In the process of solving the optimization problem, we design two penalty functions to improve the problem-solving ability of the algorithm.(6)panel1=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy1,(7)panel2=∬klimS⟶∞∑ijsGijs+∮a2+b2dsy2.Formula (6) indicates that the supply point cannot provide resources beyond its capacity. Once this condition is not met, the formula will work and punish. Formula (7) indicates that the demand of the demand point must be met, and the disaster point should not obtain resources exceeding its demand. y1 and y2 are two control parameters used to control the degree of punishment. The greater the y1 and y2 values, the more severe the penalty. Conversely, the smaller the value, the lighter the punishment.


## 4.1.4. MAGA-MTERS Algorithm

In function optimization and approximate linear system problems, multiagent genetic algorithm MAGA has good performance. In MAGA, an agent represents a solution of the optimization problem. All agents live in a mesh environment. In order to get a better fitness value, they will compete and cooperate with each other in each generation. Adopting the natural biological evolution criterion of “survival of the fittest” will eventually retain the individuals with the best fitness. There are four operators in MAGA algorithm: crossover operator, mutation operator, competition operator, and self-learning operator. Considering the model designed in this chapter, we design an improved multiagent genetic algorithm MAGA-MTERS and redesign some operators in Maga to better solve the designed model. In this part, we will give the specific implementation details of MAGA-MTERS algorithm. Firstly, we introduce the representation of agent and the method of generating initialization population in MAGA-MTERS and then describe the specific operation processes of crossover operator, neighborhood competition operator, mutation operator, and self-learning operator. Finally, the whole algorithm framework of MAGA-MTERS is summarized.We used data from the literature for testing. The scenario is as follows: suppose there are three supply pointsSi (S1, S2, and S3), two demand points DJ (D1 and D2), and three transportation modes MK (M1, M2, and M3). We use MAGA-MTERS to solve the scheduling problem of emergency resources. The population size at initialization is size×size=20×20; u1 and u2 are all 1 in size. The population size of self-learning operator is size×size=25, variation probability PM is 0.1, and crossover probability changes from 0.1 to 0.9. Then, the average fitness under different maximum iterations and the iteration algebra to obtain the best individual are recorded, as shown in Figure 6. In order to ensure the reliability of the data, each group of experiments was tested for 5 times, and then, the average value of each group of experimental results was taken.Figure 6
Comparison of results between GA and MAGA-MTERS.The experimental results are shown in Figure6. It can be seen that MAGA-MTERS can obtain an effective solution in a specific number of iterations. The best fitness value occurs when the maximum number of iterations is 10000 and the crossover probability is 0.7, and the fitness=24040.40. At the same time, when the crossover probability is constant and the number of iterations is from 1000 to 10000, the fitness value is basically reduced. In other words, MAGA-MTERS can get an effective solution according to the actual number of iterations.


## 4.2. Experimental Simulation and Analysis

This experiment uses the MATLAB platform to simulate the proposed improved algorithm and compares it with the original MAGA-MTERS algorithm. In the experiment, node coordinates are randomly generated in a positioning area of100m×100m. The relative error used in the calculation is
(8)error=∏x=1kSx0−Sx1mSx02+Sx12,wheren is the number of unknown nodes, S is the coordinate of the modified unknown node k, Sx0 is its actual coordinate, and m is the communication radius. And each experimental data point is subjected to 100 experimental operations to obtain the average value.As can be seen from Figure7, the positioning error of the improved algorithm proposed in this paper decreases with the increase of communication radius. When the communication radius is 55, the positioning error of the original MAGA-MTERS algorithm is about 26%, but after the improvement of the algorithm in this paper, the positioning error is reduced to about 18%. Overall, the improved algorithm is 7%-9% better than the original MAGA-MTERS algorithm. Figure 7 shows the influence of the total number of nodes on the relative error. Set the number of beacon nodes to 20, and experiment the total number of nodes to 105, 120, 145, 165, 185, 205, 225, 245, and 265, respectively.Figure 7
Influence of communication radius on relative error.Figure8(a) shows the experimental results when the communication radius is R=25m. It can be seen that when the number of nodes exceeds 165, the increase of nodes has little effect on improving the positioning accuracy. The improved algorithm basically maintains the positioning error of 0.25-0.26, and the overall positioning accuracy is optimized by 5%-7%. When the communication radius is 50 m, the experimental results are shown in Figure 8(b), and the improved algorithm is 7%-9% better than the original MAGA-MTERS algorithm. When the communication radius is 25 m, the larger the node, the greater the accuracy. When the communication radius is 50 m, the larger the node, the smaller the accuracy.Figure 8
(a) The experimental results when the communication radius isR=25m. (b) The experimental results when the communication radius is R=55m.
(a)(b)


## 5. Conclusion

Wireless sensor networks have become the focus of academia and industry at home and abroad. The characteristics of low cost, low power consumption, high error tolerance, self-organization, and multifunction, which are different from other networks, make sensor networks have incomparable advantages of traditional technology in various applications. At the same time, many novel and valuable applications will emerge. At present, target tracking technology based on wireless sensor networks is a very valuable application. It has a wide range of requirements in military and various tracking systems. Target tracking based on wireless sensor networks includes the following core problems: coverage problem, location problem, data transmission problem, and trajectory description problem. Among them, location problem is the basis and prerequisite of target tracking problem. According to the sequence of system operation, this paper focuses on the role of wireless sensor technology in public resource emergency scheduling optimization. The system application and implementation of wireless sensor networks are studied. Facing the application requirements of emergency resource mobilization and considering the advantages of wireless sensor network, the wireless sensor network technology is adopted, the system structure of public resource mobilization and the control architecture based on wireless sensor network are designed, and a new distributed sensor and control network system is established.To sum up, this paper mainly completes the following work: firstly, based on the actual needs of emergency resource scheduling, the whole system is divided into three modules: emergency dispatching command center subsystem, dispatching station subsystem, and vehicle terminal subsystem, and the emergency event dispatching command module is added to the three subsystems to analyze the functional requirements of each subsystem one by one. It also puts forward the attribute requirements, implementation requirements, interface/interface requirements, and hardware requirements in the process of software development of the system, so as to prepare for the development of the system. Then, the emergency resource scheduling problem under various transportation modes is studied. In this paper, the corresponding mathematical model is established, and the MAGA-MTERS algorithm is designed to optimize the problem. At the same time, the completely artificially generated data are used to verify the model and algorithm. Experiments show that the algorithm is very effective to solve this problem. At the same time, we believe that this work has a good guiding role for the actual rescue.



---

*Source: 2450346-2021-10-08.xml*