Optimization of mine ventilation network feature graph

A ventilation network feature graph can directly and quantitatively represent the features of a ventilation network. To ensure the stability of airflow in a mine and improve ventilation system analysis, we propose a new algorithm to draw ventilation network feature graphs. The independent path method serves as the algorithm’s main frame, and an improved adaptive genetic algorithm is embedded so that the graph may be drawn better. A mathematical model based on the node adjacency matrix method for unidirectional circuit discrimination is constructed as the drawing algorithm may not be valid in such cases. By modifying the edge-seeking strategy, the improved depth-first search algorithm can be used to determine all of the paths in the ventilation network with unidirectional circuits, and the equivalent transformation method of network topology relations is used to draw the ventilation network feature graph. Through the analysis of the topological relation of a ventilation network, a simplified mathematical model is constructed, and network simplification technology makes the drawing concise and hierarchical. The rapid and intuitive drawing of the ventilation network feature graphs is significant for optimization of the ventilation system and day-to-day management.


Introduction
With the increase of mining depths and the expansion of mining's scale [1], mine ventilation systems are becoming larger and their topology more complex, which makes their simulation, optimization, and prediction more difficult [2,3]. To meet the needs of modern, scientific management of ventilation systems, optimization of the drawing methods of complex ventilation networks is necessary. The ventilation network feature graph (also known as a Q-H graph) is a new way to directly and quantitatively represent the state of a ventilation system, and is an effective tool to research complex ventilation networks [4].
Euler established graph theory in the 18th century with the study of the Königsberg sevenbridge problem. In the 19th century, Guthrie made the four-color conjecture, which became the driving force in the development of graph theory [5,6]. In the 20th century, the random graph theory of Erdos and Renyi was a great theoretical leap [7]. In recent years, the research results of two-dimensional graphs have been widely applied to draw mine ventilation network

Drawing model and optimization research of Q-H graph
When building a mathematical model of a Q-H graph drawing based on the independent path method, the depth-first search method is used to determine all of the independent paths. Then the coordinates of the lower-left and upper-right corners of the rectangular blocks corresponding to the branches of the independent paths are established. This is suitable for various network models.

Mathematical model of Q-H graph drawing based on independent path method
A ventilation network graph is denoted as G = (V,E), where V = {v 1 ,v 2 ,. . .,v m } is the set of m nodes, and m is usually written as m = |V|. E is the set of n branches.
To draw the rectangular block corresponding to the ventilation network branch e k = (v i ,v j ) on the graph, the coordinates of the points at the lower-left corner (x k ,y k ) and upper-right corner (x 0 k ; y 0 k ) must be determined. The Q-H graph drawing process based on the independent path method is as follows: (1) Determine the ordinate of the network nodes If the pressure energy H i of node v i is known, which is regarded as the corresponding ordinate of Q-H graph, and the ordinate of its adjacent node is: where h k is the resistance of branch e k , Ns 2 /m 8 . Take any node of the network (generally the node with the highest pressure energy) as the base point, and define its ordinate as 0. According to the above rules, the ordinates of all of the nodes can be determined.
(2) Use the depth-first algorithm [17] to search the path from source to intersection. The edge-seeking strategy is weighted by the value of the minimum air quantity of the branch. If the starting node of the edge seeking is v a , then the edge-seeking strategy is: where q ab is the air quantity corresponding to branch (v a ,v b ), m 3 /s; q k is the air quantity corresponding to branch e k , m 3 /s; and ε is the bound on the error of the air quantity. For planar networks, the left and right order of network branches can be used as the edgeseeking strategy. A Q-H graph drawn in this way is consistent in position with the network graph, but the stereo network must take formula (2) as the edge-seeking strategy.
The first path determined by the search is: The width of path P I is: where q 0 j is the air quantity corresponding to the j th branch e 0 j of path P I , m 3 /s. (4) "Color" the path branches [17]. The air quantity of each branch in the path subtracts the width of the path. This is regarded as the branch "coloring" of the path, that is: At this point in the first iteration, one path has been identified. We return to the search source and identify the next path, and continue for a total of (n-m+2) paths.
(5) Perform intersection operation on all of the paths. Intersection is performed between the current path P I and previous path P I-1 . Let: x k ¼ 0 ii) The branch belonging to E‴ has coordinates (7) Determine the coordinates of the upper-right corner of the rectangular block.
(i) The branch belonging to E@ has coordinates (ii) The branch belonging to the current path P I , whose air quantity is less than ε, has coordinates (8) Repeat the above steps until all branch coordinates are determined. The above process is a form of determining independent paths, and therefore we call this the independent path method.
This method is suitable for drawing Q-H graphs of both planar and stereo networks. A planar network is shown in Fig 2(A), with network parameters as shown in Table 1. There is no crossover between branches except nodes in the network graph, and the left and right sequences of network branches are arranged as branch weights in the edge-seeking strategy. In this way, the Q-H graph is consistent in position with the network graph, and the rectangular blocks corresponding to branches are not divided, as shown in Fig 2(B). The Q-H graph of a stereo network will have rectangular blocks corresponding to some branches divided into two or more blocks, regardless of the edge-seeking strategy. Research shows that the number of rectangular blocks after division is closely related to the sequence of independent paths, as determined by the search strategy in formula (2). Obtaining the optimal sequence of independent paths is a focus of this paper.

Optimization of Q-H graph segmentation based on improved adaptive genetic algorithm
To obtain an optimal independent path sequence to reduce the rectangular block cutting in a Q-H graph, we apply the improved adaptive genetic algorithm (IAGA) to optimize the independent path sequencing problem. Each topological relation change that determines the sequence of the independent paths is taken as a solution in the solution space, and IAGA is used to find the optimal or approximate optimal solution by a random search in the solution space, so as to reduce the workload of the path comparison sequence. The process of Q-H graph optimization based on IAGA is described next.

Ventilation network topology transformation coding.
Hybrid binary and integer encoding based on node topology transformation is adopted. When the nodes of a mine ventilation network are coded, we must consider node output degrees |E + (V i )| of 1, 2, and 3, as shown in Fig 3. With output degree 1, only one node is connected, with no change of topological relationship, so there is no coding.
An output degree of 2 can be represented by bit binary encoding, where 0 and 1 represent different topological sequences of the two branches connected to the node.
For output degree 3, branch topologies are represented by a series of integers. The number of topological sorting variations of the three branches is |E + (V i )|! = 3×2×1 = 6, corresponding to (1,2,3,4,5,6), respectively, so as to realize a one-to-one correspondence between the coding and solution spaces.
The above mixed encoding method can represent the different independent path sequences found in a Q-H graph due to the change of topological relations.

Design of fitness function in Q-H graph drawing.
The number of rectangular blocks in a Q-H graph can be expressed as: The problem of reducing the number of cut rectangles in the Q-H graph drawing is to minimize the objective function of the number of cut rectangles representing the branches. Thus: where x is the number of rectangular blocks in the Q-H graph.
For the minimization problem, the objective function should be converted to a fitness function when applying a genetic algorithm to calculate fitness, i.e. [18], where F(x) is the fitness after conversion; g(x) is the fitness under the minimum value problem; that is, the number of rectangular blocks in the Q-H graph; and C max is a sufficiently large number whose value is determined according to the parameters of the mine ventilation network.
A more accurate expression of the fitness function would be FðA t i Þ, which is the fitness value of each chromosome at generation t. The fitness value of each string in the population is calculated, and this can evaluate the optimization degree of any q-dimensional vector in the chromosome string space. In each generation of chromosomes, the number of rectangular blocks in the Q-H graph can be obtained through the Q-H graph, reflecting the performance of each generation of chromosomes and the Q-H graph. Through genetic operations, such as selection, crossover and mutation, the chromosomes are developed towards the regions with better performance, and the chromosomes that reduce the cutting of rectangular blocks in the Q-H graph are finally obtained, which is the optimal solution required to solve the problem.
2.2.3 Improved adaptive crossover probability P c and mutation probability P m . Based on research of the improved genetic algorithm [19][20][21][22], we propose an improved adaptive genetic algorithm (IAGA). The larger fitness value of the two intersecting individuals is adaptively adjusted between the minimum f min , average f avg , and maximum f max , and the crossover probability P c and mutation probability P m are adjusted between the minimum, average, and maximum fitness values of the population with the change of individual fitness value. Thus, according to Lagrange interpolation, we obtain the improved crossover probability, and improved mutation probability, where f max is the maximum fitness value in the population; f avg is the average fitness value of each generation of the population; f min is the minimum fitness value in the population; f 0 is the larger fitness value of the two intersecting individuals; and f is the fitness value of the individual to be mutated. Moreover, the crossover probability P c and mutation probability P m take the value of the interval (0,1), which can be adjusted during the optimization process and P c1 >P c2 >P c3 , P m1 >P m2 >P m3 . According to formulas (14) and (15), the variation of crossover probability P c and mutation probability P m is obtained as shown in Fig 4. The improved crossover probability and mutation probability not only can automatically change with the fitness value but ensure that the crossover probability of maximum fitness of individuals in the population is nonzero. The high precision of the adjustment improves the crossover and mutation probabilities of individuals so that they will not be in a stagnant state; hence, the algorithm will jump out of local optimal solutions.
Taking a ventilation network with m = 82 and n = 123 as an example, with other parameters remaining the same, a simple genetic algorithm (GA) and IAGA are used to optimize the Q-H graph drawing. The trends of the best fitness value and average fitness value in each generation are shown, respectively, in  gradually shows a better state with the change of crossover and mutation probabilities in the evolution process of each generation, and a better independent path sequence for Q-H graph drawing can be found more quickly.

Determination of genetic operators. (1) Design of operator selection
In this study, the selection adopts the random traversal sampling method based on the sorting fitness allocation [18] to allocate the selection probability. The method uses the fitness value of the population and sorts by the target value.
Fitness calculations are based only on the order Pos of the individuals in the population, and not the actual target value. Suppose L is the number of individuals in the population, SP is the selection pressure, and the fitness value of each individual is calculated according to its order Pos in the sorted population. The fitness value is calculated as [18]: where Fit is the fitness value. We sort by the value of Fit, and the minimum fitness individual is placed at the first position in the sorted list of values of the objective function. Individual selection probability is calculated according to the linear sorting formula proposed by Baker [18]: where i is the individual serial number, 1�η + �2, η − = 2−η + . According to the calculated selection probability, random traversal sampling is conducted to select individuals, where Fit is a column vector whose value is calculated by formula (16). We set npointer as the number to be selected, and select individuals at equal distances 1/ npointer. The position of the first pointer is determined by a uniform random number in the The selection process is as follows: first, the individuals are ranked based on fitness, then the selection probability is calculated, and finally the selection operation of random traversal is completed.
(2) Design of crossover operator In this paper, the crossover operator adopts the uniform crossover mode and takes every point as a potential rendezvous point. The crossover probability is adjusted adaptively according to IAGA, and the crossover operation is carried out on individuals in the population. Crossover is realized by masking words, randomly generating a (0-1) masking word W=w 1 w 2 . . .w q with the same length as the individual encoding length, and producing new individuals A' and B' from parent generation A and B by the following rules: If W i =0, then the gene values at the ith locus of A' and B' inherit the corresponding gene values of A and B, respectively. If W i =1, then the gene values at the ith locus of A' and B' inherit the corresponding gene values of B and A, respectively. In other words, the same genes from the father generation are preserved, whereas the offspring inherit some different gene values from the two fathers, which is conducive to improving the quality of the offspring.
For example, if Sample of masking word: Two offspring generated after crossover: It can be seen from the uniform crossover process that the new generation's chromosomes after crossing are still a series of integers that can represent the sequence of independent paths of a ventilation network based on node order.
(3) Design of mutation operator For the binary coding of the Q-H graph drawing algorithm, the mutation operation is to reverse the gene value on the chromosome according to the adaptive mutation probability, that is, 0 to 1 and 1 to 0. For integer coding, the gene value on the chromosome is determined as other value which is not itself according to the adaptive mutation probability.

Selection of relevant parameters.
The parameter selection of GA affects the result of Q-H graph drawing. As the mutation and crossover probabilities change adaptively and the selection probability is obtained by linear sorting, the main parameters affecting the algorithm's result are the initial population size and preset maximum of generations [23].
(1) Selection of maximum of generations Loop termination conditions are provided by presetting the maximum of generations, which depends on the size of the ventilation network. For small ventilation networks, there is no need to set too large a number of generations because there are few changes of chromosome strings. For large ventilation networks, there are many changes in the chromosome string, so it is necessary to set a larger number of generations to find a better solution as soon as possible.
(2) Determination of initial population size The initial population size generally affects the convergence and computational efficiency of a genetic algorithm. If the scale is too small, then it tends to converge to a local optimal solution. If the scale is too large, then the calculation speed will be reduced [24]. In the Q-H graph drawing optimization algorithm, the initial population depends not only on the number of nodes in the ventilation network, but also on the topological relation changes of nodes in the ventilation network, because the hybrid binary and integer encoding based on node topology transformation is adopted. There are n-m+2 independent paths in the ventilation network, and the number of topological relation changes of the n-m+2 independent paths is (n-m+2)!, the initial population size is less than (n-m+2)!For a specific mine ventilation network, the setting of initial population depends on the specific parameters of it.

Program design of Q-H graph drawing
As shown in Fig 6, steps of Q-H graph optimization drawing based on the hybrid algorithm (IAGA-IPM) combing the improved adaptive genetic algorithm and the independent path method are as follows: Step1: Determine the basic parameters of the IAGA (population size, maximum of evolutionary generation).

PLOS ONE
Step2: Select an appropriate encoding method. We adopt a hybrid of binary and integer encoding based on the node to map solution variables (topological relation variations) in the solution space to chromosome strings of IAGA. The objective function of the Q-H graph drawing algorithm optimization problem (reduction of Q-H graph rectangular block cutting) is defined, and the solution variable of the problem to be solved is determined, which represents the change of the topology relation of nodes in the independent path sequence.
Step3: Produce the initial population. Set tt=0 (tt represents the maximum of evolutionary generation), and select the initial population, and calculate the fitness based on sorting.
Step4: Individuals are selected by random sampling, and the crossover parent generations are selected based on selection operator.
Step5: The selected parent generation is performed crossover operation according to the improved adaptive crossover probability P c using a uniform crossover operator to obtain new individual.
Step6: The new individual generated by crossover is preformed mutation operation based on the improved adaptive mutation probability P m using the single point mutation operator to produce the new generation of individuals.
Step7: If the maximum of evolutionary generation meets the set requirement, then output the optimal solution, and decode the chromosome string with maximum fitness into the order of (n-m+2) independent path; otherwise, turn to Step4, keep looping.
Step8: Draw the Q-H graph of the mine according to the order of the independent path from Step7 based on the way of independent path.
At this point, the optimal mine Q-H graph can be drawn according to the above steps. According to IAGA-IPM, the main program and related subroutines of the Q-H graph drawing optimization algorithm are coded, and the visualization effect of Q-H graph drawing is realized. We will test several ventilation networks.
Take the stereo ventilation network with parameters m = 8 and n = 11 as an example, as shown in Fig 7. Based on the convergence situation of multiple runs and the quality of solution, the initial population can be set as 10, and the maximum of evolutionary generations as 50.
The Q-H graph drawn by IAGA-IPM is shown in Fig 8(A), and the Q-H graph drawn by the IPM is shown in Fig 8(B). The Q-H graph is also drawn according to the two algorithms. From the test results, it can be seen that to apply IAGA-IPM to optimize Q-H graph drawing can reduce the number of rectangular block cuts. With fewer branches and nodes in the ventilation network, the topological relationship is relatively simple, so the sequence of independent paths does not change much, nor does the number of cut rectangular blocks, which cannot give full play to the advantages of IAGA-IPM. However, when the number of branches and nodes is large, its topological relationship changes in a complex way, the sequence of independent paths changes greatly, and the number of cut rectangular blocks varies greatly, which can highlight the advantages of IAGA-IPM.

Q-H graph drawing of ventilation network containing unidirectional circuits
Unidirectional circuits often exist in mines that adopt multistage fan station ventilation. This is a circuit in which the airflow directions of the branches are uniform. The performance of unidirectional circuits in mine ventilation networks is circular wind. Once the unidirectional circuit is included in the ventilation network, all of the original path-based algorithms fail [25]. Therefore, we study the discrimination of unidirectional circuits, the improvement of the path algorithm of a ventilation network with unidirectional circuits, so as to solve the drawing of a Q-H graph with unidirectional circuits.

Mathematical model of identifying unidirectional circuits
To identify unidirectional circuits in a ventilation network, we propose a mathematical model of identifying unidirectional circuits based on a node adjacency matrix. For ventilation network graph G = (V,E), the square matrix A=(a ij ) m×m of order m = |V| is constructed, where: Matrix A is called the node adjacency matrix of graph G. a ij represents the number of branches starting with v i and ending with v j .
The k power of matrix A is denoted as A k ¼ ða ðkÞ ij Þ m�m , where: a ih �a hj 6 ¼0 if and only if a ih 6 ¼0 and a hj 6 ¼0, that is, nodes are all connected by branches from node v i to v h and from v h to v j , so the value of a ð2Þ ij represents the number of paths from v i to the intermediate node v h , and then to v j , or to put it another way, the value of a ð2Þ ij represents the number of paths from v i to v j in two steps. Similarly, the value of a ðkÞ ij represents the number of paths from v i through step k to v j , whereas a ðkÞ ij ¼ 0 represents the absence of such paths. Therefore, a theorem is proposed.

Theorem 1: If
X mÀ 1 k¼1 a ðkÞ ij 6 ¼ 0, then there is a path between nodes i and j. From the view of graph theory, unidirectional circuits are paths whose beginning and end points coincide. According to the definition of the unidirectional circuit, that is, a circuit with the same direction of airflow, once there is a unidirectional circuit, then there is a path that takes the beginning node v u and any end node v u , and a path with overlapping beginning and end nodes is a unidirectional circuit. Therefore, as long as there is a path starting and ending with v i (v i 2V), a unidirectional circuit is determined. Combining this with Theorem 1, if X mÀ 1 k¼1 a ðkÞ ij 6 ¼ 0, that is, any element on the diagonal in A k ¼ ða ðkÞ ij Þ m�m is not 0, then v i (v i 2V) must be a node in the unidirectional circuit.
To sum up, a mathematical model for identifying unidirectional circuits of ventilation networks based on a node adjacency matrix is proposed.
(1) Determine the node adjacency matrix A of the preset ventilation network.
(2) Calculate A 2 ,. . .,A m−1 . As the path limit length is m-1 (when all nodes are in a straight line), there is no need to calculate A m .
(3) If the diagonal element in A k (k = 1,2,. . .,m−1) has a nonzero value, a unidirectional circuit exists. Between nodes corresponding to nonzero elements on the diagonal constitute unidirectional circuits.
For the ventilation network shown in Fig 10, the process of identifying unidirectional circuits using the above mathematical model is as follows.

PLOS ONE
(3) It can be seen that the diagonal elements in the second, third, and fifth rows of A 3 are nonzero, that is, the unidirectional circuit is {e 2 ,e 5 ,e 3 }.
According to the above principles, a program for identifying unidirectional circuits is written.

Path algorithm optimization in ventilation network with unidirectional circuits
To search the path between v 1 and v 6 in Fig 10 using the depth-first method [17] could produce the outcome {e 1 ,e 2 ,e 5 ,e 3 ,e 2 ,e 4 ,e 7 }. Hence this method cannot solve the problem of finding the path of a network with unidirectional circuits, as their existence will lead to an infinite search. The search strategy must be modified to solve such a problem. Branch coloring (marking branches that have been searched) [17] remains unchanged: where E = {e 1 ,e 2 ,. . .,e n } is the set of branches that have not been colored; E 0 is the set of branches that have been shaded; and e k is the selected branch of the search, that is, the colored branch. However, the edge seeking strategy [17], is modified to: where V(E 0 ) is the node set corresponding to the colored branch set. The improved depth-first algorithm has three steps to determine the whole path in the ventilation network with unidirectional circuits: The program chart of the path calculation between any two nodes is shown in Fig 11. The steps are as follows: Step 1: Initialization. i = 1 is path number initialization.
Step 2: Seek edges. If successful, then turn to (3) for coloring. Otherwise, go to (8) to determine whether the stack is empty. If the stack is empty, then go to (9) to end the program.
Step 4: Determine the source node for seeking edges.
Step 5: Determines whether the current node is the target node. If it is not the target node, then go to (2) and continue to seek edges. Otherwise, go to (7) to storage stack where the paths constituted by the branches are stored, and then add up the total number of paths.
Step 6: Identify branches that should be restored to original color.
Step 7: Add the restored branch to E.
Step 8: Determine the new source node for seeking edges.
By modifying the edge seeking strategy, the depth-first algorithm can be used to find the path in the ventilation network with unidirectional circuits.

Q-H graph drawing method for ventilation network with unidirectional circuits
To draw a Q-H graph containing unidirectional circuits, they must be determined first. These are extracted from the ventilation network, and the network is transformed to a network without unidirectional circuits using the equivalent transformation method of the topology relation of the network, as shown below.
Suppose the ventilation network graph is G = (V,E), the source point of the network is V − (G), the associated branch of this point is E − (G), the rendezvous point of the network is V + (G), the associated branch of this point is E + (G), and the fan branch that causes the unidirectional circuit is , and set the ventilation parameter of e 0 f equal to e f . Then the transformed network has the following relation to the original network: It can be seen that the transformed network has the same number of branches and the same topological relation as the original network, except for the branches that cause the unidirectional circuit, whose end nodes are the source points of the new network, wheeas the end nodes of the newly constructed branches are the rendezvous points of the new network.
Taking Fig 12(A) as an example, a fan is installed on branch e 4 of the ventilation network. Under the action of the fan, the network forms two unidirectional circuits, c 1 = {e 4 ,e 5 ,e 3 ,e 2 } and c 2 = {e 4 ,e 7 ,e 9 ,e 8 }. The air volume and resistance of the branches are shown in Table 2. The air pressure of the fan is h f =100Ns 2 /m 8 , and the air quantity is Q f = 100m 3 /s. It can be seen from Table 2 that although the network is balanced, that is, it meets the laws of air quantity balance of nodes and resistance balance of circuits, the corresponding Q-H graph cannot be drawn. The reason is that, from the perspective of fan power, the nodes of highest and lowest network pressure energy are v 5 and v 3 , respectively. The line of the node corresponding to v 5 should be at the bottom of the Q-H graph, whereas the node line corresponding to v 3 should be at the top. However, from the perspective of branch e 4 , the air flows from v 3 to v 5 , and the line of the node corresponding to v 5 should be at the top of the Q-H graph, whereas the node line corresponding to v 3 should be at the bottom. So, the rectangular blocks corresponding to branch e 4 cannot be expressed.
In Fig 12(A), the fan branch that causes the unidirectional circuit before the transformation is e f = (v a ,v b ) = e 4 = (v 3 ,v 5 ), and the newly constructed fan branch is e 0 f = e 4 = (v 3 ,v c ). The transformed network is shown in Fig 12(B), and it includes the unidirectional circuit. According to the drawing principle and method of the Q-H graph, the transformed Q-H graph is shown in Fig 13, from which it is seen that it has nine horizontal lines corresponding to nine nodes of the transformed network. The node of highest pressure energy in the entire network is node v 5 , whose associated branches are e 5 and e 7 , and the end node of branch e 4 is the node of lowest pressure energy.
In conclusion, it can be seen that the ventilation network with unidirectional circuits can be transformed to one without unidirectional circuits through the equivalent transformation of the topological relation in the network, and then Q-H graph drawing can be completed for the ventilation network. This method is also suitable for drawing a Q-H graph of a stereo ventilation network with unidirectional circuits.

PLOS ONE
This paper not only solves the Q-H graph drawing problem of ventilation network with unidirectional circuits, but also improves the drawing speed compared with the drawing method in the [14]. In [14], the process of using depth-first search method to determine a path is as follows: after a path is found, the search is continued through backtracking until all branches are reached. The repeated path search process is "meaningless", which will greatly affect the efficiency of the algorithm for the network with a large number of paths. In this paper, the first path is searched through the depth-first search method, but the subsequent path is determined not by backtracking and forward search, but by directly returning to the network source point and searching again, which is a method to determine the independent path. This method can greatly reduce the search times and shorten the running time.
As [14] did not provide the corresponding algorithm source code, in the absence of unified test platform (system environment, development language), the computer running speed of the two drawing algorithms cannot be compared and analyzed in the paper, so no comparison results of specific drawing time are given. The paper only compares the two kinds of drawing speed theoretically. However, by optimizing the segmentation of rectangular blocks in the drawing process, the paper makes the drawing effect of Q-H graph more intuitive (the fewer rectangular blocks, the more intuitive). As shown in Figs 14 and 15, the Q-H graph e 8 and e 9 are divided in the method of [14], while only e 9 is divided in the method of this paper. It is more clear and intuitive to analyze problems.

Application of ventilation network simplification technology in Q-H graph drawing
The Q-H graph drawn according to the actual branches and nodes of the ventilation system is often too complex, with no prominent focus, which is inconvenient for analysis and research. Therefore, the ventilation network should be simplified according to the locations of key nodes and the requirements of computer operation [26]. Based on graph theory and set theory, a simplified mathematical model of a ventilation network is proposed by analyzing the topological relations of the network to realize the hierarchy of the Q-H graph.

Mathematical model and program design of network simplification
Let G 0 = (V 0 ,E 0 ) be the connected subgraph of network graph G = (V,E), where V,V 0 is a node set and E,E 0 is a branch set. Then: If the above inequality is true, then G 0 is a subnetwork (or subnet) of network G, where |E 0 | is the number of elements in matrix E.
The subnet must be a connected subgraph. The number of branches must be greater than or equal to 2, and the network removed subnet and the subnet must have only two rendezvous points, written as: According to the branch topological relations of the subnet, it is either a parallel, series, or diagonal connection. In the directed graph, fz; � zg denotes the source and rendezvous points, According to the circuit resistance balance law [17], the resistance balance formula of the r network is: Formulas (27), (28), and (29) have seven equations and nine unknown numbers, so fr 0 1 ; r 0 2 ; r 0 3 g has an infinite set of solutions. Hence the r and Y networks cannot undergo an unconditional equivalent transformation, and the equivalent wind resistance of the Y network is not only determined by the wind resistance of the r network, but is subject to its other parameters changes. This also is the fundamental reason why formula (24) can simplify subnets only if |V 0� V(E−E 0 )| = 2. Through the above analysis, only the relatively independent network structure of one in and one out can be simplified in the ventilation network.
The simplification process of the network is hierarchical. Branches X and Y are connected in parallel, but may be in series with branch Z. After a diagonal connection subnet is simplified to a branch, the branch forms a new parallel or series relationship with other branches. This goes on until it can be simplified no more. The program chart of automatic simplification is shown in Fig 17. In Fig 17, E 0 ¼ fdepðz; � zÞg in module (2) represents the branch set searched by depth-first traversal search from z to � z. A double line indicates that a subnet must be formed between nodes z = V[i] and � z ¼ V½j�, but the subnet may contain smaller subnets, so it must be treated as a network, and the network simplification program may be invoked again. If the subnet contains a smaller subnet, then the process continues until it is determined that it contains no smaller subnet, and then it can be simplified to a branch.
We use computer language to design a network simplification program. Take Fig 18(A) as an example to illustrate the hierarchy and process of network simplification. The simplification is divided into six levels, and the network is finally simplified to a branch. The process of simplification is as shown in Fig 18(B).

Realization of Q-H graph hierarchy through network simplification
When the scale of a ventilation network is relatively large, more rectangular blocks represent branches in the Q-H graph, which is not conducive to the intuitive reflection of the network state. Network simplification technology makes it possible to realize the hierarchy of the Q-H graph. Take Fig 18(A) as an example.
The Q-H graph for Fig 18(A) is shown in Fig 19(A). It is a planar network, and there are 20 rectangular blocks, which appear to be disordered. According to the simplification hierarchy of Fig 18(B), the network is simplified to a series branch s(v 1 ,v 8 ), whose corresponding Q-H graph is a rectangular block. The width of the block is the total flow of the network, whereas the height is the total resistance, and a quadratic curve from lower-left to upper-right is the total flow resistance. The series-simplified branch s(v 1 ,v 8 ) is composed of two basic branches and a parallel-simplified branch p(v 2 ,v 7 ), as shown in Fig 19(C), whereas p(v 2 ,v 7 ) in Fig 19(C) is composed of two series-simplified branches s(v 2 ,v 7 ), as shown in Fig 19(D). According to the simplification hierarchy of Fig 18(B), the above simplified branch s(v 2 ,v 7 ) left, s(v 2 ,v 7 ) right, d(v 9 ,v 13 ), p(v 10 ,v 12 ), d(v 2 ,v 5 ), p(v 5 ,v 6 ) corresponding branch composition and Q-H graph are shown in Fig 19(E)-19(J), respectively.
The network simplification technology makes the Q-H graph hierarchical, which intuitively reflects the overall features of the network and describes the local situation in detail. Similarly, the ventilation network is divided into smaller subnets, and each subnet drawing is optimized by the above algorithm. A total Q-H graph is obtained by combining all subnets.

Application
The application of Q-H graph is of great value in the daily management and reconstruction of mine ventilation system. Q-H graph can be used to adjust the air quantity as needed, determine the total resistance, analyze the three-area management of mine ventilation system, map the mine air environmental parameters, map the mine pollution range and determine the escape route, etc.

Regulation of air volume and determination of total resistance
When the resistance and air quantity of the paths in the ventilation network are known, the amount, location, the number of paths and means of adjustment can be determined by the use of the Q-H graph. The path method is adopted to adjust (n-m+1) small resistance paths with the maximum resistance path as the benchmark,which makes the resistance of each path equal, so as to ensure the minimum power consumption. In addition, for any ventilation network, the Q-H graph can be used to determine the total resistance directly from the upperright coordinate, without complicated calculation.

Management of three areas
The ventilation system can be divided into three areas: downcast air area, returning air area and using air area. The proportion of resistance of each area is an important indicator to measure the quality of the ventilation system. The proportion of resistance in three areas of natural air distribution can reflect whether the design of ventilation system is reasonable. The proportion of resistance in three areas of air distribution according to demand can reflect whether the production layout and technical management is reasonable. The Q-H graph shows the range of the three areas, as shown in Fig 20(A).

Display of mine gas concentration, temperature, humidity and other parameters
The Q-H graph can intuitively display the gas concentration, temperature and humidity of each path in the mine, which is convenient for the management of the entire mine ventilation system. Fig 20(B) is the schematic diagram of gas concentration. The gas concentration is represented by different colors in the Q-H graph, and the distribution of gas concentration in the whole mine can be clearly seen.

Display of mine pollution scope and escape route
The Q-H graph can show the contaminated and non-contaminated areas, as shown in the Fig  20(C). When there is a mine disaster, the Q-H graph can determine the route to escape. The workers who are blocked in the mine can avoid the disaster according to the safe route shown in the graph.
In addition to the above functions, the Q-H graph can also be applied in the following aspects: providing parameters for pressure equating fire prevention technology [12], determining boundary conditions of seepage field [12], ventilation system reconstruction [27], showing mine ventilation facilities [27], determining extreme value flow of ventilation system [28], etc.
In conclusion, the Q-H graph plays a very important role in the management of mine ventilation system.

Conclusion
In this paper, independent path method, improved adaptive genetic algorithm, the equivalent transformation of the topological relation and network simplification method are used to study the modeling, optimization, specialized processing(the ventilation network with unidirectional circuits) and level-division of Q-H graph, and the following main conclusions are drawn: An independent path method was used to construct the mathematical model for drawing Q-H graphs. The improved adaptive genetic algorithm was used to optimize the cutting of the rectangular block in the process of Q-H graph drawing, whose optimal effect was realized, which is a good reference for the theoretical research and programming of the Q-H graph.
Based on node adjacency matrix theory, a mathematical model to identify unidirectional circuits was constructed. By modifying the edge-seeking strategy, the depth-first algorithm is suitable for both ordinary ventilation networks and those with unidirectional circuits. By using the equivalent transformation method of the network topological relation, the Q-H graph drawing of a network with unidirectional circuits was solved, and the drawing design theory of a complex mine ventilation network was enriched and improved.
The equivalent simplified mathematical model of the network was established, and the simplified process and principle were studied. Using network simplification technology can effectively improve the analysis speed and shorten the drawing time of a complex mine ventilation network, and realize the hierarchy of the Q-H graph, so it can intuitively reflect the overall features of the network and describe a local situation in detail.
The Q-H graph has a powerful practical function and has changed the traditional ventilation management methods. It is a new reform, which opens a new way for the modernization of ventilation management technology.