A method for automatically drawing mine ventilation network diagram based on improved differential evolution algorithm
Through the improved differential evolution algorithm and the random K-layer intersection reduction algorithm, combined with the hierarchical method and the greedy algorithm, the problem of slow and low efficiency in drawing mine ventilation network diagrams in the existing technology is solved, and a fast and stable large-scale Ventilation network diagram is drawn to avoid local optimal solutions.
Patent Information
- Application Number
- CN202210061676.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for drawing mine ventilation network diagrams are slow, inefficient, and costly in complex systems, and are prone to falling into local optimal solutions, making them unable to meet the drawing needs of large-scale ventilation networks.
An improved differential evolution algorithm is used combined with the hierarchical method and the random K-layer crossover reduction algorithm to optimize node sorting through genetic coding and greedy algorithms, and dynamically adjust the optimization strategy to avoid local optimality and improve search randomness.
It achieves fast and stable drawing of large-scale mine ventilation network diagrams, reduces the number of cross lines, improves robustness and efficiency, and is suitable for complex mine tunnel layouts.
Smart Images

Figure CN114417539B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mine ventilation systems, and in particular relates to a method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm. Background Art
[0002] The mine ventilation system is an important part of the mine safety production system. It can ensure the continuous flow of fresh air in the mine working environment and continuously remove the underground polluted air. It is a decisive factor in ensuring the normal operation of the mine. The mine ventilation system itself is a very complex three-dimensional structure with many crisscrossing tunnels. It is generally not convenient to directly use the actual ventilation system diagram to analyze ventilation problems. Instead, the ventilation system diagram is abstracted into a mine ventilation network diagram composed of points and lines for analysis.
[0003] In the mine ventilation network diagram, the tunnels are represented as lines, and the intersections of the tunnels are represented as nodes. The direction and separation and combination of the airflow in the ventilation system can be clearly reflected by the relationship between the points and lines. Nowadays, the mine ventilation network diagram has long been one of the important drawings for ventilation management, and is also the basis for ventilation network solution or optimization and adjustment calculation, which is very important for the safety management of mines.
[0004] Since the points and lines in the graph structure can be placed at will, the same mine ventilation system may correspond to mine ventilation network diagrams with different layouts. As the number of wind points in the ventilation system increases, the relationship between the tunnels becomes more complex, and the variability of the layout plan will reduce the stability of the layout. Only a clear and stable layout plan can be more conducive to drawing a more complex ventilation network diagram.
[0005] However, most of the current mine ventilation network diagrams are still drawn manually. For complex ventilation systems, manual drawing is not only slow, inefficient, labor-intensive, and prone to errors, but also difficult to adjust. In addition, human subjective factors cannot well guarantee the beauty and readability of the drawing results.
[0006] In 1997, Li Husheng published the article "Automatically Generating Network Diagrams from Mine Ventilation System Diagrams", which was the earliest article to study the automated drawing of ventilation network diagrams. In 1998, Li Husheng first proposed the idea of drawing ventilation network diagrams using the path method in "Automatically Generating Curved Network Diagrams from Ventilation Network Structure Data", and gave the general steps for drawing ventilation network diagrams: setting the map size, node layout, determining branch shapes, and manual modification. The article mainly uses AutoCAD or self-developed ventilation system software to draw a single-line ventilation system diagram, and then draws a ventilation network diagram based on the ventilation system diagram, and simplifies the parallel branches and series branches according to user requirements.
[0007] The shape of the network diagram generated by the algorithm proposed in this paper is basically the same as the original system diagram, which is quite different from the curved network diagram (duck egg network diagram) required by people, and the drawn diagram cannot meet the needs of ventilation network analysis and solution.
[0008] In 2006, Wu Bing, Lu Bentao, and Shui Linna proposed the longest path method in "Automatically Generating Ventilation Network Diagrams Using the Longest Path Method", which is currently the most mature algorithm for drawing ventilation network diagrams in China. It is essentially an algorithm for drawing ventilation network diagrams based on the path method. The main idea is to find the longest path in each fan system, and to arrange the long paths on both sides and the short paths in the middle as the principle, to form a curved network diagram.
[0009] In actual application, the longest path calculation method is better for small-scale, simple-topology networks, but it is not as effective for large-scale, complex-topology networks. After the drawing is completed, a lot of manual adjustments are required.
[0010] In 2012, Deng Lijun and Liu Jian published "Algorithm for Drawing Ventilation Network Diagram Based on Hierarchical Method", which first proposed to combine hierarchical method, longest path method and genetic algorithm, and improved it in "Research on Algorithm for Drawing Ventilation Network Diagram Based on Hierarchical Method" two years later. This paper mainly combines hierarchical method, longest path method and genetic algorithm, and uses hierarchical method as the main framework of the algorithm, and uses the longest path method to hierarchically process the network diagram. The algorithm optimizes the "node sorting" and reduces the number of branch crossings. Finally, the longest path method is used to calculate the node coordinates and draw the branches to ensure that the drawn network diagram is an A "duck egg" curve ventilation network diagram.
[0011] The hierarchical graph layout method based on genetic algorithm has an ideal drawing effect in small-scale ventilation networks, but the drawing effect is poor for large-scale ventilation networks, the layout result is not stable enough, the calculation time is long, and it is easy to fall into the local optimal situation, and a good approximate solution cannot be obtained. Summary of the invention
[0012] In order to solve the above technical problems, the technical problem solved by the present invention is to provide a method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm, which can not only quickly draw the ventilation network diagram, but also ensure that the ventilation network diagram has minimum symmetry and intersection, thereby improving the problems of the existing layout method with slow solution process, long time consumption and high cost.
[0013] The present invention is implemented by the following technical scheme: The method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm of the present invention comprises the following steps:
[0014] S1. Use the hierarchical method to preliminarily place the nodes in the ventilation network diagram according to the hierarchy and construct the genetic coding;
[0015] S2, using random K-layer crossover reduction algorithm to initialize the population;
[0016] S3. Use the improved differential evolution algorithm to iteratively optimize and approach the optimal layout solution.
[0017] Furthermore, in step S1, the node sorting method is corresponded to the layout plan of the ventilation network diagram, each node sorting method is regarded as an individual in the differential evolution algorithm, and a decimal genetic code is constructed to represent the individual information, which is used as the genetic code of the differential evolution algorithm. The position of the node is defined by the level of the node and the serial number of the node in the level.
[0018] Furthermore, in step S2, a greedy algorithm is used to quickly generate a large number of good individual genes, which greatly accelerates the convergence speed. By fixing the position of the node on one side of the bipartite graph, the weight of the node on the other side is calculated, and then the arrangement order of the node on that side is changed according to the weight value to reduce the number of cross lines.
[0019] Furthermore, in step S3, starting from a randomly generated initial population, a new individual is generated by summing the vector difference between any two individuals in the population and the third individual, and then the new individual is compared with the old individual. If the fitness of the new individual is better than that of the old individual, the new individual is used to replace the old individual in the next generation, otherwise the old individual is still preserved. Through continuous evolution, excellent individuals are retained and inferior individuals are eliminated, guiding the search to approach the optimal solution.
[0020] From the above, the method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm of the present invention combines a hierarchical method to layout and optimize the mine ventilation network diagram, solves the problem that the existing layout method is not suitable for drawing large-scale ventilation network diagrams, improves the problem that the solution process of the existing layout method is slow, time-consuming and costly; improves the problem that the existing hierarchical method is prone to fall into local optimality, and has the following effects:
[0021] 1. For the first time, the differential evolution algorithm is used in the task of automatically drawing mine ventilation network diagrams. Compared with previous methods, it is more robust, requires fewer parameters, and is more suitable for large-scale ventilation network diagram drawing.
[0022] 2. A random K-layer cross-reduction algorithm is proposed to accelerate the convergence speed of the algorithm.
[0023] 3. It is proposed to dynamically adjust the optimization strategy by setting the population diversity coefficient, increase the randomness of local search, and avoid falling into the local optimum.
[0024] 4. An improved differential mutation algorithm is proposed to optimize and reduce the number of intersections in the layered graph layout. Combining the search speed of the random K-layer crossover algorithm and the search depth of the differential mutation algorithm, it can efficiently draw the corresponding mine ventilation network diagram even when the mine tunnels are complex.
[0025] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following is a detailed description in combination with the preferred embodiments and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings of the embodiment are briefly introduced below.
[0027] Figure 1 It is a flow chart of the method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm of the present invention;
[0028] Figure 2 Figure 2 is the structural diagram of the 2-layer cross-reduce algorithm, (a) is before node reduction; (b) is after node reduction. DETAILED DESCRIPTION
[0029] The following is a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings, which is a part of this specification and illustrates the principles of the present invention through examples. Other aspects, features and advantages of the present invention will become clear from the detailed description. In the referenced drawings, the same or similar components in different figures are represented by the same reference numerals.
[0030] like Figure 1 As shown, the present invention proposes a method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm, and the steps are as follows:
[0031] First, the nodes in the ventilation network diagram are initially placed according to the hierarchy using the hierarchical method, and the genetic coding is constructed;
[0032] Second, use the random K-layer crossover reduction algorithm to initialize the population;
[0033] 3. Use the improved differential evolution algorithm for iterative optimization to approach the optimal layout solution.
[0034] Among the above methods, the hierarchical method is an existing mature method, which is often used in the task of drawing directed acyclic graphs. A random K-layer crossover reduction algorithm and an improved differential evolution algorithm are proposed mainly based on the hierarchical method. The greedy algorithm suitable for local search and the metaheuristic algorithm suitable for global search are combined, thereby improving the optimization speed and accuracy of the algorithm. The specific contents of the above two algorithms are as follows.
[0035] After the nodes in the ventilation network diagram are divided into levels by the layering method, since the relationship between the nodes in the diagram will not change, the order of the nodes in each level will determine the effect of the final diagram layout scheme. Effective node sorting will reduce the number of cross lines in the layout scheme, making the ventilation network diagram clear, beautiful and readable, otherwise it will become messy and ineffective.
[0036] The node sorting method corresponds to the layout scheme of the ventilation network graph, and each node sorting method is regarded as an individual in the differential evolution algorithm. A decimal genetic code is constructed to represent individual information, which is used as the genetic code of the differential evolution algorithm. The position of the node is defined by the level of the node and the sequence number of the node in the level. The individual genetic code consists of the node array Nodes, the layer array Layer, and the node sorting array Index. Among them, Nodes is all the nodes in the graph, Layer is the level of the node in Nodes, Index is the arrangement number of the node in Nodes in its level, and k is the number of nodes:
[0037] Nodes = [n 1 ,n 2 ,n 3 ,…,n i ,n j ,…,n k ]
[0038] Layer=[l 1 ,l 2 ,l 3 ,…,l i ,l j ,…,l k ]
[0039] Index=[i 1 ,i 2 ,i 3 ,…,i i ,i j ,…,i k ]
[0040] Before executing the evolutionary algorithm, a certain number of individuals need to be initialized. The node ordering method of these individuals is random. With the continuous iteration of the evolutionary algorithm, excellent individual genes will be retained and poor individuals will be eliminated. When the individuals in the initial population are good, the optimization speed of the algorithm will be greatly improved, and the search space of the optimal solution can be approached more quickly. Therefore, a random K-layer crossover reduction algorithm is proposed for population initialization. Using the greedy algorithm, a large number of good individual genes are quickly generated, which greatly speeds up the convergence speed. The principle is as follows.
[0041] The 2-layer crossover reduction algorithm is a node sorting optimization algorithm based on the bipartite graph model. It calculates the weight of the node on the other side by fixing the position of the node on one side of the bipartite graph, and then changes the order of the node on that side according to the weight value, thereby reducing the number of crossover lines. The center of gravity heuristic algorithm is commonly used in the 2-layer crossover reduction algorithm. Figure 2 As shown, assuming fixed Figure 2 In (a), the order of A, B, and C is assigned weights of 0, 1, and 2 from left to right. The weight values of W, X, Y, and Z are calculated using the center of gravity heuristic, and the weight values are 0, 1.5, 1, and 0, respectively. Finally, W, X, Y, and Z are rearranged according to the weight values to obtain Figure 2 (b), so that the number of intersections is reduced to 1.
[0042] Based on the 2-layer crossover reduction algorithm, the nodes of each layer obtained by the layered method are optimized layer by layer from top to bottom and then from bottom to top, and the iteration is repeated continuously until the number of intersections in the graph no longer decreases. This is the K-layer crossover reduction algorithm.
[0043] However, the K-layer crossover reduction algorithm itself is prone to fall into local optimality, and will make the originally randomly ordered individuals approach the same optimization result after optimization, which will greatly reduce the diversity of the population. Therefore, in the process of optimizing the K-layer crossover reduction algorithm for the initialized random individuals, the optimization process is terminated by setting a random number R, R∈[0,1]. When R is not less than 0.5, the optimization continues, otherwise, the optimization is exited. This allows the algorithm to obtain a better initial population while ensuring the diversity of individual genes in the population.
[0044] The differential evolution algorithm, like the genetic algorithm, is also an optimization algorithm based on modern intelligence theory. It guides the direction of optimization search through the group intelligence generated by the mutual cooperation and competition between individuals in the group. The basic idea of the algorithm is: starting from a randomly generated initial population, a new individual is generated by summing the vector difference between any two individuals in the population with the third individual, and then the new individual is compared with the old individual. If the fitness of the new individual is better than that of the old individual, the new individual will replace the old individual in the next generation, otherwise the old individual will be retained. Through continuous evolution, good individuals are retained, and inferior individuals are eliminated, guiding the search to approach the optimal solution.
[0045] The present invention mainly makes the following three improvements to the differential evolution algorithm: first, when the population is initialized, a good initial population is quickly obtained through a random K-layer crossover reduction algorithm; second, in the population crossover stage, the population diversity coefficient θ is set to dynamically adjust the probability of individual gene mutation; third, in the iteration interval, the number of individuals in the next generation is dynamically adjusted based on the population diversity coefficient. Among them, the first is to speed up the evolutionary algorithm, and the second and third are to increase the randomness of the later search, improve the diversity of the population individuals, and avoid the evolutionary algorithm from falling into premature maturity. The core technology of the algorithm is described in detail below.
[0046] The inverse of the number of individual crossovers is used as the fitness function for optimal evaluation. In the layered graph layout, the l-1 layer and the l layer form a bipartite graph model, and there must be nodes connected on both sides of the bipartite graph model. From left to right, let the l-1 layer nodes be numbered in sequence to obtain S l-1 , k is the number of nodes in this layer:
[0047] S l-1 =[1,2,3,…,k]
[0048] make represents the i-th node in the l-th layer, Representation and The nodes are connected and located at the l-1 layer in S l-1 When there are multiple nodes in the l-1 layer and When connected, is a set of numbers. Therefore, the order of the nodes in layer l is S l It can be expressed as:
[0049]
[0050] Calculate S l The number of reverse pairs in C l , which is the number of intersections in the bipartite graph. The fitness function of an individual is:
[0051]
[0052] When the differential mutation algorithm reaches the gth iteration, an individual I is randomly selected from the population Ω 1 ,I 2 ,I 3 ,I 4 Among them, I 1 ,I 2 ,I 3 Used to generate variant individuals V, and then I 4 Cross with V to generate two new individuals U 1 and U 2 .
[0053] make Represents the order of the nodes in the first layer of the i individual, and the I 2 and I 3 The node sorting in performs a differential operation, and the new sorting result is used as the node sorting of the corresponding layer in V. The mutation operation is as follows:
[0054]
[0055] Define a random vector Rand containing only 0-1, the vector length is the total number of levels L, and contains at least one 0 and one 1. Traverse Rand and perform crossover operations. Represents V and I 4 The cross-interchange operation of node sorting is performed at the kth layer as follows:
[0056]
[0057] If U 1 , U 2 and V is superior to I 4 Individuals with high quality will be retained in the next generation population Ω'. If none of the three is better than I 4 , then only I is retained 4 The above process is repeated until the next generation population Ω' reaches the set size.
[0058] As the population is continuously iterated and optimized, the individual diversity in the new population generated by mutation and crossover operations will decrease, and the population will gradually fall into a closed, locally optimal solution space. At this time, the results obtained by differential mutation of the individuals in the population will still be within the population set.
[0059] The main reason for this situation is that in the process of continuously selecting the best to construct a new population, the algorithm's search direction is relatively single, tending to a better individual community in a certain place in the solution space, while ignoring the direction of the true global optimal solution. In order to prevent this dilemma, a random system is designed to improve the randomness and search range of the search by improving the search strategy.
[0060] Let θ be equal to the set of fitness values of all individuals in the population. When θ is very small, the fitness function values of most individuals in the population are the same, which means that the differences between individuals in the population are getting smaller and smaller. Conversely, it means that the differences between individuals in the population are getting larger.
[0061] Therefore, θ can be a good measure of the diversity of individuals in the population. In the mutation and crossover operations, based on the individual diversity coefficient θ, the randomness of the search direction is improved in the later iteration, thereby improving the population diversity and expanding the search range in the solution space:
[0062] After each round of iteration, the current θ value is calculated and the number of individuals in the next generation population is dynamically adjusted. When θ becomes smaller, the number of individuals in the next generation population is increased, and vice versa.
[0063] Based on the inverse of the current θ value, the mutation strategy is controlled. When θ becomes smaller, the inverse of θ becomes larger. After the mutation is completed, the probability of gene mutation increases, and vice versa. While the first step expands the number of individuals in the population, the second step can assist in enhancing the diversity of the population's genes.
[0064] The above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and changes can be made without departing from the principle of the present invention, and these improvements and changes are also regarded as the protection scope of the present invention.
Claims
1. A method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm, characterized in that: The following steps are involved: S1. Use the hierarchical method to preliminarily place the nodes in the ventilation network diagram according to the hierarchy and construct the genetic coding; S2, using random K-layer crossover reduction algorithm to initialize the population; S3, using the improved differential evolution algorithm to iteratively optimize and approach the optimal layout solution; In the step S1, the node sorting method is made to correspond to the layout scheme of the ventilation network diagram, each node sorting method is regarded as an individual in the differential evolution algorithm, and a decimal genetic code is constructed to represent the individual information, which is used as the genetic code of the differential evolution algorithm, and the position of the node is defined by the level of the node and the serial number of the node in the level; In step S2, a greedy algorithm is used to quickly generate a large number of good individual genes to accelerate the convergence speed. The weight of the node on one side of the bipartite graph is calculated by fixing the position of the node on the other side, and then the arrangement order of the node on the side is changed according to the weight value to reduce the number of cross lines. The inverse of the number of individual cross lines is used as the fitness function for optimal evaluation. In the layered graph layout, the l-1 layer and the l layer form a bipartite graph model, and there must be nodes connected on both sides of the bipartite graph model. From left to right, let the l-1 layer nodes be numbered in sequence to obtain S l-1 , k is the number of nodes in this layer: S l-1 =[1,2,3,…,k] make represents the i-th node in the l-th layer, Representation and The nodes are connected and located at the l-1 layer in S l-1 The corresponding number in the l-1 layer; when there are multiple nodes and When connected, is a set of numbers; therefore, the order of the nodes in layer l is S l It can be expressed as: Calculate S l The number of reverse pairs in C l , which is the number of intersections in the bipartite graph, and the fitness function of the individual is: When the differential mutation algorithm reaches the gth iteration, individuals I1, I2, I3, and I4 are randomly selected from the population Ω; among them, I1, I2, and I3 are used to generate a mutant individual V, and then I4 is crossed with V to generate two new individuals U1 and U2; make Represents the order of the nodes in the lth layer of individual i. Perform differential operations on the node orderings in I2 and I3 layer by layer, and use the new ordering results as the node orderings of the corresponding layer in V. The mutation operation is as follows: Define a random vector Rand containing only 0-1, the vector length is the total number of levels L, and contains at least one 0 and one 1; traverse Rand to perform a crossover operation, It means that V and I4 perform cross-interchange operation on node sorting at the kth layer, as follows: If there are individuals among U1, U2 and V that are better than I4, they will be retained in the next generation population Ω'; If none of the three is better than I4, only I4 itself is retained, and the above process is repeated until the next generation population size Ω' reaches the set size.
2. The method for automatically drawing a mine ventilation network diagram based on an improved differential evolution algorithm according to claim 1, characterized in that: In step S3, starting from a randomly generated initial population, a new individual is generated by summing the vector difference between any two individuals in the population and the third individual, and then the new individual is compared with the old individual. If the fitness of the new individual is better than that of the old individual, the new individual will replace the old individual in the next generation, otherwise the old individual will be preserved. Through continuous evolution, excellent individuals are retained and inferior individuals are eliminated, guiding the search to approach the optimal solution.
