A method and terminal for determining a reservoir inspection route
Through the combination of grid method and optimization ant colony algorithm, the problem of unreasonable route planning during traditional reservoir patrols is solved, and intelligent determination and efficient inspection of reservoir patrols are realized.
Patent Information
- Application Number
- CN202111639713.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-12-29
AI Technical Summary
The traditional reservoir patrol methods lack scientific basis and the unreasonable planning of the patrol routes leads to inefficient patrol efficiency and low reliability of results.
The raster method is used to model the environment, generate an environment matrix, and determine the environment factors based on this matrix, and determine the optimal patrol route in combination with the optimized ant colony algorithm.
The intelligent determination of reservoir patrol routes has been achieved, the accuracy and efficiency of patrol routes have been improved, and the optimal route determination with multiple goals has been ensured.
Smart Images

Figure CN114298416B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route determination, and in particular to a method and a terminal for determining a reservoir inspection route. Background Art
[0002] The traditional reservoir inspection method is usually that inspectors conduct item-by-item inspections according to the reservoir inspection guide and inspection tasks. The inspection route is determined by the inspectors based on their own experience and lacks focus. In addition, the enforceability of the reservoir inspection content plan is poor, and it only constrains the inspection content. There is no clear guidance and enforceability for the inspection route and the importance of the inspection items during the inspection process, and there is a lack of scientific reference basis. It has the following limitations:
[0003] 1. The inspection process is just a one-click report, and it is impossible to formulate inspection plans according to the distribution of small reservoirs and inspection items;
[0004] 2. The route is selected based on manual experience, which lacks scientific basis and the reliability of inspection results is low;
[0005] 3. Since the inspection time spent by inspectors is closely related to factors such as the inspection item, the importance of the inspection item, and the inspection route, unreasonable route planning can easily lead to problems such as low efficiency of inspectors. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a method and a terminal for determining a reservoir inspection route, so as to realize efficient reservoir inspection.
[0007] In order to solve the above technical problems, a technical solution adopted by the present invention is:
[0008] A method for determining a reservoir inspection route, comprising:
[0009] Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set;
[0010] Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids;
[0011] Environmental factors are determined based on the environmental matrix, and an optimal inspection route is determined using an optimized ant colony algorithm based on the environmental matrix and the environmental factors.
[0012] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0013] A terminal for determining a reservoir inspection route comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0014] Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set;
[0015] Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids;
[0016] Environmental factors are determined based on the environmental matrix, and an optimal inspection route is determined using an optimized ant colony algorithm based on the environmental matrix and the environmental factors.
[0017] The beneficial effects of the present invention are as follows: unlike the prior art, the inspection route is no longer determined based on manual inspection experience, but multiple inspection items of the reservoir to be inspected are obtained to obtain an inspection item set, and the grid method is used to perform environmental modeling on the inspection item set to obtain an environmental matrix. The optimal inspection route is determined using an optimized ant colony algorithm based on the environmental matrix and the determined environmental factors, thereby realizing intelligent determination of the reservoir inspection route. The environmental matrix can simulate the real environment of the reservoir, including feasible areas and dangerous areas, etc. The environmental factors can reflect the environmental conditions around the inspection items. The environmental factors are introduced into the optimized ant colony algorithm to determine the optimal inspection route, which can realize multi-objective optimal route determination, and combines the actual environmental factors of the reservoir to improve the accuracy of the optimal inspection route, thereby realizing efficient reservoir inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of the steps of a method for determining a reservoir inspection route according to an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of the structure of a terminal for determining a reservoir inspection route according to an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of an environment matrix in a method for determining a reservoir inspection route according to an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of weights of various grids corresponding to the environment matrix in the method for determining a reservoir inspection route according to an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of determining the next inspection item in the method for determining a reservoir inspection route according to an embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of multiple inspection items in the method for determining a reservoir inspection route according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.
[0025] Please refer to Figure 1 , an embodiment of the present invention provides a method for determining a reservoir inspection route, comprising:
[0026] Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set;
[0027] Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids;
[0028] Environmental factors are determined based on the environmental matrix, and an optimal inspection route is determined using an optimized ant colony algorithm based on the environmental matrix and the environmental factors.
[0029] From the above description, it can be seen that the beneficial effects of the present invention are: unlike the prior art, the inspection route is no longer determined based on manual inspection experience, but multiple inspection items of the reservoir to be inspected are obtained to obtain an inspection item set, and the grid method is used to perform environmental modeling on the inspection item set to obtain an environmental matrix. Based on the environmental matrix and the determined environmental factors, the optimized ant colony algorithm is used to determine the optimal inspection route, thereby realizing the intelligent determination of the reservoir inspection route. The environmental matrix can simulate the real environment of the reservoir, including feasible areas and dangerous areas, etc. The environmental factors can reflect the environmental conditions around the inspection items. The environmental factors are introduced into the optimized ant colony algorithm to determine the optimal inspection route, which can realize the optimal route determination of multiple objectives, and combined with the actual environmental factors of the reservoir, the accuracy of the optimal inspection route is improved, thereby realizing efficient reservoir inspection.
[0030] Further, determining the environmental factors based on the environmental matrix includes:
[0031] Determine the inspection grid corresponding to each inspection item in the inspection item set according to the environment matrix:
[0032] Determining the number of dangerous grids around the patrol grid;
[0033] The environmental factor of each inspection item is determined according to the number of dangerous grids.
[0034] From the above description, it can be seen that the inspection grid corresponding to each inspection item in the inspection item set is obtained according to the environmental matrix, the number of dangerous grids around the inspection grid is determined, and the environmental factor of each inspection item is determined according to the number of dangerous grids. The dangerous grid is the dangerous and difficult-to-walk area around the inspection item. During the inspection, it is necessary to avoid this area as much as possible. Combining the environmental factors with the determination of the reservoir inspection route can improve the accuracy of the optimal inspection route.
[0035] Furthermore, the determining the optimal inspection route using an optimized ant colony algorithm based on the environmental matrix and the environmental factors includes:
[0036] Determine the next inspection item by using a roulette algorithm based on the environment matrix and the environment factors according to a transfer probability formula until each inspection item in the inspection item set has been traversed to obtain the current inspection route;
[0037] Update pheromone concentration according to pheromone concentration update formula;
[0038] Using an evaluation function to determine whether the current inspection route is shorter than the current optimal inspection route, if so, updating the current inspection route to the current optimal inspection route;
[0039] Get the number of inspections;
[0040] Determine whether the number of inspections is greater than or equal to a preset number of times. If so, determine the current optimal inspection route as the optimal inspection route. If not, return to execute the step of determining the next inspection item by using a roulette algorithm based on the environmental matrix and the environmental factors according to the transfer probability formula.
[0041] Furthermore, the transition probability formula P ij *k for:
[0042]
[0043] In the formula, i represents the i-th inspection item, j represents the j-th inspection item, τ ij (t) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t, α represents the pheromone concentration of this inspection process, β represents the relative importance of the inspection items, represents the heuristic function from the i-th inspection item to the j-th inspection item at time t, D(x, y) represents the weight sum of all grids passed by the i-th inspection item, allow k represents the set of inspection items to be determined for the kth inspection;
[0044] The heuristic function for:
[0045]
[0046] In the formula, E j represents the environmental factor, d ij Indicates the distance between the i-th inspection item and the j-th inspection item;
[0047] The pheromone concentration update formula is:
[0048] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij , 0<ρ<1;
[0049]
[0050]
[0051] In the formula, τ ij (t+1) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t+1, ρ represents the volatility coefficient, Δτ ij Indicates the pheromone concentration released from the i-th inspection item to the j-th inspection item in this inspection, Δτ ij k represents the pheromone concentration released from the i-th inspection item to the j-th inspection item during the k-th inspection, Q represents a constant, and L k represents the length of the path taken by the kth inspection, and n represents the total number of the multiple inspection items.
[0052] From the above description, it can be seen that by introducing the environmental matrix to optimize the transfer probability formula, introducing the environmental factor to optimize the heuristic function, and using the heuristic function to mark the points prone to deadlock, deadlock can be avoided in the process of finding the path, and the effective search times are increased. As the number of inspections increases, the pheromones on the invalid path gradually evaporate, and some pheromones have been accumulated on the effective path. At this time, pheromones occupy a dominant position in the path search, which can effectively avoid deadlock and improve the convergence speed, thereby realizing efficient reservoir inspection.
[0053] Furthermore, the environmental factor E j for:
[0054]
[0055] From the above description, it can be seen that if the number of dangerous grids around the inspection item is less than 3, the environmental factor can be taken as 1. If the number of dangerous grids is greater than or equal to 3, the environmental factor value is greater than 1. In this way, the actual reservoir environment is combined in the process of determining the reservoir inspection route to facilitate the optimal reservoir inspection route.
[0056] Please refer to Figure 2 , a terminal for determining a reservoir inspection route, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0057] Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set;
[0058] Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids;
[0059] Environmental factors are determined based on the environmental matrix, and an optimal inspection route is determined using an optimized ant colony algorithm based on the environmental matrix and the environmental factors.
[0060] From the above description, it can be seen that the beneficial effects of the present invention are: unlike the prior art, the inspection route is no longer determined based on manual inspection experience, but multiple inspection items of the reservoir to be inspected are obtained to obtain an inspection item set, and the grid method is used to perform environmental modeling on the inspection item set to obtain an environmental matrix. Based on the environmental matrix and the determined environmental factors, the optimized ant colony algorithm is used to determine the optimal inspection route, thereby realizing the intelligent determination of the reservoir inspection route. The environmental matrix can simulate the real environment of the reservoir, including feasible areas and dangerous areas, etc. The environmental factors can reflect the environmental conditions around the inspection items. The environmental factors are introduced into the optimized ant colony algorithm to determine the optimal inspection route, which can realize the optimal route determination of multiple objectives, and combined with the actual environmental factors of the reservoir, the accuracy of the optimal inspection route is improved, thereby realizing efficient reservoir inspection.
[0061] Further, determining the environmental factors based on the environmental matrix includes:
[0062] Determine the inspection grid corresponding to each inspection item in the inspection item set according to the environment matrix:
[0063] Determining the number of dangerous grids around the patrol grid;
[0064] The environmental factor of each inspection item is determined according to the number of dangerous grids.
[0065] From the above description, it can be seen that the inspection grid corresponding to each inspection item in the inspection item set is obtained according to the environmental matrix, the number of dangerous grids around the inspection grid is determined, and the environmental factor of each inspection item is determined according to the number of dangerous grids. The dangerous grid is the dangerous and difficult-to-walk area around the inspection item. During the inspection, it is necessary to avoid this area as much as possible. Combining the environmental factors with the determination of the reservoir inspection route can improve the accuracy of the optimal inspection route.
[0066] Furthermore, the determining the optimal inspection route using an optimized ant colony algorithm based on the environmental matrix and the environmental factors includes:
[0067] Determine the next inspection item by using a roulette algorithm based on the environment matrix and the environment factors according to a transfer probability formula until each inspection item in the inspection item set has been traversed to obtain the current inspection route;
[0068] Update pheromone concentration according to pheromone concentration update formula;
[0069] Using an evaluation function to determine whether the current inspection route is shorter than the current optimal inspection route, if so, updating the current inspection route to the current optimal inspection route;
[0070] Get the number of inspections;
[0071] Determine whether the number of inspections is greater than or equal to a preset number of times. If so, determine the current optimal inspection route as the optimal inspection route. If not, return to execute the step of determining the next inspection item by using a roulette algorithm based on the environmental matrix and the environmental factors according to the transfer probability formula.
[0072] Furthermore, the transition probability formula P ij *k for:
[0073]
[0074] In the formula, i represents the i-th inspection item, j represents the j-th inspection item, τ ij (t) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t, α represents the pheromone concentration of this inspection process, β represents the relative importance of the inspection items, represents the heuristic function from the i-th inspection item to the j-th inspection item at time t, D(x, y) represents the weight sum of all grids passed by the i-th inspection item, and allowk represents the set of inspection items to be determined for the k-th inspection;
[0075] The heuristic function for:
[0076]
[0077] In the formula, E j represents the environmental factor, d ij Indicates the distance between the i-th inspection item and the j-th inspection item;
[0078] The pheromone concentration update formula is:
[0079] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij , 0<ρ<1;
[0080]
[0081]
[0082] In the formula, τ ij (t+1) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t+1, ρ represents the volatility coefficient, Δτij Indicates the pheromone concentration released from the i-th inspection item to the j-th inspection item in this inspection, Δτ ij k represents the pheromone concentration released from the i-th inspection item to the j-th inspection item during the k-th inspection, Q represents a constant, and L k represents the length of the path taken by the kth inspection, and n represents the total number of the multiple inspection items.
[0083] From the above description, it can be seen that by introducing the environmental matrix to optimize the transfer probability formula, introducing the environmental factor to optimize the heuristic function, and using the heuristic function to mark the points prone to deadlock, deadlock can be avoided in the process of finding the path, and the effective search times are increased. As the number of inspections increases, the pheromones on the invalid path gradually evaporate, and some pheromones have been accumulated on the effective path. At this time, pheromones occupy a dominant position in the path search, which can effectively avoid deadlock and improve the convergence speed, thereby realizing efficient reservoir inspection.
[0084] Furthermore, the environmental factor E j for:
[0085]
[0086] From the above description, it can be seen that if the number of dangerous grids around the inspection item is less than 3, the environmental factor can be taken as 1. If the number of dangerous grids is greater than or equal to 3, the environmental factor value is greater than 1. In this way, the actual reservoir environment is combined in the process of determining the reservoir inspection route to facilitate the optimal reservoir inspection route.
[0087] The above-mentioned method and terminal for determining a reservoir inspection route of the present invention can be applied to scenarios where it is necessary to determine the inspection path of the reservoir, and can also be used for optimal path planning in other scenarios; the following is an explanation through specific implementation methods:
[0088] Embodiment 1
[0089] Please refer to Figure 1 , 3 -6. A method for determining a reservoir inspection route in this embodiment includes:
[0090] S1. Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set;
[0091] S2, using a grid method to perform environmental modeling on the inspection item set to obtain an environmental matrix;
[0092] The environment matrix is composed of grids, including a congestion grid, a danger grid and a feasible grid; and also includes the weight of the congestion grid, the weight of the danger grid and the weight of the feasible grid;
[0093] like Figure 3 , 4 As shown, Figure 3 The environment matrix in this embodiment is shown. Figure 4 The weights of each grid corresponding to the environment matrix in this embodiment are shown, where white grids are traversable grids, such as the dam road and the steps down the back slope; black grids are dangerous grids, such as the observation pier. The weight of the dangerous grid is 0, indicating that the area needs to be avoided when the inspection route is determined; gray areas are congested grids, such as the drinking water slope, the back slope and the water measuring weir construction site. This area is traversable but needs to be avoided as much as possible;
[0094] S3, determining environmental factors based on the environmental matrix, and determining an optimal patrol route using an optimized ant colony algorithm based on the environmental matrix and the environmental factors, specifically including:
[0095] In an optional implementation, when determining the optimal patrol route, the method further includes: S30, initializing the pheromone concentration;
[0096] Specifically, before the optimal patrol route is determined, the pheromone concentration of each patrol item is equal, and the pheromone concentration can be initialized to a preset value, which can be set according to actual conditions;
[0097] S31, determining the inspection grid corresponding to each inspection item in the inspection item set according to the environment matrix:
[0098] Specifically, obtaining the position information of each inspection item in the inspection item set, and determining the inspection grid corresponding to each inspection item in the environment matrix according to the position information;
[0099] S32, determining the number of dangerous grids around the inspection grid;
[0100] S33, determining the environmental factor of each inspection item according to the number of dangerous grids;
[0101] The environmental factor E j for:
[0102]
[0103] S34, determining the next inspection item by using a roulette algorithm according to a transfer probability formula based on the environmental matrix and the environmental factors, until each inspection item in the inspection item set has been traversed to obtain the current inspection route;
[0104] Among them, the transition probability formula P ij *k for:
[0105]
[0106] In the formula, i represents the i-th inspection item, j represents the j-th inspection item, τ ij (t) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t, α represents the pheromone concentration of this inspection process, β represents the relative importance of the inspection items, represents the heuristic function from the i-th inspection item to the j-th inspection item at time t, D(x, y) represents the weight sum of all grids passed by the i-th inspection item, allow k represents the set of inspection items to be determined for the kth inspection;
[0107] Among them, D(x, y) can be determined according to the environment matrix, such as Figure 3 , 4 As shown in Figure 2, if it is a normal path (only passing through feasible grids), then according to the environment matrix, D(x, y) = 1. If the path is a congested or dangerous path (i.e. passing through congested grids or dangerous grids), then D(x, y) > 1. Therefore, D(x, y) and P ij *k Inversely proportional, indicating that they are more inclined to walk along common paths during inspections;
[0108] The heuristic function for:
[0109]
[0110] In the formula, E j represents the environmental factor, d ij Indicates the distance between the i-th inspection item and the j-th inspection item;
[0111] Among them, Figure 6 As shown, the distance between each two inspection items is calculated to obtain a series of paths composed of broken line segments, namely d ij =x i -x j , where x i represents the i-th inspection item, x j represents the jth inspection item;
[0112] Specifically, the probability of each inspection item to be determined (i.e., the inspection item that has not been traversed) in the inspection item set is calculated according to the transfer probability formula based on the environmental matrix and the environmental factors, and the probability of each inspection item to be determined is accumulated to obtain a cumulative probability; a roulette algorithm is used to randomly generate a value within a preset range, and a target cumulative probability is determined according to the value, and the inspection item corresponding to the target cumulative probability is determined as the next inspection item, and the preset range is 0 to 1;
[0113] For example, Figure 5 As shown, P1 and P2 are the probabilities calculated by the above transfer probability formula. Assuming that the value falls between the cumulative probability P1 and P1+P2, the inspection item corresponding to P2 is determined as the next inspection item;
[0114] S35, updating the pheromone concentration according to the pheromone concentration update formula;
[0115] The pheromone concentration update formula is:
[0116] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij , 0<ρ<1;
[0117]
[0118]
[0119] In the formula, τ ij (t+1) represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t+1, ρ represents the volatility coefficient, Δτ ij Indicates the pheromone concentration released from the i-th inspection item to the j-th inspection item in this inspection, Δτ ij k represents the pheromone concentration released from the i-th inspection item to the j-th inspection item during the k-th inspection, Q represents a constant, and L k represents the length of the path taken by the kth inspection, and n represents the total number of the multiple inspection items;
[0120] Among them, each time an inspection is completed, if the inspection result submitted by the inspection item in the historical inspection process is normal, the larger ρ is, and if there is a problem feedback or maintenance record for the inspection item, the smaller ρ is. After the problem feedback is processed and the maintenance is completed, the ρ value increases;
[0121] S36, using an evaluation function to determine whether the current inspection route is shorter than the current optimal inspection route, and if so, updating the current inspection route to the current optimal inspection route;
[0122] Among them, in order to describe the effectiveness of multi-inspection route planning, the relationship between the shortest path and the path with as few congestion or danger as possible is weighed, and the evaluation function is established by the linear weighted sum method. The corresponding weight coefficient is assigned according to the importance of each inspection item, and then the optimal path is solved by linear combination. The evaluation function is:
[0123] L best =D(x, y)(L p +L W1 +L W2 +...+LWz ), z=1, 2, 3, ...;
[0124] Where, L best Indicates the length of this inspection route, L p Indicates the length of the normal route, L Wz Represents the weighted path length; the value of D(x, y) will change with L p and L Wz change;
[0125] S37, obtaining the number of inspections;
[0126] S38, determining whether the number of inspections is greater than or equal to a preset number of times, if so, determining the current optimal inspection route as the optimal inspection route, if not, returning to execute step S34;
[0127] The preset number of times can be set according to actual conditions.
[0128] Embodiment 2
[0129] Please refer to Figure 2 A terminal for determining a reservoir inspection route in this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the method for determining a reservoir inspection route in the first embodiment is implemented.
[0130] In summary, the present invention provides a method and terminal for determining a reservoir inspection route, which obtains multiple inspection items of a reservoir to be inspected and obtains an inspection item set; uses a grid method to perform environmental modeling on the inspection item set to obtain an environmental matrix, wherein the environmental matrix is composed of grids; determines environmental factors based on the environmental matrix, and determines the next inspection item using a roulette algorithm based on the environmental matrix and the environmental factors according to a transfer probability formula until each inspection item in the inspection item set has been traversed to obtain the current inspection route; updates the pheromone concentration according to the pheromone concentration update formula; when the current inspection route is shorter than the current optimal inspection route, updates the current inspection route to the current optimal inspection route; and when the number of inspections is greater than or equal to the preset number of inspections, updates the current inspection route to the current optimal inspection route. The optimal patrol route is determined as the optimal patrol route, otherwise it returns to the next patrol item step. The transfer probability formula is optimized by introducing the environmental matrix, and the heuristic function is optimized by introducing the environmental factor. The heuristic function is used to mark the points prone to deadlock, so as to avoid falling into a deadlock state in the process of finding the path, and the effective search times are increased. It can effectively avoid deadlock and improve the convergence speed. The environmental matrix can simulate the real environment of the reservoir, including feasible areas and dangerous areas, etc. The environmental factors can reflect the environmental conditions around the patrol items. The environmental factors are introduced into the optimized ant colony algorithm to determine the optimal patrol route, which can realize the optimal route determination of multiple objectives, and combined with the actual environmental factors of the reservoir, the accuracy of the optimal patrol route is improved, thereby realizing efficient reservoir patrol.
[0131] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for determining a reservoir inspection route, characterized in that: include: Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set; Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids; Determining environmental factors based on the environmental matrix, and determining an optimal patrol route using an optimized ant colony algorithm based on the environmental matrix and the environmental factors; Determining the environmental factors based on the environmental matrix comprises: Determine the inspection grid corresponding to each inspection item in the inspection item set according to the environment matrix: Determining the number of dangerous grids around the patrol grid; Determine the environmental factor of each inspection item according to the number of dangerous grids; Determining the optimal inspection route by using an optimized ant colony algorithm based on the environmental matrix and the environmental factors includes: Determine the next inspection item by using a roulette algorithm based on the environment matrix and the environment factors according to a transfer probability formula until each inspection item in the inspection item set has been traversed to obtain the current inspection route; Update pheromone concentration according to pheromone concentration update formula; Using an evaluation function to determine whether the current inspection route is shorter than the current optimal inspection route, if so, updating the current inspection route to the current optimal inspection route; Get the number of inspections; Determine whether the number of inspections is greater than or equal to a preset number of times; if so, determine the current optimal inspection route as the optimal inspection route; if not, return to the step of determining the next inspection item by using a roulette wheel algorithm based on the environmental matrix and the environmental factors according to a transfer probability formula; The transition probability formula for: ; In the formula, i represents the i-th inspection item, j represents the j-th inspection item, represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t, α represents the pheromone concentration of this inspection process, and β represents the relative importance of the inspection items. represents the heuristic function from the i-th inspection item to the j-th inspection item at time t, D(x, y) represents the weight sum of all grids passed by the i-th inspection item, allow k represents the set of inspection items to be determined for the kth inspection; The heuristic function for: ; In the formula, E j represents the environmental factor, d ij Indicates the distance between the i-th inspection item and the j-th inspection item; The pheromone concentration update formula is: ; ; ; In the formula, represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t+1, represents the volatility coefficient, It indicates the pheromone concentration released from the i-th inspection item to the j-th inspection item in this inspection. represents the pheromone concentration released from the i-th inspection item to the j-th inspection item during the k-th inspection, Q represents a constant, and L k represents the length of the path taken by the kth inspection, and n represents the total number of the multiple inspection items; The environmental factor E j for: 。 2. A terminal for determining a reservoir inspection route, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Obtain multiple inspection items of the reservoir to be inspected and obtain an inspection item set; Performing environmental modeling on the inspection item set using a grid method to obtain an environmental matrix, wherein the environmental matrix is composed of grids; Determining environmental factors based on the environmental matrix, and determining an optimal patrol route using an optimized ant colony algorithm based on the environmental matrix and the environmental factors; Determining the environmental factors based on the environmental matrix comprises: Determine the inspection grid corresponding to each inspection item in the inspection item set according to the environment matrix: Determining the number of dangerous grids around the patrol grid; Determine the environmental factor of each inspection item according to the number of dangerous grids; Determining the optimal inspection route by using an optimized ant colony algorithm based on the environmental matrix and the environmental factors includes: Determine the next inspection item by using a roulette algorithm based on the environment matrix and the environment factors according to a transfer probability formula until each inspection item in the inspection item set has been traversed to obtain the current inspection route; Update pheromone concentration according to pheromone concentration update formula; Using an evaluation function to determine whether the current inspection route is shorter than the current optimal inspection route, if so, updating the current inspection route to the current optimal inspection route; Get the number of inspections; Determine whether the number of inspections is greater than or equal to a preset number of times; if so, determine the current optimal inspection route as the optimal inspection route; if not, return to the step of determining the next inspection item by using a roulette wheel algorithm based on the environmental matrix and the environmental factors according to a transfer probability formula; The transition probability formula for: ; In the formula, i represents the i-th inspection item, j represents the j-th inspection item, represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t, α represents the pheromone concentration of this inspection process, and β represents the relative importance of the inspection items. represents the heuristic function from the i-th inspection item to the j-th inspection item at time t, D(x, y) represents the weight sum of all grids passed by the i-th inspection item, allow k represents the set of inspection items to be determined for the kth inspection; The heuristic function for: ; In the formula, E j represents the environmental factor, d ij Indicates the distance between the i-th inspection item and the j-th inspection item; The pheromone concentration update formula is: ; ; ; In the formula, represents the pheromone concentration between the i-th inspection item and the j-th inspection item at time t+1, represents the volatility coefficient, It indicates the pheromone concentration released from the i-th inspection item to the j-th inspection item in this inspection. represents the pheromone concentration released from the i-th inspection item to the j-th inspection item during the k-th inspection, Q represents a constant, and L k represents the length of the path taken by the kth inspection, and n represents the total number of the multiple inspection items; The environmental factor E j for: 。
Citation Information
Patent Citations
Optimal route planning method for instrument inspection robot based on YOLOv3
CN109828578A
Dynamic path planning method for ant colony algorithm in congestion environment
CN110941267A