CN117435850B - Road inspection method, system, equipment and medium based on improved greedy algorithm - Google Patents

Road inspection method, system, equipment and medium based on improved greedy algorithm Download PDF

Info

Publication number
CN117435850B
CN117435850B CN202311762895.8A CN202311762895A CN117435850B CN 117435850 B CN117435850 B CN 117435850B CN 202311762895 A CN202311762895 A CN 202311762895A CN 117435850 B CN117435850 B CN 117435850B
Authority
CN
China
Prior art keywords
sequence
accessed
check point
checkpoint
road
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311762895.8A
Other languages
Chinese (zh)
Other versions
CN117435850A (en
Inventor
孙洁琼
王伟
李长林
刘坤
邵建雄
魏华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongjiao Tongli Construction Co ltd
Original Assignee
Zhongjiao Tongli Construction Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongjiao Tongli Construction Co ltd filed Critical Zhongjiao Tongli Construction Co ltd
Priority to CN202311762895.8A priority Critical patent/CN117435850B/en
Publication of CN117435850A publication Critical patent/CN117435850A/en
Application granted granted Critical
Publication of CN117435850B publication Critical patent/CN117435850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C1/00Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people
    • G07C1/20Checking timed patrols, e.g. of watchman

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Algebra (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention relates to the technical field of road inspection path planning, and provides a road inspection method, a system, equipment and a medium based on an improved greedy algorithm, wherein the method comprises the following steps: s1: establishing a road inspection model; s2: numbering check points, and setting accessed check point sequences and unaccessed check point sequences; s3: initializing a road cost array; s4: constructing an accessed check point sequence, and adding a starting point; s5: judging whether the number of the checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, and if not, forming a road inspection path; s6: acquiring a first check point of the unaccessed check point sequence as a current check point; s7: calculating the minimum cost of the current checkpoint in all positions of the accessed checkpoint sequence, and inserting the current checkpoint into the accessed checkpoint sequence; s8: steps S5 to S7 are repeated until the road patrol path is formed. The scheme can optimally plan the road inspection path in a limited time.

Description

Road inspection method, system, equipment and medium based on improved greedy algorithm
Technical Field
The invention relates to the technical field of road inspection path planning, in particular to a road inspection method, a road inspection system, equipment and a medium based on an improved greedy algorithm.
Background
With rapid urban development, vehicles in cities are increasingly increased, traffic pressure is continuously increased, and road health is a basis for ensuring smooth traffic, so that road inspection work is required to be frequently performed to inspect the health degree of roads. In the road inspection work, the reasonable selection of the inspection path has great influence on accelerating the inspection speed, improving the service quality, reducing the cost and increasing the economic benefit, so the road inspection business needs a feasible path planning method.
The existing road inspection path planning method mainly comprises two methods, wherein the first method is an accurate algorithm, an optimal solution of the road inspection path planning method can be obtained, mathematical planning technologies such as linear planning, integer planning and nonlinear planning are mainly used for describing the model relation of the inspection path so as to obtain an optimal decision, the accurate algorithm is based on strict mathematical means, and is usually superior to a heuristic artificial intelligent algorithm under the condition that the road inspection path planning method can be solved, but the calculation amount is exponentially increased along with the increase of the problem scale due to the introduction of the strict mathematical method, the calculation amount is large, the time is long, the problem of exponential explosion cannot be avoided, the adaptability is poor, the requirement of real-time calculation cannot be met, and the application range is very limited in practice; the second is a heuristic algorithm, which is an improved search algorithm in a state space, and evaluates each searched position to obtain the best position, and searches from this position until the target, and more heuristic manual algorithms have been proposed at present, in which a greedy algorithm is often used to solve the problem of path planning, but the conventional greedy algorithm cannot consider the whole optimization, and although each step ensures that a locally optimal solution is obtained, not all input data can find a feasible solution.
Therefore, there is a need to provide a road inspection method, a road inspection system, a device and a medium based on an improved greedy algorithm, which can make an optimal plan for a road inspection path in a limited time, and reduce measurement errors.
The above information disclosed in the background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The invention mainly aims to solve the problems that the road inspection path planning cannot simultaneously have small calculated amount and accurate calculation, and provides a road inspection method, a road inspection system, equipment and a medium based on an improved greedy algorithm, which can optimally plan the road inspection path in a limited time and reduce measurement errors.
To achieve the above object, a first aspect of the present invention provides a road inspection method based on an improved greedy algorithm, including the steps of:
s1: establishing a road inspection model, wherein a plurality of inspection points are arranged on each road in a designated area, and a weighted undirected graph is obtained, and comprises an inspection point set, a road set and a road cost array of connecting every two inspection points;
s2: numbering check points, and setting accessed check point sequences and unaccessed check point sequences;
s3: initializing a road cost array of every two check point connecting lines;
s4: constructing an accessed check point sequence, and adding a starting point, wherein the starting point is a first check point;
s5: judging whether the number of checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path, otherwise, executing step S6;
s6: acquiring a first check point of the unaccessed check point sequence as a current check point; deleting a first checkpoint of the sequence of unaccessed checkpoints to form a new sequence of unaccessed checkpoints;
s7: calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence;
s8: and repeating the steps S5 to S7 until a road inspection path is formed.
According to an exemplary embodiment of the present invention, in step S3, the method for initializing the road cost array of each two checkpoints includes: and filling the road cost array of every two check point connecting lines according to the method of the adjacency matrix.
According to an exemplary embodiment of the present invention, in step S6, before the first checkpoint of the sequence of non-access checkpoints is acquired, it is determined whether the number of checkpoints in the sequence of non-access checkpoints is 0, and if so, step S5 is performed.
According to an exemplary embodiment of the present invention, in step S7, the method for calculating the minimum cost of the current checkpoint in all positions of the accessed checkpoint sequence includes: the smallest sum of the path costs of the current checkpoint from the second position to the last position in the sequence of accessed checkpoints is calculated as the smallest cost.
According to an example embodiment of the present invention, the method for calculating the minimum path cost and as the minimum cost of inserting the current checkpoint into the second position to the last position in the accessed checkpoint sequence includes:
s71: traversing from a second location to a last location in the accessed checkpoint sequence;
s72: inserting a current checkpoint into the accessed checkpoint sequence;
s73: calculating the path cost sum of the current accessed checkpoint sequence;
s74: recording the minimum path cost and storing the position of the current check point in the accessed check point sequence;
s75: deleting the current checkpoint from the accessed checkpoint sequence;
s76: repeating the steps S71 to S75, and acquiring the minimum path cost and the corresponding position of the current check point in the accessed check point sequence after the second position is traversed to the last position; the sum of the minimum path costs is the minimum cost.
According to an example embodiment of the invention, step S7 is determined by a greedy algorithm.
As a second aspect of the present invention, the present invention provides a road inspection system that can implement the improved greedy algorithm-based road inspection method.
According to an example embodiment of the present invention, the road inspection system includes a model initialization module, a model data filling module, and a road inspection path calculation module;
the model initialization module is used for establishing a road inspection model and comprises the steps that a plurality of check points are arranged on each road in a designated area, a weighted undirected graph is obtained, and the weighted undirected graph comprises a check point set, a road set and a road cost array of connecting every two check points;
the model data filling module is used for numbering check points and setting accessed check point sequences and unaccessed check point sequences; initializing a road cost array of every two check point connecting lines;
the road inspection path calculation module is used for constructing an accessed inspection point sequence, adding a starting point which is a first inspection point; judging whether the number of checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path; acquiring a first check point of the unaccessed check point sequence as a current check point; deleting a first checkpoint of the sequence of unaccessed checkpoints to form a new sequence of unaccessed checkpoints; calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence; the checkpoint from the sequence of unaccessed checkpoints is repeatedly taken out and the sequence of accessed checkpoints is inserted until a road patrol path is formed.
As a third aspect of the present invention, the present invention provides an electronic apparatus comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the improved greedy algorithm-based road inspection method.
As a fourth aspect of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the improved greedy algorithm-based road inspection method.
The method has the advantages that the method finds the optimal road inspection path planning based on the improved greedy algorithm, can make the optimal planning on the road inspection path in a limited time, and reduces measurement errors.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are only some embodiments of the present application and other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a block diagram of a road inspection system.
Fig. 2 schematically shows a step diagram of a road inspection method based on a modified greedy algorithm.
Fig. 3 schematically shows a flow chart of a road inspection method based on a modified greedy algorithm.
Fig. 4 schematically shows a diagram of a weighted undirected graph.
Fig. 5 schematically shows a block diagram of an electronic device.
Fig. 6 schematically shows a block diagram of a computer readable medium.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present application. One skilled in the relevant art will recognize, however, that the aspects of the application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another element. Thus, a first component discussed below could be termed a second component without departing from the teachings of the present application concept. As used herein, the term "and/or" includes any one of the associated listed items and all combinations of one or more.
Those skilled in the art will appreciate that the drawings are schematic representations of example embodiments, and that the modules or flows in the drawings are not necessarily required to practice the present application, and therefore, should not be taken to limit the scope of the present application.
According to a first embodiment of the present invention, as shown in fig. 1, the present invention provides a road inspection system, which includes a model initialization module, a model data filling module, and a road inspection path calculation module that are sequentially connected.
The model initialization module is used for establishing a road inspection model, and comprises the steps of arranging a plurality of check points on each road in a designated area, and obtaining a weighted undirected graph, wherein the weighted undirected graph comprises a check point set, a road set and a road cost array of connecting every two check points.
The model data filling module is used for numbering check points and setting accessed check point sequences and unaccessed check point sequences; and initializing a road cost array of every two check point connecting lines.
The road inspection path calculation module is used for constructing a solution sequence, adding a starting point, wherein the starting point is a first inspection point; judging whether the number of checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path; acquiring a first check point of the unaccessed check point sequence as a current check point; deleting a first checkpoint of the sequence of unaccessed checkpoints to form a new sequence of unaccessed checkpoints; calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence; the checkpoint from the sequence of unaccessed checkpoints is repeatedly taken out and the sequence of accessed checkpoints is inserted until a road patrol path is formed.
According to a second embodiment of the present invention, the present invention provides a road inspection method based on the improved greedy algorithm, which is implemented based on the road inspection system of the first embodiment.
As shown in fig. 2 and 3, the road inspection method based on the improved greedy algorithm includes the steps of:
s1: the method comprises the steps of establishing a road inspection model, wherein a plurality of inspection points are arranged on each road in a designated area, and a weighted undirected graph is obtained and comprises an inspection point set, a road set and a road cost array connected with each two inspection points.
As shown in fig. 4, it is assumed that given a weighted undirected graph G, g= { C, R }, a check point set c= {0,1,2,3,4}, a road set r= { (0, 1), (0, 2), (0, 4), (1, 2), (1, 3), (3, 4) }. Each sideband has a weight representing the cost between two points. The routing inspection path planning problem is to find a sequence traversing all nodes, and meanwhile, the minimum cost of traversing the path is met.
S2: checkpoints are numbered, and accessed and unaccessed checkpoint sequences are set.
Numbering checkpoints, starting from 0,1,2,..t, t is a natural number, and the number of checkpoints is t+1; the check point with the number 0 is the first check point, namely the starting point of the inspection.
The accessed checkpoint sequence R and the unaccessed checkpoint sequence S are set.
S3: and initializing a road cost array of every two check point connecting lines.
The method for initializing the road cost array of every two check points comprises the following steps: and filling the road cost array of every two check point connecting lines according to the method of the adjacency matrix.
Setting a road cost array Value [ n ] [ m ] between two checkpoints, wherein n and m are natural numbers and represent the number of the checkpoints, and the Value is the Value of the cost array.
S4: constructing a sequence of accessed checkpoints, and adding a starting point, wherein the starting point is the first checkpoint.
S5: and judging whether the number of the checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path, otherwise, executing step S6.
S6: acquiring a first check point of the unaccessed check point sequence as a current check point; deleting the first checkpoint of the sequence of unaccessed checkpoints, forming a new sequence of unaccessed checkpoints.
Before the first checkpoint of the sequence of non-access checkpoints is acquired, it is first determined whether the number of checkpoints in the sequence of non-access checkpoints is 0, and if so, step S5 is executed.
S7: and calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence.
The method for calculating the minimum cost of the current checkpoint in all positions of the accessed checkpoint sequence comprises the following steps: the smallest sum of the path costs of the current checkpoint from the second position to the last position in the sequence of accessed checkpoints is calculated as the smallest cost.
According to an example embodiment of the present invention, the method for calculating the minimum path cost and as the minimum cost of inserting the current checkpoint into the second position to the last position in the accessed checkpoint sequence includes:
s71: traversing from the second location to the last location in the accessed checkpoint sequence.
S72: the current checkpoint is inserted into the accessed checkpoint sequence.
S73: the path cost sum of the currently accessed checkpoint sequence is calculated.
The path cost sum is the sum of all road cost arrays in the current accessed checkpoint sequence.
S74: the minimum path cost is recorded and the location of the current checkpoint in the accessed checkpoint sequence is saved.
S75: the current checkpoint is deleted from the accessed checkpoint sequence.
S76: repeating the steps S71 to S75, and acquiring the minimum path cost and the corresponding position of the current check point in the accessed check point sequence after the second position is traversed to the last position; the sum of the minimum path costs is the minimum cost.
S8: and repeating the steps S5 to S7 until a road inspection path is formed.
The scheme finds the optimal road inspection path planning based on the improved greedy algorithm (namely step S7), so that the optimal planning can be made for the road inspection path in a limited time, and the measurement error is reduced.
According to a third embodiment of the present invention, an electronic device is provided, as shown in fig. 5, and fig. 5 is a block diagram of an electronic device according to an exemplary embodiment.
An electronic device 500 according to this embodiment of the present application is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one memory unit 520, a bus 530 connecting the different system components (including the memory unit 520 and the processing unit 510), a display unit 540, etc.
Wherein the storage unit stores program code that is executable by the processing unit 510 such that the processing unit 510 performs steps described in the present specification according to various exemplary embodiments of the present application. For example, the processing unit 510 may perform the steps shown in the second embodiment.
The memory unit 520 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 5201 and/or cache memory unit 5202, and may further include Read Only Memory (ROM) 5203.
The storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 530 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 500' (e.g., keyboard, pointing device, bluetooth device, etc.), devices that enable a user to interact with the electronic device 500, and/or any devices (e.g., routers, modems, etc.) that the electronic device 500 can communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 550. Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware.
Thus, according to a fourth embodiment of the present invention, the present invention provides a computer readable medium. As shown in fig. 6, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described method according to the embodiment of the present invention.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The computer-readable medium carries one or more programs which, when executed by one of the devices, cause the computer-readable medium to implement the functions of the second embodiment.
Those skilled in the art will appreciate that the modules may be distributed throughout several devices as described in the embodiments, and that corresponding variations may be implemented in one or more devices that are unique to the embodiments. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The exemplary embodiments of the present invention have been particularly shown and described above. It is to be understood that this invention is not limited to the precise arrangements, instrumentalities and instrumentalities described herein; on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (7)

1. The road inspection method based on the improved greedy algorithm is characterized by comprising the following steps of:
s1: establishing a road inspection model, comprising: each road in the appointed area is provided with a plurality of check points, a weighted undirected graph is obtained, and the weighted undirected graph comprises a check point set, a road set and a road cost array of every two check points connected with each other;
s2: numbering check points, and setting accessed check point sequences and unaccessed check point sequences;
s3: initializing a road cost array of every two check point connecting lines;
s4: constructing an accessed check point sequence, and adding a starting point, wherein the starting point is a first check point;
s5: judging whether the number of checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path, otherwise, executing step S6;
s6: acquiring a first check point of the unaccessed check point sequence as a current check point; deleting a first checkpoint of the sequence of unaccessed checkpoints to form a new sequence of unaccessed checkpoints;
s7: calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence;
s8: repeating the steps S5 to S7 until a road inspection path is formed;
in step S7, the method for calculating the minimum cost of the current checkpoint in all positions of the accessed checkpoint sequence includes: calculating the minimum path cost from the second position to the last position in the sequence of the accessed checkpoints inserted by the current checkpoints and taking the minimum path cost as the minimum cost;
the method for calculating the minimum path cost and the minimum cost of the second position to the last position in the accessed checkpoint sequence of the current checkpoint comprises the following steps:
s71: traversing from a second location to a last location in the accessed checkpoint sequence;
s72: inserting a current checkpoint into the accessed checkpoint sequence;
s73: calculating the path cost sum of the current accessed checkpoint sequence;
s74: recording the minimum path cost and storing the position of the current check point in the accessed check point sequence;
s75: deleting the current checkpoint from the accessed checkpoint sequence;
s76: repeating the steps S71 to S75, and acquiring the minimum path cost and the corresponding position of the current check point in the accessed check point sequence after the second position is traversed to the last position; the sum of the minimum path costs is the minimum cost.
2. The method for road inspection based on the improved greedy algorithm according to claim 1, wherein in step S3, the method for initializing the road cost array for every two checkpoints comprises: and filling the road cost array of every two check point connecting lines according to the method of the adjacency matrix.
3. The road inspection method based on the improved greedy algorithm according to claim 1, wherein in step S6, before the first inspection point of the sequence of inspection points is obtained, it is determined whether the number of inspection points in the sequence of inspection points is 0, and if so, step S5 is performed.
4. A road inspection system, characterized in that the system is capable of implementing the road inspection method based on the improved greedy algorithm as claimed in any one of claims 1-3.
5. The road inspection system of claim 4, comprising: the system comprises a model initialization module, a model data filling module and a road inspection path calculation module;
the model initialization module is used for establishing a road inspection model and comprises the following steps: each road in the appointed area is provided with a plurality of check points, a weighted undirected graph is obtained, and the weighted undirected graph comprises a check point set, a road set and a road cost array of every two check points connected with each other;
the model data filling module is used for numbering check points and setting accessed check point sequences and unaccessed check point sequences; initializing a road cost array of every two check point connecting lines;
the road inspection path calculation module is used for constructing an accessed inspection point sequence, adding a starting point which is a first inspection point; judging whether the number of checkpoints in the accessed checkpoint sequence is smaller than the number of all checkpoints, if not, forming a road inspection path, wherein the path connected by the accessed checkpoint sequence is the road inspection path; acquiring a first check point of the unaccessed check point sequence as a current check point; deleting a first checkpoint of the sequence of unaccessed checkpoints to form a new sequence of unaccessed checkpoints; calculating the minimum cost of the current check point in all positions of the accessed check point sequence, and inserting the current check point into the position of the accessed check point sequence corresponding to the minimum cost to form a new accessed check point sequence; repeatedly taking out checkpoints of the non-accessed checkpoint sequence and inserting the accessed checkpoint sequence until a road inspection path is formed;
the calculating the minimum cost of the current checkpoint in all positions of the accessed checkpoint sequence comprises: calculating the minimum path cost from the second position to the last position in the sequence of the accessed checkpoints inserted by the current checkpoints and taking the minimum path cost as the minimum cost;
the computing the minimum path cost and the minimum cost for inserting the current checkpoint into the second position to the last position in the sequence of accessed checkpoints comprises:
s71: traversing from a second location to a last location in the accessed checkpoint sequence;
s72: inserting a current checkpoint into the accessed checkpoint sequence;
s73: calculating the path cost sum of the current accessed checkpoint sequence;
s74: recording the minimum path cost and storing the position of the current check point in the accessed check point sequence;
s75: deleting the current checkpoint from the accessed checkpoint sequence;
s76: repeating the steps S71 to S75, and acquiring the minimum path cost and the corresponding position of the current check point in the accessed check point sequence after the second position is traversed to the last position; the sum of the minimum path costs is the minimum cost.
6. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the improved greedy algorithm-based road inspection method as set forth in any one of claims 1-3.
7. A computer readable medium, having stored thereon a computer program, which when executed by a processor implements a road inspection method based on a modified greedy algorithm according to any of claims 1-3.
CN202311762895.8A 2023-12-20 2023-12-20 Road inspection method, system, equipment and medium based on improved greedy algorithm Active CN117435850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311762895.8A CN117435850B (en) 2023-12-20 2023-12-20 Road inspection method, system, equipment and medium based on improved greedy algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311762895.8A CN117435850B (en) 2023-12-20 2023-12-20 Road inspection method, system, equipment and medium based on improved greedy algorithm

Publications (2)

Publication Number Publication Date
CN117435850A CN117435850A (en) 2024-01-23
CN117435850B true CN117435850B (en) 2024-03-19

Family

ID=89558609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311762895.8A Active CN117435850B (en) 2023-12-20 2023-12-20 Road inspection method, system, equipment and medium based on improved greedy algorithm

Country Status (1)

Country Link
CN (1) CN117435850B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156888A (en) * 2016-06-30 2016-11-23 广东电网有限责任公司电力科学研究院 A kind of polling path method and device for planning of crusing robot
CN109242214A (en) * 2018-10-25 2019-01-18 中国联合网络通信集团有限公司 Distribution route planing method and distribution route device for planning
CN111708369A (en) * 2020-07-17 2020-09-25 武汉科技大学 Route planning method for transformer substation inspection robot
CN113110601A (en) * 2021-04-01 2021-07-13 国网江西省电力有限公司电力科学研究院 Method and device for optimizing power line inspection path of unmanned aerial vehicle
CN113985884A (en) * 2021-10-29 2022-01-28 国网山东省电力公司经济技术研究院 Power inspection robot path planning method and system and robot
CN115392539A (en) * 2022-07-26 2022-11-25 浙江浙能嘉华发电有限公司 Path planning algorithm based on greedy algorithm
CN115619305A (en) * 2022-10-13 2023-01-17 杭州电子科技大学 Firefly algorithm-based vehicle path planning method
CN116414134A (en) * 2023-03-31 2023-07-11 深圳市正浩创新科技股份有限公司 Path planning method, path planning device, electronic equipment and computer readable storage medium
CN116465426A (en) * 2023-06-08 2023-07-21 东南大学 Method and device for planning cruising path and speed of automatic driving taxi

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156888A (en) * 2016-06-30 2016-11-23 广东电网有限责任公司电力科学研究院 A kind of polling path method and device for planning of crusing robot
CN109242214A (en) * 2018-10-25 2019-01-18 中国联合网络通信集团有限公司 Distribution route planing method and distribution route device for planning
CN111708369A (en) * 2020-07-17 2020-09-25 武汉科技大学 Route planning method for transformer substation inspection robot
EP3940494A1 (en) * 2020-07-17 2022-01-19 Wuhan University of Science and Technology Path planning method for substation inspection robot
CN113110601A (en) * 2021-04-01 2021-07-13 国网江西省电力有限公司电力科学研究院 Method and device for optimizing power line inspection path of unmanned aerial vehicle
CN113985884A (en) * 2021-10-29 2022-01-28 国网山东省电力公司经济技术研究院 Power inspection robot path planning method and system and robot
CN115392539A (en) * 2022-07-26 2022-11-25 浙江浙能嘉华发电有限公司 Path planning algorithm based on greedy algorithm
CN115619305A (en) * 2022-10-13 2023-01-17 杭州电子科技大学 Firefly algorithm-based vehicle path planning method
CN116414134A (en) * 2023-03-31 2023-07-11 深圳市正浩创新科技股份有限公司 Path planning method, path planning device, electronic equipment and computer readable storage medium
CN116465426A (en) * 2023-06-08 2023-07-21 东南大学 Method and device for planning cruising path and speed of automatic driving taxi

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
An improved ant colony optimization for path planning with multiple UAVs;Li, Jing等;《2021 IEEE INTERNATIONAL CONFERENCE ON MECHATRONICS (ICM)》;20210804;全文 *
基于"众包"运力模式下的即时配送订单分配及路径优化问题研究;柳湖;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20221115;全文 *
基于遗传算法的变电站巡检机器人任务路径规划方法研究;王锐;莫志超;彭向阳;庞小峰;饶章权;;计算机测量与控制;20170425(04);全文 *

Also Published As

Publication number Publication date
CN117435850A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
Moylett et al. Quantum speedup of the traveling-salesman problem for bounded-degree graphs
WO2018156942A1 (en) Optimizing neural network architectures
CN110968654B (en) Address category determining method, equipment and system for text data
CN111145076B (en) Data parallelization processing method, system, equipment and storage medium
CN110515986B (en) Processing method and device of social network diagram and storage medium
CN112712795B (en) Labeling data determining method, labeling data determining device, labeling data determining medium and electronic equipment
CN109839927B (en) Method and device for robot path planning
CN112902970A (en) Routing inspection path planning method and routing inspection robot
CN114201823A (en) Explicit nested grid assembly method and device and storage medium
CN112700006A (en) Network architecture searching method, device, electronic equipment and medium
CN115359308A (en) Model training method, apparatus, device, storage medium, and program for identifying difficult cases
CN107678741A (en) Implementation method, device, readable storage medium storing program for executing and the equipment of List View
CN117389542B (en) Industrial software construction method and device, electronic equipment and storage medium
CN114268574A (en) Scan chain length optimization using Q-learning based reinforcement learning
US11620548B1 (en) System, method, and computer program product for predicting parasitics in an electronic design
CN117540671B (en) Digital circuit simulation method and device based on key value truth table
CN117435850B (en) Road inspection method, system, equipment and medium based on improved greedy algorithm
CN117540668A (en) Simulation method and device for digital circuit
CN113449062B (en) Track processing method, track processing device, electronic equipment and storage medium
CN115729797A (en) Code similarity function detection method and device, electronic equipment and storage medium
CN116149978A (en) Service interface testing method and device, electronic equipment and storage medium
CN112561171A (en) Landslide prediction method, device, equipment and storage medium
CN111723247A (en) Graph-based hypothetical computation
CN115293078B (en) Method and device for rewriting nodes of integrated circuit, electronic equipment and medium
CN116541421B (en) Address query information generation method and device, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant