A historical urban street weaving method based on genetic algorithm
By optimizing street and alley axis data using genetic algorithms and combining multiple evaluation indicators, the problem of insufficient adaptability of traditional methods in historical urban areas has been solved. This has enabled the scientific and systematic optimization and visualization of the street and alley network, thereby improving the scientific nature and accuracy of the design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ARCHITECTURAL DESIGN & RES INST OF SOUTHEAST UNIV CO LTD
- Filing Date
- 2025-03-11
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional street and alley generation methods are not adaptable to complex historical urban areas, making it difficult to effectively balance the density, uniformity, and functionality of street and alley networks. They also lack a systematic optimization mechanism for multiple evaluation indicators, resulting in low efficiency in the design process and strong subjectivity in the results.
A street and alley patching method based on genetic algorithms is adopted. The genetic algorithm is used to optimize and iteratively evaluate the street and alley axis data. Combined with multiple evaluation indicators such as street and alley length ratio, density, efficiency, uniformity and topological depth, the optimal street and alley axis is generated and visualized through the Unity engine.
It improves the scientific rigor and precision of street and alley patching design, provides quantitative data support, and ensures that the optimized results are superior to those before optimization in all indicators, thus enhancing the scientific rigor and practicality of the design.
Smart Images

Figure CN120277758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer-aided design, geographic information systems, street patching technology, and urban renewal, specifically to a method for patching historical urban streets based on genetic algorithms. Background Technology
[0002] Urban development has shifted from extensive incremental expansion to a focus on the renewal and optimization of existing infrastructure. During periods of rapid growth, the focus of urban development tended to be on new towns, easily overlooking the contradiction between high population density and insufficient transportation capacity in older urban areas.
[0003] Historic city districts are areas within old urban areas characterized by highly concentrated functions and a dense street and alleyway system. However, due to factors such as the protection of historical and cultural elements and the boundaries of property rights, the existing streets and alleys in historic city districts are mostly pedestrian-friendly, narrow in scale, and unable to meet the main commuting needs of residents, resulting in problems such as uneven density, poor continuity, and low traffic efficiency. Therefore, in-depth exploration and improvement of the street and alleyway system in historic city districts, through scientific and rational planning and design to enhance the connectivity and density of streets and alleys and improve traffic efficiency, has become an important issue that urgently needs to be addressed in urban renewal practices.
[0004] In past practices of historical urban renewal, designers have needed to conduct on-site surveys and data collection to obtain basic site information, identify street and alley networks with traffic potential, and then analyze the data through traffic simulation and environmental assessment, ultimately relying on experience to complete the street and alley network design. However, traditional methods suffer from problems such as inconsistent evaluation standards, low design process efficiency, and high weighting of subjective judgment. Traditional street and alley generation methods, such as tensor fields, L-systems, and finite element meshes, are mainly suitable for regular new development areas, but they show insufficient adaptability in complex built environments and struggle to handle irregular plots and diverse spatial needs. Furthermore, these methods lack a systematic optimization mechanism based on multiple evaluation indicators, failing to effectively balance the density, uniformity, and functionality of the street and alley network, thus limiting the ability to finely optimize the street and alley structure. Summary of the Invention
[0005] The purpose of this invention is to provide a method for patching historical urban streets and alleys based on genetic algorithms. This invention utilizes genetic algorithms to optimize and iteratively evaluate original street and alley axis data, ensuring that the generated street and alley axes meet the region's traffic needs and spatial layout, and adapt to the complex structural characteristics of historical urban areas. Ultimately, evaluation indicators are formed to provide quantitative data support for designers, thereby providing more scientific and systematic guidance for the patching design of historical urban streets and alleys.
[0006] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:
[0007] A method for patching historical urban streets and alleys based on genetic algorithms includes the following steps:
[0008] A. Obtain map data and street axis data of the historical urban area, and import the integrated DXF file into the interactive platform;
[0009] B. Implement a genetic algorithm based on street and alley patching function using the GeneticSharp framework. Add the map data and street and alley axis data obtained in step A to the genetic algorithm, perform iterative evaluation, and obtain the optimal street and alley axis.
[0010] The genetic algorithm specifically includes the following sub-steps:
[0011] B1. Initialization;
[0012] B2. The genetic algorithm generates an axis topology network based on the results of each iteration to evaluate fitness. A fitness function F is set, which is based on multiple street and alley evaluation indicators. The larger the value of the target fitness function F, the more the street and alley meet the requirements in these street and alley evaluation indicators.
[0013] F = S Ratio +S Density +S Efficiency +S Evenness +S MeanDepth ,in,
[0014] S Ratio The evaluation indicator is the proportion of street and alley length; S Density The density of the second street and alleyway is used as an evaluation indicator;
[0015] S Efficiency The evaluation index is the efficiency of three streets and alleys; S Evenness The evaluation index is the evenness of the four plots; S MeanDepth The evaluation metric is topology depth;
[0016] C. Visualize the optimal street and alley axis obtained in step B in the interactive platform, and intuitively display the dynamic change trend of the optimization process through the visualization of the fitness evolution curve.
[0017] Beneficial Effects: This invention addresses street and alleyway patching in urban renewal. It uses a genetic algorithm to simulate various street and alleyway configuration schemes in historical urban areas. Through continuous optimization and iterative cycles, it seeks the optimal solution, avoiding information loss caused by subjective bias in human judgment amidst complex influencing factors, thus improving the scientific rigor and accuracy of the results. Furthermore, by introducing multiple types of street and alleyway evaluation indicators and clear evaluation standards, it ensures that the optimized street and alleyway patching results are superior to the unoptimized results in all indicators, providing a scientific basis for the quantitative evaluation of street and alleyway patching results and enhancing the accuracy and practicality of the street and alleyway patching method.
[0018] In one optional implementation, step A specifically includes the following sub-steps:
[0019] A1. Obtain map data from open-source platforms, determine the scope of street and alley patching, classify the selected historical urban area texture DXF file into layers, extract the plot boundaries, building outlines, road axes and the information of the street and alley axes to be optimized, and convert the above information into Map file format;
[0020] A2. The acquired road axis data is processed by intersection extraction, axis splitting, and deduplication to ensure reasonable connection with the existing road network. The final generated axis includes the axis start point, axis end point, and whether the axis is connected to the original road network, as well as a complete topology structure, laying the data foundation for subsequent optimization calculations.
[0021] Beneficial effects: This invention acquires map data from open-source platforms using big data, integrates it with extracted street and alleyway axis data, and performs data classification processing. This solves the problem of the large workload associated with traditional manual data collection methods, thus improving efficiency.
[0022] In one optional implementation, step B includes the following two evaluation criteria:
[0023] Evaluation Criterion 1: Street and alley density reaches 8.0 km / km², street and alley length ratio is 0.5 to 0.7, and plot uniformity is 1:2 to 2:3;
[0024] Evaluation Criterion 2: The five indicators of street density, street length ratio, plot uniformity, street efficiency, and topological depth have all improved compared to the evaluation before optimization.
[0025] Beneficial effects: This invention combines rigid and flexible evaluation conditions to ensure that the optimization results meet planning standards, while allowing for adaptive adjustments. Setting thresholds can reduce computational load, improve optimization efficiency, accelerate convergence, and ensure the rationality and adaptability of street network optimization.
[0026] In an optional implementation, step B1 initialization specifically involves: user-defined maximum population size (maxPopulationSize) and minimum population size (minPopulationSize); setting an initial population, where each chromosome (RoadNetChromosome) represents a possible street / alley configuration scheme; the gene encoding on each individual represents a minimum generating block, which is a basic spatial unit based on block partitioning theory, divided into trunk-to-trunk, trunk-to-branch, and branch-to-branch divisions, possessing a set of spatial attributes for genetic algorithms. The gene stores the axis result of this minimum generating block.
[0027] The above content has been re-encoded and implemented based on the GeneticSharp framework. The key objects and their related formulas in the encoding structure are as follows:
[0028] a) Chromosome representation: The encoding format of each chromosome in RoadNetChromosome is as follows:
[0029] RoadNetChromosome={G1,G2,…,Gn}
[0030] Where Gi represents the i-th gene, corresponding to a minimum generating block, and n is the number of minimum generating blocks in the population;
[0031] b) The expression formula for Gi encoded by each gene is:
[0032] Gi=(Li, Fi, Bi), Li={Li1, Li2,..., Lim}, where,
[0033] Li: Represents the state of the axis in the minimum generating block: where Lij∈{0,1}, represents the state of the j-th axis in the i-th generating block, Lij=1 indicates that the axis is enabled, Lij=0 indicates that the axis is not enabled, and m is the number of axes contained in the generating block;
[0034] Fi: Fitness score, used to evaluate fitness.
[0035] Bi: Boolean flag used to determine whether the minimum generated block unit participates in the optimization calculation. Bi = 1 indicates that the minimum generated block unit participates in the calculation, and Bi = 0 indicates that the minimum generated block unit does not participate in the calculation.
[0036] Beneficial Effects: This invention enables efficient and adaptive street network generation by using user-defined population parameters combined with the GeneticSharp framework for intelligent optimization. It employs chromosome encoding to express street configuration schemes and combines this with topological connectivity to achieve a flexible optimization search space. Boolean tagging control ensures operability and constraint consistency during street optimization, improving computational efficiency.
[0037] In an optional implementation, in step B2, the plot uniformity is used to measure the area ratio of plots enclosed by streets and alleys, and is defined as the length-to-width ratio of the sub-plots formed by the division, so as to ensure the coordination and uniformity of the street and alley plots.
[0038] The topological depth is calculated based on the network topology, representing the average number of steps or distance from any street / alley node to other nodes in the entire network, and serves as an indicator of the spatial distribution depth and connectivity of the street / alley network.
[0039] Beneficial effects: This invention uses the evaluation index of plot uniformity to ensure the coordination and uniformity of street and alley blocks, and uses the evaluation index of topological depth as an indicator to measure the spatial distribution depth and connectivity of street and alley networks. Through clear quantitative indicators, optimization decisions are made, thereby making the design results more scientific and logical.
[0040] In an optional implementation, in step B2, the calculation rule for the scoring function S of each evaluation index is as follows: where V is the measured index value and B is the benchmark index value:
[0041] a) For the three indicators of street density, street length ratio and land parcel uniformity, if the measured indicator value V is not within the threshold range preset by evaluation standard 1: S = -1;
[0042] b) For the street efficiency index, the higher the value of V, the better the street performance: S=(VB) / B*10;
[0043] c) For the topology depth index, the lower the value V, the better the street performance: S=(BV) / B*10.
[0044] Beneficial effects: This invention makes street network optimization quantifiable and assessable by setting calculation rules for evaluation indicators. By comparing benchmark indicators with measured values, scoring is normalized, making different evaluation indicators comparable. Based on threshold settings and scoring functions, areas requiring optimization can be quickly identified, improving optimization efficiency.
[0045] In an optional implementation, step B3 further optimizes the computational units of the system. Specifically, during system runtime, each computational unit is first initialized, and a chromosome and its corresponding map data copy are allocated to each unit to ensure that each unit can independently execute the evaluation task. Data synchronization between computational units is achieved through a locking mechanism to avoid race conditions and ensure the consistency and accuracy of fitness calculations. The relevant formulas are as follows:
[0046] The system processes multiple computing units in parallel:
[0047] {F1, F2,...,FN}={Fitness(C1,D1),Fitness(C2,D2),...,Fitness(CN,DN)}
[0048] Among them, F i For the fitness score of the i-th chromosome, C i For the i-th chromosome, D i To be with C i Corresponding map data, and ensure This means ensuring that the computational unit does not generate duplicate or conflicting solutions during the optimization process.
[0049] Beneficial effects: This invention improves optimization efficiency and solution stability through computational unit initialization and parallel computing. It employs chromosome and map data matching, combined with constraint mechanisms to prevent conflicts, ensuring the consistency, accuracy, and operability of the optimization scheme, thus enhancing the reliability of street network optimization.
[0050] In an optional implementation, the method further includes outputting the optimization results of step C, specifically: outputting the street and alley configuration scheme with the highest fitness based on the default number of iterations or the user-defined number of iterations, and visually displaying the street and alley layout and evaluation metrics before and after optimization using the Unity engine, wherein:
[0051] a) The formula for expressing the optimal configuration scheme is:
[0052] BestChromosome=argmaxF(RoadNetChomosomei)
[0053] b) Visualization of optimization of street and alley evaluation indicators: Based on topological depth, plot uniformity, street and alley density, road network connectivity, and street and alley length ratio, the changes in indicator values before and after optimization are quantified, and the improvement rate of each indicator is displayed through charts:
[0054]
[0055] Among them, I k For the k-th indicator, the optimized improvement rate ΔI k It is used to display the fitness changes in each iteration during the optimization process through curves, providing dynamic visualization of the optimization process.
[0056] Beneficial effects: This invention provides an intuitive performance evaluation by quantifying the changes in street and alleyway indicators before and after optimization. Combined with fitness evolution curves, the optimization process is visualized, improving the transparency and operability of the solution. It also supports dynamic adjustment of optimization strategies, enhancing the scientific rigor and efficiency of street and alleyway configuration schemes.
[0057] In one alternative implementation, the interaction platform uses the Unity platform. Attached Figure Description
[0058] Figure 1 This is a flowchart of the method of the present invention;
[0059] Figure 2 Schematic diagram of genetic algorithm encoding;
[0060] Figure 3 Ideal model - superimposed street and alley axis diagram based on basic conditions;
[0061] Figure 4 Ideal model - optimized generation graph;
[0062] Figure 5 Current Status Model - Overlay of Basic Conditions and Street Axis Map;
[0063] Figure 6 Current situation model - optimized generation diagram. Detailed Implementation
[0064] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific implementation examples, so that those skilled in the art can better understand the present invention and implement it. However, the embodiments described are not intended to limit the present invention.
[0065] This invention discloses a method for patching historical urban streets and alleys based on genetic algorithms. The specific method flow is as follows: Figure 1 As shown, the process first acquires map and street axis data and processes the data. Then, a genetic algorithm is used to optimize the street layout, and multiple indicators, such as node depth and street uniformity, are used for evaluation. Finally, based on the evaluation results, it is determined whether adjustments are needed, and the final street layout is output. A schematic diagram of the genetic algorithm encoding used in this process is shown below. Figure 2 As shown, the process includes the following steps:
[0066] 1. Obtain relevant data on city maps and street axes, identify basic elements, and create street and alleyway files.
[0067] 1.1. First, import the geographic data using the map import function, and identify the street and alley levels and current features within the classified blocks, such as arterial roads, secondary roads, streets and alleys, ordinary buildings, historical buildings, water systems, and enclosed areas. These features will serve as the basic data for street and alley generation.
[0068] 1.2. Import the DXF format file into the Unity application platform, overlay and analyze the various data layers to obtain a complete MAP format street map, such as... Figure 3 As shown, save the map for future use. When opening the same map a second time, click the "Load Map" option.
[0069] 1.3. In Map Management - Basic Information, you can view detailed geometric information such as existing streets, buildings, and areas. The location of basic elements on the He County map can be viewed by referring to the legend.
[0070] 2. Add the initially generated street and alley axis lines to the genetic algorithm for iterative evaluation.
[0071] 2.1. Click Optimize - Create Genetic Algorithm Unit, and select the streets and alleys that need to be optimized. The genetic algorithm will then optimize the initially generated street and alley axes. The algorithm will iterate according to the set optimization objectives to find a better solution.
[0072] In this embodiment, the specific steps of the genetic algorithm are as follows:
[0073] B1. Initialization: The user defines the maximum and minimum population size (maxPopulationSize and minPopulationSize). An initial population is set, where each chromosome (RoadNetChromosome) represents a possible street / alley configuration. Each individual's gene encodes a minimum generating block, a basic spatial unit based on block partitioning theory, consisting of trunk-to-trunk, trunk-to-branch, and branch-to-branch divisions, possessing a set of spatial attributes for genetic algorithms. The gene stores the axis results of this minimum generating block.
[0074] The above content has been re-encoded and implemented based on the GeneticSharp framework. The relevant formulas for each step are as follows:
[0075] g) Population initialization:
[0076] PopulationSize=min(maxPopulationSize,max(minPopulationSize,N))
[0077] Where N is the number of initial population proposals estimated based on the size or complexity of the region;
[0078] h) Chromosome representation: The encoding format of each chromosome in RoadNetChromosome is as follows:
[0079] RoadNetChromosome={G1,G2,…,Gn}
[0080] Where Gi represents the i-th gene, corresponding to a minimum generating block, and n is the number of minimum generating blocks in the population;
[0081] i) The expression formula for Gi encoded by each gene is:
[0082] Gi=(Li, Fi, Bi), Li={Li1, Li2,..., Lim}, where
[0083] 7) Li: Represents the axis status in the minimum generating block: where Lij∈{0,1}, represents the status of the j-th axis in the i-th generating block, Lij=1 indicates that the axis is enabled, Lij=0 indicates that the axis is not enabled, and m is the number of axes contained in the generating block;
[0084] 8)Fi: Fitness score, used to evaluate fitness;
[0085] 9) Bi: Boolean flag used to determine whether the minimum generated block unit participates in the optimization calculation. Bi = 1 indicates that the minimum generated block unit participates in the calculation, and Bi = 0 indicates that the minimum generated block unit does not participate in the calculation.
[0086] B2. The genetic algorithm generates an axis topology network based on the results of each iteration to evaluate fitness. The fitness function is defined as RoadNetFitness(F), which is based on multiple street and alley evaluation indicators, including: Indicator 1, the proportion of street and alley length S. Ratio Indicator 2: Street and alley density S Density Indicator 3: Street and alley efficiency (S) Efficiency Indicator 4: Land Parcel Evenness S Evenness Indicator 5: Topology Depth S MeanDepth ;
[0087] The above indicators are converted into scoring functions, and the calculation rules for the scoring function S of each indicator are as follows:
[0088] a) The basic score calculation rule is: S=(VB) / B*10, where V is the measured index value and B is the benchmark index value;
[0089] b) If the measured value V is not within the threshold range: S = -1;
[0090] c) If the baseline score is 1: S = V * 10;
[0091] d) The lower the measured index, the better the street / alley performance: S=(BV) / B*10;
[0092] The fitness function is obtained by summing up the various indices Si.
[0093] F = S Ratio +S Density +S Efficiency +S Evenness +S MeanDepth ,
[0094] The larger the value of the objective function F, the better the streets and alleys meet the requirements of these evaluation indicators;
[0095] B3. Optimized System Computational Units: This system improves computational efficiency through the parallel execution of multiple computational units. Each unit independently undertakes the task of calculating chromosome fitness, i.e., evaluating each map scheme, thereby achieving efficient multi-threaded processing. During runtime, the system first initializes each computational unit, allocating one chromosome and its corresponding map data copy to each unit, ensuring that each unit can independently execute the evaluation task. Data synchronization between computational units is achieved through a locking mechanism to avoid race conditions and ensure the consistency and accuracy of fitness calculations.
[0096] B4. Output of Optimization Results: Finally, based on the default number of iterations or a user-defined number of iterations, the BestChromosome street and alley configuration scheme with the highest fitness is output. The street and alley layouts and evaluation metrics before and after optimization are visualized using the Unity engine, including:
[0097] a) The formula for expressing the optimal configuration scheme is:
[0098] BestChromosome=argmax F(RoadNetChromosomei)
[0099] b) Visualization of optimization of street and alley evaluation indicators: Based on indicators such as topological depth, plot uniformity, street and alley density, road network connectivity, and the proportion of street and alley length, the changes in indicator values before and after optimization are quantified, and the improvement rate of each indicator is displayed through charts:
[0100]
[0101] Among them, I k For the k-th indicator, the optimized improvement rate ΔI k It is used to display the fitness changes of each iteration in the optimization process through curves, providing dynamic visualization of the optimization process, allowing designers to clearly understand the convergence of the objective function and the efficiency of improvement;
[0102] 2.2 The optimized objective function is based on the flexible optimization conditions of streets and alleys, including indicators such as street and alley length and proportion, street and alley density, street and alley efficiency, plot uniformity, and average topological depth. Users can view the changing trends of each indicator in real time through the interface.
[0103] 2.3 Users can control the street generation process by adjusting the number of iterations or setting a maximum time threshold for optimization. The generated streets will be displayed through a visual interface in the program, allowing users to intuitively view and evaluate the results.
[0104] 2.4 Users can modify and set the display style, global parameters, and evaluation weights in the style and settings to obtain more reasonable street and alley results.
[0105] 2.5 After completing the optimization process, the system will output the final optimized street and alley layout, as shown below. Figure 4 The ideal model shown is used to generate an optimized map. The final street layout can be exported in DXF format for use in practical urban planning and architectural design.
[0106] The following is combined Figures 5-6 Taking a historical district in He County, Ma'anshan City, Anhui Province as an example, this example further illustrates the method used in this case study:
[0107] 1. Obtain relevant city map data, identify basic elements, and create street and alleyway files. This area is functionally defined as a historical district. Import the vector data of the prototype plan from the reference case into the AutoCAD software platform, classify the data according to layers, convert it into polylines, and store it in DXF format. Import the DXF into the Unity platform, identify street and alleyway levels and current features, and create a street and alleyway MAP file, resulting in... Figure 5 The current model shown is based on the superimposed street and alley axis of the basic conditions.
[0108] 2. Add the initially determined street and alleyway axes to the genetic algorithm for iterative evaluation. Select all plots, set the population threshold to 100-150, and click "Start" to begin the genetic algorithm operation. After setting the iteration time to 240 minutes, the highest score was obtained in generation 25. Click "Show Best Results" to obtain the following... Figure 6 The current situation model shown is the optimized generation diagram.
[0109] 3. After the genetic algorithm completes its iterations, the generated optimal street and alleyway axis scheme is comprehensively evaluated using a series of street and alleyway evaluation metrics. These metrics include topological depth, plot uniformity, street and alleyway density, road network connectivity, and street and alleyway length ratio. Each metric serves as a flexible condition to measure the optimization effect of the road network and determine the degree to which the optimization objective is achieved.
[0110] Within the Unity platform, visualization tools dynamically present the increase and decrease curves of various indicators during each iteration update. Designers can view the trend of indicator optimization in real time and identify key improvement directions during the optimization process. Simultaneously, by comparing the final iteration results with the road network indicators before optimization, the improvement rate of each indicator is calculated, providing a visually quantifiable measure of the road network optimization effect.
Claims
1. A method for patching historical urban streets and alleys based on genetic algorithms, characterized in that, Includes the following steps: A. Obtain map data and street axis data of the historical urban area, and import the integrated DXF file into the interactive platform; B. Implement a genetic algorithm based on street and alleyway patching using the GeneticSharp framework. Add the map data and street and alleyway axis data obtained in step A to the genetic algorithm, perform iterative evaluation, and obtain the optimal street and alleyway axis. The genetic algorithm specifically includes the following sub-steps: B1. Initialization: Set the hyperparameters of the genetic algorithm; B2. The genetic algorithm generates an axis topology network based on the results of each iteration to evaluate fitness. A target fitness function F is set, which is based on multiple street and alley evaluation indicators. The larger the value of the target fitness function F, the better the street and alley meet the requirements of these evaluation indicators; F = S Ratio +S Density +S Efficiency +S Evenness +S MeanDepth ,in, S Ratio The evaluation indicator is the proportion of street and alley length; S Density The second evaluation indicator is the density of streets and alleys; S Efficiency The evaluation index is the efficiency of three streets and alleys; S Evenness The evaluation index is the evenness of the four plots; S MeanDepth The fifth evaluation metric is topology depth; C. Visualize the optimal street and alley axis obtained in step B in the interactive platform, and intuitively display the dynamic change trend of the optimization process through the visualization of the fitness evolution curve. Step B1 initialization specifically involves: The user defines the maximum population size (maxPopulationSize) and minimum population size (minPopulationSize); an initial population is set, where each chromosome (RoadNetChromosome) represents a possible street / alley configuration scheme; the gene encoding on each individual represents a minimum generating block, which is a basic spatial unit based on block partitioning theory, consisting of trunk-to-trunk, trunk-to-branch, and branch-to-branch divisions, possessing a set of spatial attributes for genetic algorithms, and storing the axis results of this minimum generating block in the gene; the above content is re-encoded and implemented based on the GeneticSharp framework, and the key objects and related formulas in the encoding structure are as follows: a) Chromosome representation: The encoding form of each chromosome RoadNetChromosome is: RoadNetChromosome={G1,G2,…,Gn} where Gi represents the i-th gene, corresponding to a minimum generating block, and n is the number of minimum generating blocks in the population; b) The expression formula for each gene encoding Gi is: Gi = (Li, Fi, Bi), Li = {Li1, Li2, ..., Lim}, where Li: represents the axis status in the minimum generation block: where Lij ∈ {0, 1}, represents the status of the j-th axis in the i-th generation block, Lij = 1 indicates that the axis is enabled, Lij = 0 indicates that the axis is not enabled, and m is the number of axes contained in the generation block; Fi: fitness score, used for fitness evaluation; Bi: Boolean flag, used to determine whether the minimum generation block unit participates in the optimization calculation, Bi = 1 indicates that the minimum generation block unit participates in the calculation, and Bi = 0 indicates that the minimum generation block unit does not participate in the calculation.
2. The historical urban street and alley patching method based on genetic algorithm according to claim 1, characterized in that, Step A specifically includes the following sub-steps: A1. Obtain map data from open-source platforms, determine the scope of street and alley patching, classify the selected historical urban area texture DXF file into layers, extract the plot boundaries, building outlines, road axes and the information of the street and alley axes to be optimized, and convert the above information into Map file format; A2. The acquired road axis data is processed by intersection extraction, axis splitting and deduplication to enable it to be reasonably connected with the existing road network. The final generated axis includes the axis start point, axis end point, and whether the axis is connected to the original road network, as well as a complete topology structure, laying the data foundation for subsequent optimization calculations.
3. The historical urban street and alley patching method based on genetic algorithm according to claim 1, characterized in that, In step B, the iterative evaluation includes the following two evaluation criteria: Evaluation criterion 1: street density reaches 8.0 km / km², street length ratio is 0.5 to 0.7, and plot uniformity is 1:2 to 2:3; Evaluation criterion 2: the five indicators of street density, street length ratio, plot uniformity, street efficiency, and topology depth are all improved compared to the evaluation before optimization.
4. The historical urban street and alley patching method based on genetic algorithm according to claim 1, characterized in that, In step B2, the evaluation index four, plot uniformity, is used to measure the area ratio of plots enclosed by streets and alleys. It is defined as the aspect ratio of the sub-blocks formed by the division, so as to ensure the coordination and uniformity of the street and alley blocks. The evaluation index five, topological depth, is calculated based on the network topology structure to determine the average number of steps or distance from any street or alley node to other nodes in the entire network. It serves as an indicator to measure the spatial distribution depth and connectivity of the street and alley network.
5. The historical urban street and alley patching method based on genetic algorithm according to claim 3, characterized in that, In step B2, the calculation rule for the scoring function S of each evaluation indicator is as follows, where V is the measured indicator value and B is the benchmark indicator value: a) For the three indicators of street density, street length ratio and land parcel uniformity, if the measured indicator value V is not within the threshold range preset by evaluation standard 1: S = -1; b) For the street efficiency index, the higher the value of V, the better the street performance: S=(VB) / B*10; c) For the topology depth index, the lower the value V, the better the street performance: S=(BV) / B*10.
6. The historical urban street and alley patching method based on genetic algorithm according to claim 1, characterized in that, Step B3 also optimizes the computational units of the system. Specifically, during system runtime, each computational unit is first initialized, and a chromosome and its corresponding map data copy are allocated to each unit to ensure that each unit can independently execute the evaluation task. Data synchronization between computational units is achieved through a locking mechanism to avoid race conditions and ensure the consistency and accuracy of fitness calculations. The relevant formula is as follows: The system processes multiple computational units in parallel: {F1, F2, ..., FN} = {Fitness(C1, D1), Fitness(C2, D2), ..., Fitness(CN, DN)} where, F i For the fitness score of the i-th chromosome, C i For the i-th chromosome, D i To be with C i Corresponding map data, and ensure This formula is a constraint function that ensures that there will be no conflict in the allocation of computational units during the optimization process, so as to avoid duplicate or unreasonable solutions during the optimization process.
7. The historical urban street and alley patching method based on genetic algorithm according to claim 6, characterized in that, It also includes the output of the optimization results in step B4, specifically: outputting the street and alley configuration scheme with the highest fitness based on the default number of iterations or the user-defined number of iterations, and visually displaying the street and alley layout and street and alley evaluation indicators before and after optimization through an interactive platform, where: a) the formula for the optimal configuration scheme is: BestChromosome=argmaxF(RoadNetChromosomei) b) visualization of the optimization content of street and alley evaluation indicators: based on the indicators of topology depth, plot uniformity, street and alley density, road network connectivity, and street and alley length ratio, the changes in indicator values before and after optimization are quantified, and the improvement rate of each indicator is displayed through charts: Among them, I k For the k-th indicator, the optimized improvement rate ΔI k It is used to display the fitness changes in each iteration during the optimization process through curves, providing dynamic visualization of the optimization process.
8. The historical urban street and alley patching method based on genetic algorithm according to claim 1, characterized in that, In step C, the interactive platform uses the Unity platform.