Greenway line selection method, device, electronic device and storage medium
By constructing a greenway line selection model that maximizes population coverage and using a genetic algorithm to solve it, the problem of insufficient accuracy in greenway line selection in the existing technology is solved, and the effect of maximizing population coverage under a given length is achieved.
Patent Information
- Application Number
- CN202410515738.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-04-26
AI Technical Summary
In the prior art, greenway line selection planning depends on the planner's experience, resulting in line selection being inaccurate enough to maximize the coverage of the population.
By obtaining relevant data, a greenway line selection model that satisfies the maximization of population coverage is constructed, and a genetic algorithm is used to solve it to determine the target greenway line selection plan.
The accuracy of greenway line selection is improved to ensure that the service population can be maximized under the given greenway length.
Smart Images

Figure CN118504798B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban planning, and in particular to a greenway line selection method, device, electronic equipment and storage medium. Background Art
[0002] Urban greenways refer to green linear spaces open in cities that can provide citizens with facilities for leisure, sports, education and other functions. They are important green infrastructure in cities.
[0003] Greenway route planning, that is, choosing appropriate routes to build greenways on the existing urban road network, needs to consider multiple aspects such as population, society, economy, history and culture. The most important factor is population distribution, that is, the route selection of greenways should be selected to serve the largest population under given resource constraints. In related technologies, the commonly used greenway route selection methods are mostly based on adaptive analysis, that is, selecting routes and planning greenways based on the planners' experience.
[0004] However, the greenway route determined by the above technical solution may not be the route that can serve the largest population in some cases. Summary of the invention
[0005] The present invention provides a greenway line selection method, device, electronic device and storage medium, which are used to solve the defect that the greenway line selection determined by planning the greenway line selection based on human experience in the prior art is not accurate enough. The greenway line selection method can be designed under the condition of a given maximum greenway construction length to meet the demand of maximizing the coverage of the population, thereby achieving the technical effect of improving the accuracy of the determined greenway line selection.
[0006] The present invention provides a greenway line selection method, comprising:
[0007] Obtaining relevant data for greenway line selection; the relevant data includes at least one of the area range, road data and first population distribution data corresponding to the greenway line selection;
[0008] A greenway selection model is constructed based on relevant data and preset constraints; the above constraints are constraints related to the requirements of greenway selection; the above greenway selection model is a model that satisfies the maximum population coverage under the condition of setting the greenway length;
[0009] A genetic algorithm is used to solve the greenway route selection model to determine a target greenway route selection scheme; the target greenway route selection scheme includes a selected target road section sequence.
[0010] According to a greenway line selection method provided by the present invention, the greenway line selection model is constructed according to relevant data and preset constraints, including:
[0011] Construct a road network for the road data within the regional range, and determine a directed graph corresponding to the road data; the directed graph includes nodes and edges, where nodes represent road sections and edges represent connection relationships between road sections;
[0012] Performing resolution conversion processing on the first population distribution data to determine second population distribution data; the resolution of the second population distribution data is smaller than the resolution of the first population distribution data;
[0013] A greenway line selection model is constructed based on the directed graph, the second population distribution data and constraints.
[0014] According to a greenway line selection method provided by the present invention, the second population distribution data includes a plurality of grid points, each grid point corresponding to a population value;
[0015] The greenway line selection model is constructed based on the directed graph, the second population distribution data and the constraints, including:
[0016] Calculate a first distance between any road section and any grid point according to the directed graph and the second population distribution data;
[0017] Determine a set of covered sections covering each grid point according to each first distance and a preset greenway coverage distance; the set of covered sections includes at least one section;
[0018] A greenway line selection model is constructed based on the set of covered road sections, directed graph, second population distribution data and constraints.
[0019] According to a greenway line selection method provided by the present invention, the greenway line selection model is solved by using a genetic algorithm to determine a target greenway line selection scheme, including:
[0020] Randomly generate multiple feasible solutions corresponding to the greenway line selection model, and combine multiple feasible solutions to obtain an initial population; each feasible solution corresponds to a greenway line selection plan;
[0021] Calculation operation, the above calculation operation includes: calculating the fitness of each greenway line selection scheme in the initial population;
[0022] Check whether the preset termination condition is currently met. If so, determine the target greenway selection scheme based on the fitness of each greenway selection scheme in the initial population.
[0023] According to a greenway line selection method provided by the present invention, the method further includes:
[0024] If the termination condition is not met, a solution operation is performed, and the solution operation includes: performing a selection operation on the greenway selection schemes in the initial population to determine the first population; performing a crossover operation on the greenway selection schemes in the first population to determine the second population; performing a mutation operation on the greenway selection schemes in the second population to determine the third population; performing an elite selection operation based on the third population and the initial population to determine the fourth population;
[0025] The fourth population is used as the new initial population, and the calculation operation is returned to be performed until the termination condition is currently met.
[0026] According to a greenway selection method provided by the present invention, the greenway selection schemes in the first group are cross-operated to determine the second group, including:
[0027] Determine a first candidate greenway route selection scheme and a second candidate greenway route selection scheme in the first population according to a preset intersection rate;
[0028] Pairing the first candidate greenway route selection scheme and the second candidate greenway route selection scheme, and if the match is successful, obtaining the overlapping sections of the first candidate greenway route selection scheme and the second candidate greenway route selection scheme;
[0029] The first candidate greenway route selection scheme and the second candidate greenway route selection scheme are cross-operated according to the overlapping road sections to determine a new first candidate greenway route selection scheme and a new second candidate greenway route selection scheme to obtain a second population.
[0030] According to a greenway line selection method provided by the present invention, the greenway line selection schemes in the second group are subjected to mutation operation processing to determine the third group, including:
[0031] Determine a third candidate greenway route selection scheme in the second population according to a preset mutation rate; the third candidate greenway route selection scheme includes a candidate road segment sequence;
[0032] Remove a candidate road segment at one end of the candidate road segment sequence according to a preset number of times to obtain a fourth candidate greenway route selection scheme;
[0033] Determine the road section to be added according to the endpoint road section at the endpoint in the fourth candidate greenway route selection scheme; the road section to be added is a road section adjacent to the endpoint road section and not in the fourth candidate greenway route selection scheme and not intersecting with the fourth candidate greenway route selection scheme in the road network;
[0034] The road section to be added is added to the fourth candidate greenway line selection scheme in a preset manner, a new fourth candidate greenway line selection scheme is determined, and a third population is obtained.
[0035] The present invention also provides a greenway line selection device, comprising:
[0036] An acquisition module, used to acquire relevant data of greenway line selection; the relevant data includes at least one of the area range corresponding to the greenway line selection, road data and first population distribution data;
[0037] A model building module is used to build a greenway line selection model based on relevant data and preset constraints; the above constraints are constraints related to the needs of greenway line selection; the above greenway line selection model is a model that satisfies the maximum population coverage under the condition of setting the greenway length;
[0038] The greenway route selection determination module is used to solve the greenway route selection model using a genetic algorithm to determine a target greenway route selection scheme; the above-mentioned target greenway route selection scheme includes a selected target road section sequence.
[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a greenway line selection method as described in any one of the above is implemented.
[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the greenway line selection methods described above.
[0041] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the greenway line selection methods described above.
[0042] The greenway line selection method, device, electronic device and storage medium provided by the present invention construct a greenway line selection model according to the relevant data of the greenway line selection obtained and the preset constraints, and use a genetic algorithm to solve the greenway line selection model to determine a target greenway line selection scheme, the target greenway line selection scheme includes a selected target road section sequence, the relevant data of the greenway line selection includes the area range, road data and population distribution data corresponding to the greenway, the constraints are the conditions set for the needs of the greenway line selection, and the greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length. In this method, since a greenway line selection model that satisfies the maximization of population coverage under the condition of setting the greenway length can be constructed according to the relevant data of the greenway line selection and the constraints set for the needs to determine the target greenway line selection scheme, scientific support can be provided in the greenway line selection process, and the greenway line selection error caused by human experience can be avoided, thereby improving the accuracy of the determined greenway line selection; at the same time, the purpose of maximizing the service population under the condition of a given greenway length can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 This is one of the flow charts of the greenway line selection method provided by the present invention;
[0045] Figure 2 This is the second flow chart of the greenway line selection method provided by the present invention;
[0046] Figure 3 It is a schematic diagram of a directed graph provided by the present invention;
[0047] Figure 4 This is the third flow chart of the greenway line selection method provided by the present invention;
[0048] Figure 5 This is the fourth flow chart of the greenway line selection method provided by the present invention;
[0049] Figure 6 It is a schematic diagram of the original population distribution data within the greenway planning area provided by the present invention;
[0050] Figure 7 It is a schematic diagram of interpolated population distribution data provided by the present invention;
[0051] Figure 8 It is a schematic diagram of the greenway line selection scheme under different length restrictions provided by the present invention;
[0052] Fig. 9 It is a structural schematic diagram of the greenway line selection device provided by the present invention;
[0053] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Urban greenways refer to green linear spaces open in cities that can provide citizens with facilities for leisure, sports, education and other functions. Greenways are important green infrastructure in cities, which are specifically reflected in the following aspects: greenways can improve the ecological environment of cities, protect biodiversity, increase green space, reduce air pollution and noise pollution, reduce urban heat island effect, and improve the health level of urban residents; greenways can enrich the landscape level of cities, showcase the history and culture of cities, enhance the characteristics and charm of cities, enhance the image and quality of cities, attract tourists and investors, and promote the economic and social development of cities; greenways can meet the diversified needs of urban residents, provide safe and comfortable walking and cycling conditions, increase transportation options, ease traffic congestion, reduce traffic accidents, save energy and resources, reduce carbon emissions, and achieve low-carbon travel; greenways can enhance the sense of community belonging of urban residents, promote communication and interaction between neighbors, enhance citizens' sense of participation and responsibility, cultivate awareness and actions of environmental protection, and build harmonious and symbiotic social relations; at the same time, greenways can also drive the development of related industries such as tourism, catering, and culture, create more employment opportunities and tax revenue. According to statistics, every 1 yuan invested in greenway construction can bring 1.4 yuan of economic benefits.
[0056] Greenways are an important project in urban planning and construction. According to statistics, by the end of 2019, a total of 39 provincial-level administrative regions had planned or built greenways, including 863 cities and counties, with a total length of 168,000 kilometers and a coverage rate of 85%. According to the 2019 China Urban Life Report, greenways have become one of the favorite leisure activities for urban residents, with more than 80% of users choosing to ride on weekends. Greenways in major cities across the country have attracted a large number of cycling enthusiasts, such as the Beijing Grand Canal Greenway, the Shanghai Huangpu Riverside Greenway, and the Guangzhou Zhujiang New Town Greenway.
[0057] The route planning of greenways, that is, choosing appropriate routes on the existing urban road network to build greenways, needs to consider issues in many aspects, such as population, society, economy, history and culture. Among them, the most important factor is population distribution, that is, the route selection of greenways should select routes that can serve the largest population under given resource constraints. At the same time, a greenway in a city should be continuous to meet the needs of residents for commuting, recreation, etc. However, the planning of greenways currently lacks the support of scientific methods. Currently, the commonly used greenway route planning is mainly based on adaptive analysis, which relies heavily on the experience of planners and cannot meet the core requirement of serving as many people as possible, that is, the accuracy of the currently determined greenway route selection is not high enough. Based on this, the present invention provides a greenway route selection method, device, electronic device and storage medium, which can solve this technical problem.
[0058] Combine the following Figure 1-Figure 8 The greenway line selection method of the present invention is described.
[0059] It should be noted that the executor of the greenway line selection method of the present invention may be a greenway line selection device, an electronic device, a computer device including an electronic device, or a geographic information system. The following embodiments will take an electronic device as an example to illustrate the greenway line selection method.
[0060] Figure 1 This is one of the flow charts of the greenway line selection method provided by the present invention, see Figure 1 As shown, the method may include the following steps:
[0061] S102, obtaining relevant data for greenway line selection; the above-mentioned relevant data includes at least one of the area range corresponding to the greenway line selection, road data and first population distribution data.
[0062] Among them, the regional scope refers to the spatial scope of the greenway line selection. The spatial scope of the greenway line selection planning area can be marked in the GIS software, and then the marked regional scope can be saved as a surface feature vector file (here because the regional scope is data on a plane, it is saved as a surface feature vector file). The above marked regional scope can be an area of any shape, such as a rectangular area, a circular area, a trapezoidal area, a polygonal area, etc. GIS refers to Geographic Information System, which is a software that can provide the functions of collecting, storing, processing, analyzing, and displaying geographic data, mainly including data input and editing, data management, data operation, and data display and output.
[0063] Road data refers to the road data within the greenway line selection planning, that is, the road data within the marked area, which can be obtained from databases and platforms including but not limited to the National Basic Geographic Information Database, online map software (such as Amap, Baidu Map, Google Map), etc., can be downloaded from the Internet, or obtained through field research. After obtaining the road data within the marked area, since the roads are generally linear, the obtained road data can be saved as a line feature vector file in GIS.
[0064] The first population distribution data refers to the population distribution data within the greenway line selection planning range and the preset range of the surrounding area, that is, the population distribution data within the marked area, such as LandScan population data, which can be downloaded from the Internet. After obtaining the first population distribution data within the marked area, the first population distribution data can be saved as a raster file in GIS. The size of the preset range of the surrounding area can be determined according to the greenway service range. For example, the greenway service range is generally less than or equal to 5 kilometers. If it is 5 kilometers, then the population distribution data within the greenway line selection planning range and the surrounding 5 kilometers can be obtained.
[0065] The greenway service range can also be called the greenway coverage range, which refers to the spatial range within a certain distance along the greenway and its surroundings. This certain distance can be called the radius of the greenway service range (or greenway coverage range). The greenway service population refers to the population within the greenway service range (or greenway coverage range).
[0066] The relevant data of the greenway line selection can be obtained through the above method, including the area range, road data and first population distribution data corresponding to the greenway line selection.
[0067] S104, constructing a greenway line selection model based on relevant data and preset constraints; the above constraints are constraints related to the needs of greenway line selection; the above greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length.
[0068] Among them, the above-mentioned constraints are constraints set for the needs of greenway line selection, and can be pre-set or determined based on the relevant data after obtaining the relevant data of greenway line selection. The constraints include but are not limited to: the road section does not intersect itself, there is no need to specify the starting and ending points of the road section, the selected road sections meet the continuity requirements, and the total length of the selected road sections is within the set greenway length range. The road section does not intersect itself means that the road section is linear and cannot intersect itself. The road section can be a straight line segment or a broken line segment. It is not necessary to specify the starting and ending points of the road section. It means that the starting and / or ending points of the road section are not specified when constructing the greenway line selection model, which can facilitate flexible selection of road sections. The continuity requirements between the selected road sections refer to the continuous sections between the selected road sections, and no breaks can occur. The total length of the selected road sections is within the length threshold range, which means that the total length of the selected road sections must be within the total length range of the given greenway line selection. For example, given a greenway line selection of 2km in length, the total length of the road sections selected during greenway line selection cannot exceed 2km.
[0069] Specifically, after obtaining the relevant data and constraints for greenway selection, a greenway selection model can be constructed based on the relevant data and constraints. The greenway selection model is a model that maximizes population coverage while setting the greenway length, that is, a model that allows the selected greenway selection to cover or serve the largest population while satisfying the constraints. The greenway selection model here can be composed of one mathematical expression or multiple mathematical expressions, which is not specifically limited here.
[0070] S106, using a genetic algorithm to solve the greenway route selection model to determine a target greenway route selection scheme; the target greenway route selection scheme includes a selected target road section sequence.
[0071] Among them, the above-mentioned greenway line selection model can usually be calculated and solved using general integer optimization model solving tools such as mathematical programming solving software CPLEX or GUROBI. However, since the greenway line selection model has more constraints and decision variables, the efficiency of using a general solver is low. Therefore, in this embodiment, a genetic algorithm is used to solve the greenway line selection model, which can improve the quality of the target greenway line selection plan finally obtained, that is, improve the accuracy of the target greenway line selection plan obtained.
[0072] Specifically, after the greenway route selection model is constructed, a genetic algorithm can be used to solve the greenway route selection model in combination with the above-mentioned constraints to obtain a solution result, which can include the greenway route selection scheme finally selected, recorded as the target greenway route selection scheme. The target greenway route selection scheme can include a selected section sequence, recorded as a target section sequence. The target section sequence is an ordered sequence, which can characterize the connection relationship and sequence of the target sections included therein, that is, the target section sequence can be a set of interconnected target sections, and each target section can have a corresponding length. The target section sequence includes at least one selected target section. If multiple target sections are included, the target section sequence can include information such as the sequence number, connection relationship, and sequence of arrangement between the multiple target sections.
[0073] The above-mentioned greenway line selection method constructs a greenway line selection model based on the relevant data of the greenway line selection obtained and the preset constraints, and uses a genetic algorithm to solve the greenway line selection model to determine the target greenway line selection plan, which includes the selected target road section sequence, the relevant data of the greenway line selection includes the area range, road data and population distribution data corresponding to the greenway, the constraints are the conditions set for the needs of the greenway line selection, and the greenway line selection model is a model that satisfies the maximum population coverage under the condition of the set greenway length. In this method, since a greenway line selection model that satisfies the maximum population coverage under the condition of the set greenway length can be constructed based on the relevant data of the greenway line selection and the constraints set for the needs to determine the target greenway line selection plan, this can provide scientific support in the greenway line selection process, avoid the greenway line selection error caused by human experience, and thus improve the accuracy of the determined greenway line selection; at the same time, it can achieve the purpose of maximizing the service population under the condition of a given greenway length.
[0074] The following example illustrates a possible implementation method for constructing a greenway route selection model based on relevant data of greenway route selection.
[0075] Figure 2 This is the second flow chart of the greenway line selection method provided by the present invention, see Figure 2 As shown, the above S104 may include the following steps:
[0076] S202, constructing a road network for the road data within the regional range, and determining a directed graph corresponding to the road data; the directed graph includes nodes and edges, where the nodes represent road sections and the edges represent the connection relationship between the road sections.
[0077] The greenway route selection of the present invention is performed on the existing road network, which refers to the road network in the field of transportation. A road section is a road between two adjacent intersections or road endpoints on the road network.
[0078] After obtaining the road data within the area, we can first remove the roads where greenways cannot be built. Then, we divide the road network at all intersections and decompose it into sections. Each section is a node in a directed graph, and the weight of each node is the length of the section. If any two sections pass through the same intersection, the corresponding two sections are connected by two edges in opposite directions. For any intersection τ, the sections passing through this intersection can be grouped into a set C τ , and finally the constructed directed graph can be obtained.
[0079] For example, see Figure 3 The schematic diagram of the directed graph shown in the figure, where the left figure is the road network, AF is the intersection, and the right figure is the converted directed graph. The road section is composed of the intersection signs at both ends, such as [AC] represents the road section between intersections AC in the right figure.
[0080] S204, performing resolution conversion processing on the first population distribution data to determine second population distribution data; the resolution of the second population distribution data is smaller than the resolution of the first population distribution data.
[0081] In this step, the latest LandScan population distribution estimation data can be downloaded. The population distribution estimation data usually includes population data within the greenway selection area and population data in other areas. The resolution of the population distribution estimation data is usually low, such as 1 km.
[0082] After obtaining the above-mentioned population distribution estimation data, the population distribution data within the greenway line selection planning range and the preset range of the surrounding area can be intercepted and recorded as the first population distribution data. The preset range of the surrounding area is as mentioned above, and its size can be determined according to the greenway service range. For example, the greenway service range is generally less than or equal to 5 kilometers. If it is 5 kilometers, then the population distribution data within the greenway line selection planning range and the surrounding 5 kilometers can be obtained. The population distribution data within 5 km of the surrounding area is selected because the greenway usually selected needs to meet the needs of people being able to walk or ride to it. If the distance is too far, it will affect people’s travel convenience.
[0083] After obtaining the first population distribution data as described above, the first population distribution data can be interpolated using bilinear interpolation to interpolate the first population distribution data to a smaller preset spatial resolution to obtain the second population distribution data. The preset spatial resolution here is generally not higher than half the radius of the greenway service range, which refers to the area that the greenway can serve, for example, the preset spatial resolution is less than or equal to 500m.
[0084] In addition, the first population distribution data and the second population distribution data are both raster data / raster files, and the second population distribution data includes a plurality of raster points, each of which corresponds to a population value. Here, after the resolution is adjusted, the raster data / raster file corresponding to the second population distribution data can be converted into a point feature file, wherein each point in the point feature file corresponds to a grid in the raster file, its value is the population represented by the grid, and its position is the center of the corresponding grid.
[0085] The above interpolation of population distribution data into data with a smaller spatial resolution can facilitate the subsequent calculation of the number of people covered by the greenway and improve the accuracy of the calculation.
[0086] S206: construct a greenway line selection model according to the directed graph, the second population distribution data and the constraint conditions.
[0087] In this step, after obtaining the directed graph of greenway selection and the population distribution data with a lower resolution, as an optional embodiment, the first distance between any road section and any grid point can be calculated based on the directed graph and the second population distribution data. That is, the distance between any road section i and any population grid point k can be calculated (denoted as d ik ), recorded as the first distance, which can be the minimum Euclidean distance between the line corresponding to the road segment i and the grid point k.
[0088] After obtaining the first distance between the road section i and any population grid point k, as an optional embodiment, a set of covered road sections covering each grid point can be determined according to each first distance and a preset greenway coverage distance; the above-mentioned set of covered road sections includes at least one road section. The size of the greenway coverage distance can be pre-set according to the actual situation, which can be recorded as R. Then, by judging whether each first distance of each grid point is within the greenway coverage distance range, the set of all covered road sections covering each grid point can be obtained, that is, the distance d from the road section i to the grid point k can be determined. ik The set of all road segments less than or equal to R, denoted by N k , where N k The calculation method is as follows:
[0089] N k ={i|dik ≤R}
[0090] After obtaining the directed graph within the greenway selection area and the set of covered road sections of each grid point, the constraints can also be obtained. Then, as an optional embodiment, a greenway selection model can be constructed based on the sets of covered road sections, the directed graph, the second population distribution data and the constraints. The above greenway selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length.
[0091] The following are the input data variables and decision variables (i.e. output data variables) related to the greenway line selection model:
[0092]
[0093] The relevant expressions of the greenway line selection model and constraint conditions are given below:
[0094] The greenway line selection model is:
[0095] The constraints include:
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111] x i ,y k ,w i ,s i ,f ij ∈{0,1}(17)
[0112] The meanings of the greenway line selection model (also called the objective function) and the constraints are as follows:
[0113] Objective function (1): Maximize the coverage population (i.e., maximize population coverage).
[0114] Constraint (2): For any population point (i.e., population grid point) k, if at least one road segment that can cover point k is selected (i.e., in the greenway line selection scheme), then this population point k is covered; otherwise, it cannot be covered.
[0115] Constraint (3): The sum of the lengths of all selected road segments is no greater than L.
[0116] Constraint (4): Only the selected segment can be the starting segment.
[0117] Constraint (5): There is only one starting segment.
[0118] Constraint (6): Only the selected road segment can be the terminal road segment.
[0119] Constraint (7): There is only one terminating segment.
[0120] Constraint (8): The starting segment and the ending segment must be different segments.
[0121] Constraint (9): Only two road segments that are adjacent on the directed graph can be adjacent on the greenway.
[0122] Constraint (10): The number of adjacency relations in the generated greenway route selection scheme is the number of road segments minus one.
[0123] Constraint (11): When segment i is selected, all f related to segment i ij At most one of them is 1, and the rest are 0. When the road segment i is not selected, all f related to the road segment i ij Both are 0.
[0124] Constraint (12): When segment j is selected, all f related to segment j ij At most one of them is 1, and the rest are 0. When segment j is not selected, all f related to segment j ij Both are 0.
[0125] Constraint (13): Flow balance constraint. When segment i is neither the starting segment nor the ending segment, the number of segments following segment i is equal to the number of segments preceding segment i (and both are 1). When segment i is the starting segment, the difference between the number of segments following segment i and the number of segments preceding segment i is 1. When segment i is the ending segment, the difference between the number of segments following segment i and the number of segments preceding segment i is -1.
[0126] Constraint (14): For any intersection, at most two road segments passing through the intersection are selected to ensure that the greenway does not intersect itself.
[0127] Constraint (15): For any road section on the greenway, the road section with a smaller sequence number is always placed in front of the road section with a larger sequence number.
[0128] Constraint (16): The number of any road segment is between 1 and the total number of selected greenway segments and is an integer Z. Constraints (13) and (16) are used to ensure the connectivity of the greenway.
[0129] Constraints (17): Binary constraints, x i ,y k ,w i ,s i ,f ij Can only take 0 or 1.
[0130] The greenway line selection model can be constructed through the above objective function and various constraints.
[0131] In this embodiment, by converting the roads within the greenway selection range into a directed graph and interpolating the population distribution data into data with a smaller resolution, a greenway selection model is constructed in combination with constraint conditions, which can facilitate the rapid and accurate construction of the greenway selection model. In addition, by calculating the shortest distance between any road section and any grid point to determine the set of covered road sections for each grid point, a greenway selection model with maximized population coverage is obtained, which can further improve the accuracy and construction efficiency of the constructed greenway selection model.
[0132] The following example illustrates the solution process of the greenway line selection model.
[0133] Figure 4 This is the third flow chart of the greenway line selection method provided by the present invention, see Figure 4 As shown, the above S106 may include the following steps:
[0134] S302, randomly generate multiple feasible solutions corresponding to the greenway line selection model, and combine the multiple feasible solutions to obtain an initial population; each feasible solution corresponds to a greenway line selection plan.
[0135] In this step, after the greenway selection model is constructed as described above, a genetic algorithm can be used to solve the greenway selection model. The genetic algorithm imitates the process of species evolution in nature, starting from a set of random solutions, and gradually improves the solution through repeated iterations. In each iteration, the genetic algorithm will evaluate the quality of the solution, calculate the fitness value, and select the solution based on the fitness value and generate a new solution through crossover and mutation to enter the next round of iteration. Through multiple rounds of iteration, the quality of the solution can be greatly improved.
[0136] In this step, the encoding method of chromosomes in the genetic algorithm (i.e., the solution of the greenway selection model, i.e., the greenway selection scheme) can be predefined as an ordered sequence V= <v1,v2,…,v p >, where v i is the serial number of the candidate road section. A chromosome corresponds to a feasible solution of the greenway line selection model, that is, the greenway line selection plan.
[0137] Secondly, an algorithm for generating feasible solutions can be used to randomly generate multiple feasible solutions of the greenway line selection model. The algorithm for generating feasible solutions can include the following steps:
[0138] Step 1: Randomly select a section node in the directed graph whose length is not greater than L (the maximum length of the greenway) and record it as v1. The current greenway selection scheme is V = <v1>, current node v=v1.
[0139] Step 2: Randomly select a node v′ that is adjacent to the current node v, is not in V, and does not intersect with V on the road network.
[0140] Step 3: Determine whether the sum of the length of v′ and the length of V is less than L. If so, add v′ to the end of V and go back to step 2. If greater than L, exit the loop. At this point, V is a randomly generated feasible solution.
[0141] Through the above algorithm for generating feasible solutions, multiple feasible solutions V can be generated. Each feasible solution V corresponds to a greenway line selection scheme. Then, multiple feasible solutions V can be combined into a set, which can be recorded as the initial population of the genetic algorithm φ = {V1, V2, …, V G }, set algebraic counter t=1.
[0142] S304, calculation operation, the above-mentioned calculation operation includes: calculating the fitness of each greenway line selection scheme in the initial population.
[0143] In this step, before performing the calculation operation, the relevant parameters of the genetic algorithm can be pre-set, wherein the fitness function corresponding to the greenway line selection model can be determined first, and the fitness function represents the ratio between the population covered by the greenway line selection scheme and the total population of all grid points within the regional range. For example, the fitness function F(V) = S V / S max , where S V is the population covered by the greenway route selection scheme V (i.e., the service population, which refers to the population within the greenway coverage or greenway service area), S max It is the sum of the population of all population grid points within the region, so F(V) represents the proportion of the population covered by the greenway route selection scheme V to the total population. At the same time, the population size G = 5n and the maximum number of generations T = 10n can be given, where n is the total number of candidate sections.
[0144] Specifically, after obtaining the initial population including multiple feasible solutions as mentioned above, the fitness function defined above can be used to calculate the fitness of each feasible solution (i.e., each greenway line selection scheme) in the initial population to obtain the fitness of each greenway line selection scheme in the initial population.
[0145] S306, detecting whether a preset termination condition is currently satisfied, and if satisfied, determining a target greenway line selection scheme according to the fitness of each greenway line selection scheme in the initial population.
[0146] Among them, the termination conditions may include that the number of iterations reaches a preset iteration threshold, the fitness of individuals / greenway line selection schemes in the population no longer improves or remains stable, etc.
[0147] In this step, it is possible to first determine whether the termination condition is currently met, for example, it is possible to detect whether the number of iterations reaches the iteration number threshold. If the iteration number threshold is reached, that is, the termination condition is met, the iteration is terminated. Based on the fitness of each greenway line selection scheme in the initial population calculated above, the maximum fitness can be selected from them, and then the greenway line selection scheme corresponding to the maximum fitness can be used as the greenway line selection scheme finally selected, that is, the target greenway line selection scheme is obtained.
[0148] If the current iteration number threshold is not reached, that is, the termination condition is not met, then it is necessary to continue calculating and iterating. As an optional embodiment, see Figure 5 The fourth flowchart of the greenway line selection method is shown, wherein the method further includes the following steps:
[0149] S402, if the termination condition is not met, the solution operation is executed, and the above-mentioned solution operation includes: performing a selection operation on the greenway line selection scheme in the initial population to determine the first population; performing a cross operation on the greenway line selection scheme in the first population to determine the second population; performing a mutation operation on the greenway line selection scheme in the second population to determine the third population; performing an elite selection operation based on the third population and the initial population to determine the fourth population.
[0150] The following describes these processes respectively.
[0151] Optionally, the above selection operation process may include:
[0152] According to the preset selection probability P(V i ), randomly select one individual from φ each time and replicate its chromosomes for G-3 times, and then form a population φ1 with the G chromosomes obtained from the replication. The formula for calculating the selection probability is as follows:
[0153]
[0154] Among them, P(V i ) indicates the selection of chromosome V i The probability of F(V i ) indicates chromosome V i The fitness of .
[0155] Through the above selection operation, a new population can be obtained, which is recorded as the first population. The first population includes G-3 chromosomes (i.e., G-3 greenway selection schemes).
[0156] Optionally, the crossover operation process may be performed at a crossover rate P c The number of chromosomes participating in the crossover is determined by c = P c G, randomly determine c chromosomes from φ1, pair them for crossover operation, and replace the original chromosomes with the generated new chromosomes to obtain population φ2. The specific crossover operation processing algorithm may include the following steps:
[0157] Step A1, determining a first candidate greenway line selection scheme and a second candidate greenway line selection scheme in a first population according to a preset intersection rate.
[0158] Among them, the preset crossover rate P c It can be set according to the actual situation, for example, it can be P c =0.8, all the greenway selection schemes included in the first group can be recorded as candidate greenway selection schemes. In this step, c candidate greenway selection schemes can be determined in the first group according to the crossover rate, and then a candidate greenway selection scheme is randomly selected from the c candidate greenway selection schemes as the first candidate greenway selection scheme, recorded as V1. After that, a candidate greenway selection scheme can be randomly selected from the candidate greenway selection schemes that have not been selected in the first group as the second candidate greenway selection scheme, recorded as V2.
[0159] Step A2, pairing the first candidate greenway route selection scheme and the second candidate greenway route selection scheme, if the match is successful, obtaining the overlapping sections of the first candidate greenway route selection scheme and the second candidate greenway route selection scheme.
[0160] The cross operation process includes two parts: pairing process and cross operation. The first is pairing process, which can determine whether there are overlapping road segment sequences in the first candidate greenway line selection scheme V1 and the second candidate greenway line selection scheme V2. If there are overlapping road segment sequences, the first candidate greenway line selection scheme V1 and the second candidate greenway line selection scheme V2 are successfully paired. Otherwise, repeat the step A1 above of "randomly select a candidate greenway line selection scheme from the candidate greenway line selection schemes that are not selected in the first group as the second candidate greenway line selection scheme V2" until there are no candidate greenway line selection schemes in the first group that can be selected. At this time, the pairing fails and the cross operation is abandoned.
[0161] Step A3, performing cross-operation processing on the first candidate greenway line selection scheme and the second candidate greenway line selection scheme according to the overlapping road sections, determining a new first candidate greenway line selection scheme and a new second candidate greenway line selection scheme, and obtaining a second population.
[0162] This step is mainly cross processing. After the first candidate greenway selection scheme V1 and the second candidate greenway selection scheme V2 are successfully paired, it indicates that there is an overlapping road segment sequence between V1 and V2. The longest continuous overlapping part is recorded as <v a ,…,v b >,
[0163] Then V1 can be expressed as
[0164] V2 can be expressed as
[0165] The cross processing is performed by the following steps:
[0166] Step 1: Exchange the common sequence (or the same sequence) of V1 and V2 <v a ,…,v b >The following part, the new chromosome is obtained as follows:
[0167]
[0168]
[0169] Step 2: Check the feasibility of V1′ and V2′ and make corrections, including:
[0170] If the length of V1′ or V2′ exceeds the maximum length limit, or ) starts to remove road segments one by one until the length of V1′ or V2′ meets the requirements.
[0171] If V1′ or V2′ self-crosses, the chromosome / candidate greenway selection scheme is removed and a random feasible solution is generated to replace it using the above algorithm for generating feasible solutions.
[0172] After feasibility check and correction, V1′ and V2′ are the results of crossover processing, that is, a new first candidate greenway selection scheme and a new second candidate greenway selection scheme are obtained. Then, the new first candidate greenway selection scheme and the new second candidate greenway selection scheme can be used to replace the original corresponding candidate greenway selection schemes in the first population, respectively, to form a second population, which is recorded as The second population includes a total of G-3 chromosomes (ie, G-3 greenway selection schemes).
[0173] After the crossover operation is completed, a mutation operation may be performed. Optionally, the mutation operation may be performed at a mutation rate P. m The number of mutations determined is m = P m G, from Randomly determine m chromosomes, perform mutation operations on them, and replace the original chromosomes with the generated new chromosomes to obtain the population The mutation operation processing algorithm may specifically include the following steps:
[0174] Step B1, determining a third candidate greenway route selection scheme in the second population according to a preset mutation rate; the third candidate greenway route selection scheme includes a candidate road section sequence.
[0175] Among them, the preset mutation rate P m It can be set according to the actual situation, for example, it can be P m =0.02, m candidate greenway selection schemes can be selected from the second population according to the preset mutation rate, all of which are recorded as the third candidate greenway selection schemes. Each third candidate greenway selection scheme includes a corresponding road section sequence, all of which are recorded as candidate road section sequences. Assume that V= <v1,v2,…,v p >. The following steps may then be performed for each third candidate greenway route selection scheme.
[0176] Step B2: remove a candidate road section at one end of the candidate road section sequence according to a preset number of times to obtain a fourth candidate greenway line selection scheme.
[0177] Step B3, determine the section to be added based on the endpoint section at the endpoint in the fourth candidate greenway route selection scheme; the above-mentioned section to be added is adjacent to the endpoint section, and is not in the fourth candidate greenway route selection scheme and does not intersect with the fourth candidate greenway route selection scheme in the road network.
[0178] Step B4, adding the road section to be added to the fourth candidate greenway line selection scheme according to a preset method, determining a new fourth candidate greenway line selection scheme, and obtaining a third population.
[0179] The preset number of times can be set according to actual conditions, and generally does not exceed one third of the total number of candidate road segments in the third candidate greenway line selection scheme. One end of the candidate road segment sequence in the third candidate greenway line selection scheme can be randomly selected, and then one road segment is removed each time, and the removal operation is repeated according to the preset number of times, and the candidate greenway line selection scheme finally obtained is recorded as the fourth candidate greenway line selection scheme.
[0180] Then, a candidate section node at one end of the fourth candidate greenway selection scheme is randomly selected, recorded as v, and then a candidate section node v' is randomly selected that is adjacent to v, is not in the fourth candidate greenway selection scheme, and does not intersect with the fourth candidate greenway selection scheme on the road network. Then, it can be determined whether the sum of the length of v' and the length of the fourth candidate greenway selection scheme is less than the total length of the greenway L. If it is less than L, v' is added to the fourth candidate greenway selection scheme to obtain a new fourth candidate greenway selection scheme.
[0181] It should be noted that if v is the starting section, v′ should be added to the front of the fourth candidate greenway line selection plan; if v is the ending section, v′ should be added to the back of the fourth candidate greenway line selection plan, and the process returns to step B3; if it is greater than L, the loop is exited, and the new fourth candidate greenway line selection plan is a feasible solution after mutation.
[0182] Afterwards, the above mutation operation can be performed on each of the third candidate greenway selection schemes selected above to obtain a new fourth candidate greenway selection scheme, which is then substituted for the original corresponding candidate greenway selection scheme in the second population to form a new population, which is recorded as the third population. The third population includes a total of G-3 chromosomes (i.e., G-3 greenway selection schemes).
[0183] In the third population After that, you can continue the elite selection operation to obtain the fourth population The specific elite selection operation includes: Select the three greenway selection schemes with the largest fitness, and add these three greenway selection schemes to the third population to obtain the fourth population. The fourth population includes a total of G chromosomes (ie, G greenway selection schemes).
[0184] S404, taking the fourth population as a new initial population, and returning to perform calculation operations until the termination condition is currently satisfied.
[0185] In this step, after obtaining the fourth population, the fourth population can be used as the new initial population, and then return to execute the above calculation operation, that is, execute the step of calculating the fitness of each greenway line selection scheme in the initial population in the above S304, and stop the iteration when the termination condition is currently met, and take the greenway line selection scheme with the maximum fitness in the current latest initial population as the final target greenway line selection scheme.
[0186] In this embodiment, after randomly generating multiple greenway line selection schemes through a genetic algorithm, the fitness of each greenway line selection scheme is calculated, and the target greenway line selection scheme is obtained through each fitness after the termination condition is currently met. This process can obtain the target greenway line selection scheme more accurately and quickly based on the fitness of each greenway line selection scheme, which can improve the efficiency and accuracy of determining the target greenway line selection scheme. In addition, when the termination condition is not met, the initial population corresponding to the greenway line selection scheme can continue to be selected, crossed, mutated, and elite selected, which can further improve the accuracy of the target greenway line selection scheme obtained. Furthermore, by refining the steps of the crossover operation and the mutation operation, the processing of the greenway line selection scheme can be accurately realized, and the accuracy of the target greenway line selection scheme obtained can be further improved.
[0187] Based on the above technical solution, the greenway line selection schemes of different lengths planned in City A were simulated and calculated. It is assumed that the greenway coverage is the spatial range within 1km around the greenway. Figure 6 The diagram shows the original population distribution data within the greenway planning area, which shows the greenway planning area and candidate sections, as well as the original population distribution data (resolution 1km). Figure 7 The interpolated population distribution data is shown in the figure, where the interpolated population distribution data has a resolution of 500m and is converted into point data. Figure 8 The schematic diagram of greenway line selection scheme under different length restrictions is shown, which provides greenway line selection schemes under different length restrictions in City A (L=1, 2, 4, 8 km).
[0188] The data of the above greenway route selection scheme are summarized as shown in the following table:
[0189]
[0190] Among them, the actual length of the greenway and the total number of sections can be obtained after solving the target greenway route selection plan. The number of covered population and the proportion of covered population can be obtained during the solution process, where the proportion of covered population is the value of the above-mentioned fitness function.
[0191] In this embodiment, through the steps of geographic data acquisition, data processing, greenway line selection model construction, model solving, etc., a greenway line selection plan that maximizes the service population without exceeding a given greenway length can be finally obtained.
[0192] The greenway line selection device provided by the present invention is described below. The greenway line selection device described below and the greenway line selection method described above can be referenced to each other.
[0193] Fig. 9 is a schematic diagram of the structure of the greenway line selection device provided by the present invention, see Fig. 9 As shown, the device may include:
[0194] An acquisition module 510 is used to acquire relevant data of the greenway line selection; the relevant data includes at least one of the area range corresponding to the greenway line selection, road data and first population distribution data;
[0195] The model building module 520 is used to build a greenway line selection model according to relevant data and preset constraints; the above-mentioned constraints are constraints related to the requirements of greenway line selection; the above-mentioned greenway line selection model is a model that satisfies the maximum population coverage under the condition of setting the greenway length;
[0196] The greenway route selection determination module 530 is used to solve the greenway route selection model using a genetic algorithm to determine a target greenway route selection scheme; the above-mentioned target greenway route selection scheme includes a selected target road section sequence.
[0197] In an exemplary embodiment, the model building module 520 may include:
[0198] A network construction unit is used to construct a road network for road data within a regional range and determine a directed graph corresponding to the road data; the directed graph includes nodes and edges, where nodes represent road sections and edges represent connection relationships between road sections;
[0199] A conversion unit, configured to perform resolution conversion processing on the first population distribution data to determine second population distribution data; the resolution of the second population distribution data is smaller than the resolution of the first population distribution data;
[0200] The model building unit is used to build a greenway line selection model according to the directed graph, the second population distribution data and the constraint conditions.
[0201] Optionally, the second population distribution data includes multiple grid points, each grid point corresponds to a population value; the model construction unit is specifically used to calculate the first distance between any road section and any grid point based on the directed graph and the second population distribution data; determine the set of covered sections covering each grid point based on each first distance and the preset greenway coverage distance; the covered section set includes at least one section; and construct a greenway line selection model based on each covered section set, the directed graph, the second population distribution data and constraints.
[0202] In an exemplary embodiment, the greenway line selection determination module 530 may include:
[0203] An initial population determination unit is used to randomly generate multiple feasible solutions corresponding to the greenway line selection model, and combine multiple feasible solutions to obtain an initial population; each feasible solution corresponds to a greenway line selection scheme;
[0204] A calculation unit, used for calculation operations, wherein the calculation operations include: calculating the fitness of each greenway line selection scheme in the initial population;
[0205] The greenway line selection determination unit is used to detect whether the preset termination condition is currently met. If so, the target greenway line selection scheme is determined according to the fitness of each greenway line selection scheme in the initial population.
[0206] Optionally, the greenway line selection determination module 530 further includes:
[0207] A solution unit is used to perform a solution operation if the termination condition is not met, and the solution operation includes: performing a selection operation on the greenway selection schemes in the initial population to determine a first population; performing a crossover operation on the greenway selection schemes in the first population to determine a second population; performing a mutation operation on the greenway selection schemes in the second population to determine a third population; performing an elite selection operation based on the third population and the initial population to determine a fourth population;
[0208] The execution unit is returned to use the fourth population as a new initial population and return to execute the calculation operation until the termination condition is currently met.
[0209] Optionally, the above-mentioned solving unit is specifically used to determine the first candidate greenway route selection scheme and the second candidate greenway route selection scheme in the first population according to a preset intersection rate; pair the first candidate greenway route selection scheme and the second candidate greenway route selection scheme, and if the match is successful, obtain the overlapping sections in the first candidate greenway route selection scheme and the second candidate greenway route selection scheme; perform intersection operation processing on the first candidate greenway route selection scheme and the second candidate greenway route selection scheme according to the overlapping sections, determine a new first candidate greenway route selection scheme and a new second candidate greenway route selection scheme, and obtain a second population.
[0210] Optionally, the above-mentioned solving unit is specifically used to determine a third candidate greenway route selection scheme in the second population according to a preset mutation rate; the above-mentioned third candidate greenway route selection scheme includes a candidate road segment sequence; a candidate road segment at one end of the candidate road segment sequence is removed according to a preset number of times to obtain a fourth candidate greenway route selection scheme; the road segment to be added is determined according to the endpoint road segment at the endpoint in the fourth candidate greenway route selection scheme; the above-mentioned road segment to be added is adjacent to the endpoint road segment, and is not in the fourth candidate greenway route selection scheme and does not intersect with the fourth candidate greenway route selection scheme in the road network; the road segment to be added is added to the fourth candidate greenway route selection scheme according to a preset method, a new fourth candidate greenway route selection scheme is determined, and a third population is obtained.
[0211] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the greenway line selection method, which includes: obtaining relevant data of the greenway line selection; the relevant data includes at least one of the area range, road data and first population distribution data corresponding to the greenway line selection; constructing a greenway line selection model according to the relevant data and preset constraints; the constraints are constraints related to the requirements of the greenway line selection; the greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length; solving the greenway line selection model using a genetic algorithm to determine a target greenway line selection scheme; the target greenway line selection scheme includes a selected target road segment sequence.
[0212] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0213] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the greenway line selection method provided by the above-mentioned methods, and the method includes: obtaining relevant data for greenway line selection; the above-mentioned relevant data includes at least one of the area range, road data and first population distribution data corresponding to the greenway line selection; constructing a greenway line selection model according to the relevant data and preset constraints; the above-mentioned constraints are constraints related to the requirements of greenway line selection; the above-mentioned greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length; using a genetic algorithm to solve the greenway line selection model to determine the target greenway line selection plan; the above-mentioned target greenway line selection plan includes a selected target road section sequence.
[0214] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the greenway line selection method provided by the above-mentioned methods, the method comprising: obtaining relevant data for greenway line selection; the above-mentioned relevant data includes at least one of the area scope, road data and first population distribution data corresponding to the greenway line selection; constructing a greenway line selection model according to the relevant data and preset constraints; the above-mentioned constraints are constraints related to the requirements of greenway line selection; the above-mentioned greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length; solving the greenway line selection model using a genetic algorithm to determine a target greenway line selection plan; the above-mentioned target greenway line selection plan includes a selected target road section sequence.
[0215] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0216] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A greenway line selection method, characterized in that: include: Obtaining relevant data for greenway line selection; the relevant data includes the area range, road data and first population distribution data corresponding to the greenway line selection; A greenway line selection model is constructed according to the relevant data and preset constraints; the constraints are constraints related to the requirements of the greenway line selection; the greenway line selection model is a model that satisfies the maximization of population coverage under the condition of setting the greenway length; A genetic algorithm is used to solve the greenway route selection model to determine a target greenway route selection scheme; the target greenway route selection scheme includes a selected target road section sequence; The greenway line selection model is constructed according to the relevant data and preset constraints, including: Constructing a road network for the road data within the area, and determining a directed graph corresponding to the road data; the directed graph includes nodes and edges, the nodes represent road sections, and the edges represent connection relationships between road sections; Performing resolution conversion processing on the first population distribution data to determine second population distribution data; the resolution of the second population distribution data is smaller than the resolution of the first population distribution data; Constructing the greenway line selection model according to the directed graph, the second population distribution data and the constraint conditions; The second population distribution data includes a plurality of grid points, each of which corresponds to a population value; and constructing the greenway line selection model according to the directed graph, the second population distribution data and the constraint conditions includes: Calculating a first distance between any road section and any grid point according to the directed graph and the second population distribution data; Determine a set of covered sections covering each of the grid points according to each of the first distances and a preset greenway coverage distance; the set of covered sections includes at least one section; The greenway line selection model is constructed according to each of the covered road segment sets, the directed graph, the second population distribution data and the constraint conditions.
2. The greenway line selection method according to claim 1, characterized in that: The adopting of a genetic algorithm to solve the greenway line selection model and determine a target greenway line selection scheme includes: Randomly generate multiple feasible solutions corresponding to the greenway line selection model, and combine the multiple feasible solutions to obtain an initial population; each of the feasible solutions corresponds to a greenway line selection scheme; A calculation operation, the calculation operation comprising: calculating the fitness of each greenway line selection scheme in the initial population; Check whether the preset termination condition is currently met. If so, determine the target greenway line selection scheme according to the fitness of each greenway line selection scheme in the initial population.
3. The greenway line selection method according to claim 2, characterized in that: The method further comprises: If the termination condition is not met, a solution operation is performed, and the solution operation includes: performing a selection operation on the greenway line selection schemes in the initial population to determine a first population; performing a crossover operation on the greenway line selection schemes in the first population to determine a second population; performing a mutation operation on the greenway line selection schemes in the second population to determine a third population; performing an elite selection operation based on the third population and the initial population to determine a fourth population; The fourth population is used as a new initial population, and the calculation operation is executed again until the termination condition is currently satisfied.
4. The greenway line selection method according to claim 3, characterized in that: The performing cross-operation processing on the greenway line selection schemes in the first group to determine the second group includes: Determine a first candidate greenway route selection scheme and a second candidate greenway route selection scheme in the first population according to a preset intersection rate; Pairing the first candidate greenway route selection scheme and the second candidate greenway route selection scheme, and if the pairing is successful, obtaining overlapping sections of the first candidate greenway route selection scheme and the second candidate greenway route selection scheme; The first candidate greenway line selection scheme and the second candidate greenway line selection scheme are cross-operated according to the overlapping road sections to determine a new first candidate greenway line selection scheme and a new second candidate greenway line selection scheme to obtain the second population.
5. The greenway line selection method according to claim 3, characterized in that: The step of performing a mutation operation on the greenway line selection schemes in the second group to determine a third group includes: Determining a third candidate greenway route selection scheme from the second population according to a preset mutation rate; the third candidate greenway route selection scheme includes a candidate road segment sequence; Removing a candidate road segment at one end of the candidate road segment sequence according to a preset number of times to obtain a fourth candidate greenway route selection scheme; Determine the road section to be added according to the endpoint road section at the endpoint in the fourth candidate greenway route selection scheme; the road section to be added is a road section adjacent to the endpoint road section and not in the fourth candidate greenway route selection scheme and not intersecting with the fourth candidate greenway route selection scheme in the road network; The to-be-added road section is added to the fourth candidate greenway line selection scheme in a preset manner, a new fourth candidate greenway line selection scheme is determined, and the third population is obtained.
6. A greenway line selection device, characterized in that: include: An acquisition module is used to acquire relevant data of greenway line selection; the relevant data includes the area range, road data and first population distribution data corresponding to the greenway line selection; A model building module, used to build a greenway line selection model according to the relevant data and preset constraints; the constraints are constraints related to the requirements of the greenway line selection; the greenway line selection model is a model that satisfies the maximum population coverage under the condition of setting the greenway length; A greenway route selection determination module is used to solve the greenway route selection model using a genetic algorithm to determine a target greenway route selection scheme; the target greenway route selection scheme includes a selected target road section sequence; The model building module comprises: A network construction unit, configured to construct a road network for the road data within the area, and determine a directed graph corresponding to the road data; the directed graph includes nodes and edges, the nodes represent road sections, and the edges represent connection relationships between road sections; a conversion unit, configured to perform resolution conversion processing on the first population distribution data to determine second population distribution data; the resolution of the second population distribution data is smaller than the resolution of the first population distribution data; A model building unit, used for building the greenway line selection model according to the directed graph, the second population distribution data and the constraint conditions; The second population distribution data includes multiple grid points, each grid point corresponds to a population value; the model building unit is specifically used to calculate the first distance between any road section and any grid point according to the directed graph and the second population distribution data; according to each of the first distances and the preset greenway coverage distance, determine the set of covered road sections covering each of the grid points; the covered road section set includes at least one road section; according to each of the covered road section sets, the directed graph, the second population distribution data and the constraint conditions, construct the greenway line selection model.
7. An electronic device 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 program, the greenway line selection method as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the greenway line selection method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Comprehensive pipe gallery line selection planning method
CN108090633A
Greenway line selection method and device, electronic equipment and medium
CN117273476A