Abstract
Safety is the premise of the stable and sustainable development of the chemical industry, safety accidents will not only cause casualties and economic losses, but also cause panic among workers and nearby residents. Robot safety inspection based on the fire risk level in a chemical industrial park can effectively reduce process accident losses and can even prevent accidents. The optimal inspection path is an important support for patrol efficiency, therefore, in this study, the fire risk level of each location to be inspected, which is obtained by the electrostatic discharge algorithm (ESDA)–nonparallel support vector machine evaluation model, is combined with the optimisation of the inspection path; that is, the fire risk level is used to guide the inspection path planning. The inspection path planning problem is a typical travelling salesman problem (TSP). The discrete ESDA (DESDA), based on the ESDA, is proposed. In view of the shortcomings of the long convergence time and ease of falling into the local optimum of the DESDA, further improvements are proposed in the form of the IDESDA, in which the greedy algorithm is used for the initial population, the 2-opt algorithm is applied to generate new solutions, and the elite set is joined to provide the best segment for jumping out of the local optimum. In the experiments, 11 public calculation examples were used to verify the algorithm performance. The IDESDA exhibited higher accuracy and better stability when solving the TSP. Its application to chemical industrial parks can effectively solve the path optimisation problem of patrol robots.
Keywords
Introduction
With the rapid development of chemical industry, chemical industry parks involving toxic and harmful substances are increasing year by year [1]. Therefore, the occurrence of hazardous chemical accidents in chemical industry parks has gradually become an important factor threatening the life and property safety of our citizens and causing environmental pollution [2]. Fire and explosion accidents in chemical industry park are the most common, not only prone, but great harm. On 23 March 2005, the bp’s Texas City refinery caused a large-scale explosion accident due to long-term unrepaired process equipment, resulting in 15 deaths, 180 injuries and a direct economic loss of more than 1.5 billion dollars [3]. On 21 March 2019, due to the long-term illegal storage of nitrified waste in the old waste warehouse of Tianjiayi Company, Xiangshui County Ecological Chemical Park, Yancheng City, Jiangsu Province, continuous heat accumulation led to spontaneous combustion and explosion, resulting in 78 deaths and direct economic loss of 1.986 billion yuan [4, 5]. It can be observed from the above cases that accidents are usually caused by the failure to detect and deal with hidden dangers such as leaks in a timely manner. Accidents can be avoided if hidden dangers can be investigated effectively.
Safety inspection is an effective means of detecting hidden dangers with accuracy and applicability. Current safety inspection methods are mainly divided into manual and robot inspections. Owing to the large area of a chemical industrial park, numerous scattered hidden dangers exist. However, robot inspection can compensate for the shortcomings of manual inspection, and the working efficiency of a robot is not limited by the workload and working time.
Path optimisation of the patrol robot is extremely important during automatic inspection. The establishment of an optimal path enables hidden dangers to be detected at the inspection points in time, while simultaneously ensuring the shortest distance of the inspection path. The advantages of the optimal path are more obvious when the number of points to be inspected is large and the degree of danger differs. Scholars have conducted extensive research on the path optimisation of patrol robots. Pan et al. applied a patrol robot to a chemical workshop and used the A* algorithm to optimise the inspection path to improve the dynamic monitoring efficiency, reduce the incidence of accidents, and ensure production safety [6]. To solve the problem of slow convergence speed in path planning of mobile service robots, Tao et al. proposed a global path planning method based on improved ant colony algorithm [7]. Xu et al. proposed a path planning algorithm of patrol robot based on simulated annealing and adaptive strategy improved genetic algorithm to improve the inspection ability of robot [8]. Lai et al. applied the improved central constraint weighted A* algorithm to path planning of petrochemical inspection robots [9]. Aiming at the low efficiency of inspection path in rare earth metal warehouses, a greedy genetic hybrid path optimization algorithm was proposed to establish a mathematical model for mobile inspection of warehouse groups [10]. Jiang et al. applied the improved A* algorithm to the path planning of mobile disinfection robot to improve the efficiency of path planning [11].
A literature review revealed that the algorithms adopted by the abovementioned scholars exhibit certain advantages; however, certain shortcomings arise in terms of the convergence speed and efficiency. For example, although the genetic algorithm has a strong global search ability, it still exhibits the disadvantage of a slow search speed, and it is prone to premature convergence in practical applications. The ant colony algorithm has good robustness and is easy to combine with other algorithms [12], but it experiences problems of slow convergence and ease of falling into the local optimal solution. Compared to other algorithms, the greatest advantage of the greedy algorithm is that it is easy to implement and highly efficient in most cases, but it cannot guarantee that the final solution is the optimal solution [13]. Although the A* algorithm has been used extensively owing to its high efficiency, rapid speed, and easy operation, the growth of the search space exhibits an exponential trend [14].
To ensure inspection efficiency, an algorithm with excellent performance should be selected for path optimisation. The electrostatic static discharge algorithm (ESDA) exhibits the advantages of rapid convergence and high optimisation accuracy [15]; therefore, in this study, the ESDA was selected for the research and certain improvements were implemented on the basis thereof.
The ESDA, which is a new meta-heuristic algorithm inspired by ESD events, was proposed by Bouchekara in 2019 for solving continuous problems. However, no research has been conducted on the automatic inspection path of a safety patrol robot based on the ESDA.
The path problem of the automatic inspection of a safety patrol robot is a typical travelling salesman problem (TSP). In this study, to apply the ESDA to the TSP and to provide an effective method for solving the TSP, the discrete ESDA is proposed. The DESDA itself exhibits the disadvantages of a long convergence time and easily falling into local optima. Thus, to improve the algorithm performance, an improved DESDA (IDESDA) is proposed and applied to the optimisation of the robot inspection path. Common robot inspection modes mainly adopt fixed inspection paths. However, when changes in the production process, raw material type, and storage capacity of the detection point cause the fire risk level to change dynamically, the optimal inspection path cannot be planned in time and priority cannot be given to the objects with the highest risk. Thus, this study combines the fire risk level of the inspection position with the path optimisation of the safety patrol robot so that the patrol robot can complete the inspection task efficiently and in a focused manner, so as to reduce the probability of accidents.
The rest of the study is organized as follows:
The second section briefly describes the fire risk assessment process of the chemical industry park. The third section introduces the DESDA. The fourth section elaborates the path optimization of inspection robot based on the fire risk level of chemical industry park. In the fifth section, the simulation experiment is carried out. Finally, the conclusion is given in Section 6.
Dynamic intelligent risk assessment of fire in chemical industry park
In this study, the inspection points in the chemical industrial park were divided into three categories according to their functions: class A dangerous chemical warehouses, production workshops, and public areas (office buildings and canteens). The fire risk levels of the three types of inspection points were calculated by the corresponding fire dynamic risk assessment model according to ‘Dynamic intelligent risk assessment of hazardous chemical warehouse fire based on electrostatic discharge method and improved support vector machine’ when the fire risk level increases, the safety management personnel checks and judges whether the evaluation result is correct. If the evaluation result is wrong, assign the test data to the correct level and add it to the Class A library sample set, if it is correct, add it directly to the sample set. Once the sample set change is detected, the model will be automatically updated to continuously improve its evaluation performance. In addition, in practical applications, enterprises can set their own fire risk assessment time intervals according to the actual situation. In this paper, using the production workshop as an example and setting the time interval of 10 minutes. The fire risk level evaluation process is depicted in Fig. 1.

Process of fire dynamic risk assessment in production workshop.
ESDA
First, the electronic equipment is sorted according to the fitness, and the first 1/3 is selected as the elite set to update the remaining 2/3 of the equipment. Through the direct and indirect discharge of electronic equipment, electronic equipment with a low fitness moves to electronic equipment with a high fitness to obtain electronic equipment with higher fitness.
The ESDA pseudocode is presented in Table 1. The algorithm steps are as follows: (1) population initialisation, (2) electronic equipment update, (3) damaged electronic equipment update, and (4) new population selection. Step 1: randomly generate N electronic devices according to formula 1 (line 2); Step 2: the elite set updates the remaining electronic equipment according to formulas 2 and 3 (lines 6 to 11); Step 3: check the number of discharges and update several electronic devices (lines 12 to 14); Step 4: the new generation equipment is added to the original equipment population and saved, and the equipment is sorted in descending order according to the fitness. If the population number is set to 20, the first 20 pieces of equipment are selected as the next iteration population.
Pseudocode of standard ESDA
Pseudocode of standard ESDA
The TSP is a classic combinatorial optimisation problem, and the path optimisation of a patrol robot based on the fire risk level is a typical TSP problem. The classic TSP can be described as a merchandise salesman who wishes to visit several cities to sell merchandise. The salesman starts from one city and must move through all of the cities before returning to the place of departure, which requires the shortest access route that includes all cities to be determined. The TSP can be represented by the graph G = (V, E) , V = {1, 2 … N}, where V is the set of vertices and E is the set of edges. In the TSP, each vertex is a city to be visited and each edge is the distance between two cities [16, 17].
Let C
ij
be the distance between city i and city j; if the route includes a journey directly from city i to city j, X
ij
= 1; otherwise, X
ij
= 0. The mathematical model of the TSP can be expressed as follows:
If the route includes a journey directly from city i to city j, X ij = 1; otherwise, X ij = 0. C ij represents the distance between city i and city j. Formula (4-1) represents the total distance of a route, formulas (4-2) and (4-3) ensure that each city is only visited once in the travel route, and formula (4-4) ensures that there is only one closed loop in the path.
The DESDA based on heuristic information is proposed to solve the inspection path optimisation problem. As the ESDA is used for continuous problems, it is not suitable for discrete problems such as the TSP; therefore, it needs to be discretised. In the DESDA, the individual electronic device is a sequence of salesman-traveling cities; that is, a feasible travel path, such as X = (X1, X2, X3 … X
n
), where all X
i
differ and n represents the number of cities. The objective of the TSP is to obtain the shortest travel path in all cities, so the objective function is formula (5). The actual coordinates of X
i
are (X
ix
, X
jy
), and the Euclidean distance between X
i
and X
j
is obtained using formula 6.
The DESDA pseudocode is presented in Table 2. The algorithm steps are as follows: First, initialise the parameters and the population of electronic devices. The form of the electronic devices is as indicated above, and the fitness of all devices is calculated and sorted. The first 1/3 of the devices are selected as the elite set, following which three devices are randomly selected from the elite set and sorted in order of fitness; the three devices are temporarily named X1, X2, and X3. To generate the random number r1, if r1 > 0.5, the heuristic crossover operator generates new electronic devices according to X1 and X2, and assigns these to X iNEW ; simultaneously, 1 is added to the number of X2 discharges. If r1≤0.5, the heuristic crossover operator generates new electronic devices according to X1, X2, and X3 and assigns these to X iNEW , and 1 is added to the X3 discharge times. The heuristic crossover operators are described in section 3.3.2. Lines 6 to 11 generate 2/3*N new electronic devices based on the elite set. Lines 12 to 14 are the mutation operations of several new electronic devices according to the number of discharges of current generation electronic devices. If 0 < Xi1ESDcounter ≤ 3, a mutation operation is performed on it. The mutation operation is described in section 3.3.3. If Xi1ESDcounter > 3, an electronic device is randomly generated to replace the electronic device. Subsequently, the elite set is merged with the newly generated equipment in the previous step to complete this iteration.
Pseudocode of DESDA
Pseudocode of DESDA
The heuristic crossover operator is an important part of the DESDA. In the ESDA, the new equipment (solution) is generated by formulas 2 and 3, but the equipment form in the TSP is X = (X1, X2, X3 … X n ), and the effective solution cannot be obtained by directly applying the original equipment generation method. To solve this problem, in this study, a heuristic crossover operator is used to generate new equipment.
The offspring that are crossed by the crossover operator can better inherit the excellent genes of the father generation, which is more effective than the traditional crossover operators, such as cyclic crossover, sequential crossover, and projective crossover. For further details regarding this operator, please refer to the literature ‘An Adaptive Brain Storm Optimization Algorithm Based on Heuristic Operators for TSP’.
Mutation operation
The mutation operation is of importance in the algorithm, which can effectively ensure the diversity of the population in the iterative process. When the algorithm is trapped in the local optimum, the mutation helps the algorithm to jump out of the current local optimum.
In this study, the mutation operation adopts a mixed mutation of three mutation operators, which can guarantee population diversity more effectively than a single mutation operator [18]. The mutation operators consist of exchange, insertion, and inversion operators [19]. The probability of each operator being selected is 1/3, and the mutation operator is selected using roulette [20].
IDESDA
In the previous section, the DESDA was proposed to solve the TSP, but room for improvement remains in the convergence rate and jumping out of the local optimum. Thus, the simple and effective IDESDA is proposed. Compared to the basic version, the IDESDA has a faster convergence speed and better optimisation ability.
Framework of IDESDA
In the improved version, first, the random initialised population is changed to generate the initial population using the greedy algorithm, which can ensure the quality of the initial population and accelerate the convergence rate. Furthermore, the immigration disturbance operation is increased, and the probability of generating the optimal fragment in the electronic equipment is significantly improved. When updating equipment according to the elite set, the new equipment will inherit the excellent fragment and jump out of the local optimum. The process of IDESDA is depicted in Fig. 2.

Process of IDESDA.
The implementation process of the greedy algorithm involves randomly selecting a city as the starting city of the travelling salesman and adding it to the travel route. Thereafter, all cities not included in the travel route are searched, the city closest to the current city is identified and added to the route, and this city is made the current city. The next closest city is searched and added continuously until all of the cities are included in the route, thereby realising the initial optimisation of the travel route. For further details, please refer to ‘Hybrid Genetic Algorithm Based on Strategy of Greedy for TSP’.
2-opt algorithm
This algorithm was proposed by Lin in 1965 [21], and it has been used extensively in path optimisation ever since [22–24]. The process of 2-opt is to delete the two sides of the route and to reconnect the route with two other shorter sides. For further details, please refer to ‘Computer solutions of the traveling salesman problem’.
Immigration disturbance
The individual equipment variation in the DESDA is determined by the number of discharges, but only the elite set of 1/3 of the population participates in the generation of new individuals. Therefore, there are fewer individuals in the population that meet the variation conditions and the probability of variation is small. As the number of iterations increases, the number of dominant individuals continues to increase. In the middle and later iterations, the similarity of individuals in the population is extremely high, which will lead to premature convergence and an inability to jump out of the current local optimum. Although the population diversity can be increased by increasing the mutation probability, the probability of the higher-order mode being destroyed also increases. Immigration disturbance refers to the introduction of new individuals instead of poor individuals in the elite concentration. When the population maintains the same optimal solution for 40 consecutive generations, the 2-opt algorithm is used to generate 1/3 new individuals among the number of elite solution sets, replacing the last 1/3 of the elite solution sets. Meanwhile, the variable ‘OsustainNum’ that is used to record the persistence algebra of the optimal solution is changed to 38. The purpose of changing OsustainNum is to minimise the operation time under the premise of ensuring the algorithm performance. The immigration disturbance operation effectively increases the population diversity when the algorithm falls into the local optimum, introduces new optimal fragments for the population, and retains the optimal fragments through a heuristic crossover operator, so that the algorithm can jump out of the current local optimum.
Path planning of safety patrol robot based on fire risk level in chemical industry park
The path optimisation of a patrol robot based on the fire risk level of a chemical industrial park refers to combining the fire risk level of each location to be inspected with the optimisation of the inspection path; that is, the fire risk level is used to guide the inspection path planning. For the TSP, the objective function is no longer the shortest path, but is used to plan the shortest path under the premise of ensuring high-priority patrol at the risk level. It should be emphasised that the fire risk level in this study is the fire risk early warning level under the safe state; that is, the possibility of fire occurrence.
A high fire risk level indicates a high probability of fire in this position. Compared to the low-risk level position, it is more necessary to check whether hidden dangers exist in a timely manner; therefore, fire risk rank high-priority inspection is very important. Moreover, path planning can be used to plan the optimal inspection path rapidly to ensure the inspection efficiency and save on the inspection time.
When the production process, raw material type, storage capacity, temperature, and combustible gas concentration of the inspection position change, the inspection robot based on the fire risk level can plan the optimal inspection path in time, and can give priority to the inspection of the objects with the highest risk, so that the inspection meets the requirements of high-risk first inspection, low-risk second inspection, short path, and high efficiency, thereby ensuring the safety of the park to the maximum extent.
Simulation experiment
This section details the experiments that were conducted in this study. Section 5.1 compares the performance of the DESDA with the IDESDA. Section 5.2 compares the performance of the IDESDA with the classical optimisation algorithm. Section 5.3 presents the application of the IDESDA for path optimisation of fire risk level patrol robot in a chemical industrial park. All test results were completed on the same computer with an Intel i7 core, 2.3 GHz, and 8 GB of RAM. MATLAB was used as the programming language. In Sections 5.1 and 5.2, all examples in the chapters were obtained by TSPLIB (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/). The calculation example in section 5.3 is the self-built calculation example, and all of the examples were run 30 times.
Performance comparison between DESDA and IDESDA
This section demonstrates that the performance of IDESDA is superior to that of the DESDA through experiments. In this experiment, an open calculation example was used to verify the performance of the IDESDA and the results are presented in Table 3, which displays the average result, best solution, standard deviation, and average run time of the best solution for 30 experiments. Parameters required for the experiments are listed in Table 4.
Performance comparison of DESDA and IDESDA based on TSP public numerical example
Performance comparison of DESDA and IDESDA based on TSP public numerical example
DESDA and IDESDA parameter settings
The performances of the DESDA and IDESDA were compared using public datasets, and the results are presented in Table 3. It can be observed that among the 11 open calculation examples, the average results of the optimal solutions calculated by the IDESDA for 30 experiments were significantly better than those calculated by the DESDA, and the standard deviation of the IDESDA experiment was less than that of DESDA; the only drawback of the IDESDA was that a longer computation time was required. Overall, the performance of the IDESDA was significantly better than that of the DESDA.
In this study, classical path optimisation algorithms were used for a performance comparison with the IDESDA. For the sake of objectivity and accuracy, the test data of the algorithms, except for IDESDA, were obtained from the paper of Yao [25], where PDA (%) (deviation percentage of the average)=(average-optimal value)/optimal value * 100. In the experiments, four different calculation examples were selected from TSPLIB for testing. The simulated annealing (SA), tabu search (TS), and ant colony optimisation (ACO) algorithms were run 30 times; to maintain consistency, the IDESDA was also run 30 times with a population of 200 and 500 iterations. The test results are presented in Table 5.
Performance comparison of SA, TS, ACO, and IDESDA based on TSP public numerical example
Performance comparison of SA, TS, ACO, and IDESDA based on TSP public numerical example
It can be observed from Table 5 that in four instances, the PDA (%) of the SA solution were all less than 3%, the PDA (%) of the TS solution were all less than 4.5%, the PDA (%) of the ACO solution were all less than 3%, and the PDA (%) of the IDESDA solution were all less than 1%, which indicates that the IDESDA has strong performance in solving the TSP and can guarantee shorter path. In terms of the average results and standard deviations of the optimal solutions in 30 experiments, the IDESDA was superior to the SA, TS, and ACO algorithms in all instances. Furthermore, with the exception of kroA100, the IDESDA was significantly better than the SA, TS, and ACO algorithms in obtaining the optimal solution. In conclusion, compared to SA, TS, and ACO, the proposed IDESDA exhibited higher accuracy, better stability and shorter path for solving the TSP.
To verify the performance of the IDESDA further, advanced algorithms were selected for a performance comparison: the discrete symbiotic organism search (DSOS), random bias genetic algorithm (RBGA), and improved bat algorithm (IBA). The results are presented in Table 6.
Performance comparison of DSOS, RBGA, IBA, and IDESDA based on TSP public numerical example
As can be observed from Table 6, the average results of the IDESDA running 30 times for the st70 and kroA100 examples were lower than those of the other three algorithms, and the standard deviation was small, indicating that the performance of the IDESDA was stable. Moreover, the optimal solution obtained by the optimisation was very close to the global optimal solution, indicating that IDESDA has strong path optimization ability. In summary, for st70 and kroA100, the performance of the IDESDA was superior to that of DSOS, RBGA, and IBA and it exhibited a better global search ability and improved stability. Therefore, in this paper, when the robot uses this algorithm to inspect the chemical industry park, the path to each inspection position is shorter, which enables the robot to quickly complete each inspection task, making the inspection more efficient.
A simulation experiment was carried out to verify the performance of the algorithm in practical applications. First, according to the actual situation of the enterprises in the chemical industrial park, all inspection positions were divided into three categories: warehouses, production workshops, and office areas. Subsequently, the coordinates of the inspection positions were set according to the actual situation of the park. Finally, the fire risk level of the inspection position was determined and the simulation map of the chemical industrial park was established, as illustrated in Fig. 3. The circles in the rectangular coordinate system represent the positions of the inspection points, whereas the dots with different colours represent the different fire risk levels. The colours corresponding to the risk levels from high to low are red, yellow, and blue-green. The sequence number of each point was a random arrangement.

Simulation map of chemical industrial park.
In this study, the patrol robot performed the inspection task according to the principle of high-risk priority inspection and ensuring the shortest path. To obtain the optimal path according to this principle, the inspection points of the same level first determined the optimal sub-path, and then selected the appropriate location to connect the three sub-paths to complete the path establishment. It should be noted that the barriers between enterprises and two points that could not be combined were not considered in the path optimisation.
It can be observed from Fig. 4 that the highest risk level points were 21, 13, and 27. Point 21 was set as the inspection starting point and the optimal sub-paths optimised by the IDESDA were (21, 13, 27), (8, 24, 1, 28, 6, 9, 5, 26, 29, 2, 20, 10, 4, 15, 18, 14, 17, 22, 11, 25, 19, 16), and (7, 23, 12, 3). Following the IDESDA calculation, 27 was connected with 8 and 16 was connected with 7 to obtain the optimal inspection path (21, 13, 27, 8, 24, 1, 28, 6, 9, 5, 26, 29, 2, 20, 10, 4, 15, 18, 14, 17, 22, 11, 25, 19, 16, 7, 23, 12, 3). The computation time for this path was 3 s.

Simulation of path optimisation result of safety patrol robot.
It can be observed that the IDESDA could calculate the optimal path rapidly and accurately. Therefore, it can be concluded that the IDESDA proposed in this study can be effectively applied to the global path planning of a safety patrol robot.
To ensure process safety in a chemical industrial park and to reduce the occurrence of process safety accidents, in this study, a patrol robot was used to carry out safety inspections in a chemical industrial park. To make the inspection more efficient and focused, the ESDA–NPSVM evaluation model was first used to evaluate the risk level of the chemical park. Subsequently, the DESDA was proposed based on the ESDA to solve the TSP, which adopted a heuristic crossover operator for new individual generation. To maintain the population diversity, reversal, insertion, and exchange operators were used for individual mutations to replace the individual component replacement in the original algorithm. As the first study to use the DESDA to address such problems, 11 public TSP calculation examples were used in the experiment to verify the performance. The experiments demonstrated that the DESDA exhibited the disadvantages of a long convergence time and easily falling into a local optimum. To improve the performance of the algorithm, the IDESDA was proposed, which uses a greedy algorithm for the initial population. When the algorithm falls into the local optimum and cannot jump out, the 2-opt algorithm is used to generate new solutions and to add them to the elite set to provide the optimal segment for jumping out of the local optimum. The experiments proved that the performance of the IDESDA was significantly better than that of the DESDA. To demonstrate the performance of the IDESDA further, it was compared with the SA, TS, ACO, DSOS, RBGA, and IBA. The results revealed that the proposed IDESDA had higher accuracy and better stability when solving the TSP.
Footnotes
Acknowledgements
This study is supported by Cross-Disciplinary Science Foundation from Beijing Institute of Petrochemical Technology (Project NO. BIPTCSF-011). and University Research and Training Project of Beijing Institute of Petrochemical Technology.
