Highway Relocation Design Method Driven by Large Language Model
Through the large language model and the improved artificial potential field MAPF algorithm, the problem of road transformation design at railway intersections is solved, automatic generation and optimization is realized, cost saving and vegetation damage is reduced, and the application potential of the large language model in the field of intelligent highway line selection is demonstrated.
Patent Information
- Application Number
- CN202411592543.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The existing technology lacks mature solutions in the design of highway relocation at railway intersections, resulting in problems such as chaos in construction sequences and engineering safety contradictions. Moreover, heuristic algorithms are prone to falling into local optimality and it is difficult to find the optimal solution.
The highway modification design method driven by a large language model is adopted, combined with prompt engineering and improved artificial potential field MAPF algorithm, and the preliminary corridor belt design scheme is generated through natural language processing technology, and the artificial potential field algorithm with multiple control points is optimized, considering multiple constraints.
It realizes the automated generation of highway modification design, saves manpower and time costs, can produce a large number of alternative solutions, optimizes the effect better than genetic algorithms, reduces project costs and reduces vegetation damage.
Smart Images

Figure CN119622871B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of road engineering, and more specifically, to a highway relocation design method driven by a large language model. Background Art
[0002] When railways are constructed, it is inevitable that they will pass through existing highway networks, cutting off existing highways to form many intersections. In order to restore the traffic capacity of the highway network, highway relocations are required. Since a grade separation with the railway is required at this time, various constraint conditions such as azimuth angle, intersection angle, and alignment geometry usually need to be satisfied to ensure smooth connection with the existing highway. Otherwise, it is easy to pose potential traffic safety hazards, which is a situation with relatively high difficulty and large application scenarios in highway relocations. Due to the shortage of urban land and the scarcity of high-quality traffic corridors, problems such as chaotic construction sequences and engineering safety contradictions are likely to occur in highway relocations. Moreover, the actual relocation projects involve a large number of highways. It is difficult to find the optimal solution under limited time costs and multiple scenarios. Therefore, it is necessary to adopt an intelligent route selection method for auxiliary design. At present, scholars at home and abroad have carried out extensive research in the field of highway intelligent route selection. Among them, heuristic algorithms have been widely used due to their high efficiency and high robustness: for example, heuristic algorithms such as genetic algorithms, ant colony optimization algorithms, and meta-electromagnetism-like algorithms are used for linear optimization of horizontal or vertical profiles; some scholars have proposed the HybridA* algorithm based on a heuristic navigation algorithm, which can conduct near-global optimization exploration in three-dimensional space, generate routes that retain accurate horizontal, vertical, and cross-sectional geometric information and conform to spatial constraints, providing a new perspective for highway intelligent route selection; some scholars have proposed a route selection model considering the risk and cost of hazardous material transportation based on game theory and used a heuristic shortest path algorithm for solution; some scholars have used an improved motion planning algorithm to sample horizontal intersections; some scholars have used a discrete algorithm to solve multiple approximate optimal path solutions in different spaces as alternative options in the decision-making process for finding the optimal corridor.
[0003] Due to problems such as heuristic algorithms being trapped in local optima and unable to guarantee the optimal solution, some scholars have also accurately calculated and solved cross-section parameters for linear optimization based on BIM and GIS-related technologies. For example, some scholars have verified and tested the feasibility of BIM technology in cross-section calculation for three-dimensional road alignment optimization. However, in order to reduce the calculation cost, many strategies are also considered to simplify the cross-section parameters, such as simplifying the cross-section shape or slope, and using predefined decision spaces to reduce the search space.
[0004] It can be seen that although there have been relatively rich research accumulations in the field of intelligent highway route selection, there is less research on highway relocation, especially at railway intersections: some scholars have developed an optimization model for railway intersections and used the distance transformation (DT) algorithm for solution, but the speed and accuracy of the solution have greater limitations; some scholars have proposed a customized Dijkstra algorithm to assist in highway search, but due to algorithm limitations, a series of constraints of the highway are not fully considered during the search. Thus, it can be seen that there is currently a lack of relatively mature solutions to such highway relocation design problems.
[0005] In recent years, related technologies of generative artificial intelligence (AIGC), including generative adversarial networks (GAN) and large pre-trained deep learning models, namely large language models (LLM), have developed rapidly. Especially after large models possess multimodal capabilities later, the application prospects and development space of large models have been significantly improved, and they have gradually demonstrated excellent capabilities in natural language processing tasks and various professional fields. Therefore, some professional fields have also started to conduct research and applications on them: for example, LLM can be applied to the path planning of robots to improve the efficiency of traditional search algorithms and assist in programming performance drive; in addition, a series of large model frameworks emerging in the transportation field, such as TrafficGPT and TrafficSafetyGPT, can be applied to the planning and design, project management, operation and maintenance, disaster protection, etc. of transportation infrastructure projects, providing data-driven support for multi-faceted decision-making tasks in complex multi-modal transportation systems; some scholars have proposed a multi-modal transportation large model MT-GPT based on the hierarchical "point-line-plane" of traffic topology structure and discussed the application prospects of large models in aspects such as traffic planning and management, and infrastructure construction. It can be seen that although there is more research on LLM in the field of urban transportation currently, there has been no relevant research in the field of road engineering, especially in route design. Summary of the Invention
[0006] The content of the present invention is to provide a highway relocation design method driven by a large language model, which realizes the automatic generation of a preliminary corridor belt design scheme by using natural language processing technology, saves the labor and time costs in the route pre-selection stage, and can produce a large number of alternative schemes to assist in the design.
[0007] A highway relocation design method driven by a large language model according to the present invention includes the following steps:
[0008] Step 1) Coarse selection is carried out by using a large language model and prompt engineering to select a corridor belt;
[0009] Step 2) Optimization is carried out by an improved artificial potential field MAPF algorithm.
[0010] Preferably, in step 1), the specific steps are as follows:
[0011] 1.1) Pre-train the large language model;
[0012] 1.2) Input prompt words into the large language model, including data, constraints, and requirements;
[0013] 1.3) After path fine-tuning using the prompt words, export the path points;
[0014] 1.4) Process the path points generated by the large language model to obtain a series of control points;
[0015] 1.5) Use all corridors with control points as the source of gravitational force in the artificial potential field.
[0016] Preferably, in step 2), the specific steps are as follows:
[0017] 2.1) Establish a particle model and initialize the velocity, movement direction, and position;
[0018] 2.2) Select the source of repulsive force in the artificial potential field and its target range according to the actual situation;
[0019] 2.3) Initialize the attractive and repulsive force gain coefficients and perform MAPF using the particle model;
[0020] 2.4) Determine whether it is within the repulsive force range. If so, update the particle velocity, position, and movement direction information according to the resultant force and the current state, and proceed to the next step; if not, maintain the particle movement state according to the current state and proceed to the next step;
[0021] 2.5) Determine whether the constraint conditions are met. If so, proceed to the next step; if not, return to step 2.3);
[0022] 2.6) Determine whether all control points have been passed. If so, proceed to the next step; if not, return to step 2.4);
[0023] 2.7) Use the least squares method to fit the curve segment to meet the standard.
[0024] Preferably, in the improved artificial potential field MAPF algorithm, the control points output by the large language model in the corridor rough selection stage are used as the source of the gravitational potential field, and the obstacles, restricted areas, and vegetation areas in the actual project are regarded as the source of the repulsive potential field. By dynamically and real-time adjusting the movement state of the particle in the attractive and repulsive potential fields, the path planning is iteratively optimized.
[0025] Preferably, in the improved artificial potential field MAPF algorithm, the gravitational potential field formula U att (q) and the gravitational function F att (q) are composed of a series of vector combinations, as shown in the following formula:
[0026]
[0027] U att,n = 0, when ρ(q, q contral,n ) > ρ n
[0028]
[0029] F att,n = 0, when ρ(q, q contral,n ) > ρ n
[0030] where: α is the gravitational gain coefficient, and the same value is adopted for different control points; q is the current spatial position of the mass point; q contral,n is the spatial position of the nth control point; ρ(q, q contral,n ) is the Euclidean distance from the current point to the nth control point; ρ n is the target range of the nth control point, that is, the minimum distance that will affect the movement of the mass point; U att,n (q), F att,n (q) are the gravitational potential field and gravitational force of the nth control point respectively;
[0031] The formula for the repulsive potential field U rep (q) and the repulsive force function F rep (q) are as follows:
[0032]
[0033] where: β n is the repulsive gain coefficient of the nth repulsive force source; q is the current spatial position of the mass point; qobs is the spatial position of the obstacle; q goal is the spatial position of the target end point; ρ n is the target range of the nth repulsive force source; ρ(q, q obs ) is the Euclidean distance from the current point to the obstacle; U rep,n (q), F rep,n (q) are the repulsive potential field and repulsive force of the nth control point respectively.
[0034] Preferably, the objective function of the improved artificial potential field MAPF algorithm is:
[0035] Select the total cost of route construction as the objective function, as shown in the following formula:
[0036] C c = C e + C b + C l + C v
[0037] Where: C c is the total construction cost; C e is the earthwork cost; C b is the bridge cost; C l is the construction cost related to the length; C v is the vegetation damage cost;
[0038] The calculation method of the earthwork cost C e is shown in the following formula:
[0039]
[0040] Where: when a0 = 1, it represents a full excavation section; when a1 = 1, it represents a full filling section; when a2 = 1, it represents a half - filling and half - excavation section; A wi , A ti are the excavation and filling areas of the i - th cross - section; p t , p w are the filling and excavation unit prices; L Ei is the length of the i - th cross - section;
[0041] The calculation method of the bridge cost C b is shown in the following formula:
[0042]
[0043] Where: n b is the number of bridges along the whole line; p bi is the unit construction cost of the i - th bridge; l bi is the length of the i - th bridge; C ai is the construction cost of the abutment of the i - th bridge;
[0044] The construction cost C l related to the length is as follows:
[0045] C l = p li × L li
[0046] Where: p li is the unit land acquisition cost when the route passes through different regions; L li is the route length;
[0047] The vegetation damage cost is calculated by multiplying the vegetation area obtained by supervised classification by the unit cost of the vegetation. The vegetation area is obtained according to the green area in the grid file passed through by the route, as shown in the following formula:
[0048] C v = p v × ∑n grid×s grid
[0049] Where: C v is the cost of vegetation damage; p v is the unit cost of regional vegetation; n grid is the number of vegetation grids crossed by the route; s grid is the area size of the grid.
[0050] Preferably, the relevant constraints of the improved artificial potential field MAPF algorithm are:
[0051] a) Geometric constraints
[0052] Among them, the plane geometric constraints usually include: the combined constraints of curves and straight lines, the minimum curve radius constraint, the minimum curve length constraint, and the maximum slope constraint. The above plane geometric constraint conditions are expressed as φ i (P HPI ) ≤ 0, i = 0, 1,..., N + 1, where i represents the i-th plane intersection point and N represents the total number of plane intersection points;
[0053] The vertical section geometric constraints include: the maximum longitudinal slope constraint, the minimum vertical curve radius constraint, and the minimum slope length constraint. The above vertical section geometric constraint conditions are expressed as ψ j (P VPI ) ≤ 0, j = 0, 1,..., M + 1, where j represents the j-th vertical section intersection point and M represents the total number of vertical section intersection points;
[0054] b) Building or structure constraints
[0055] It is expressed as U R and U F are respectively the set of the route area and the set of all restricted areas;
[0056] c) Railway crossing constraints
[0057] The railway crossing constraint conditions of the route are expressed as:
[0058] θ min ≤ θ ≤ 90°
[0059] L p ≤ L pmin
[0060] Δh ≤ |h road -h rail |
[0061] Where: θ min is the minimum value of the railway crossing angle; L p and L pminThey are respectively the distance between piers in the crossable area and the minimum restricted distance; Δh is the vertical clearance of the crossing; h road and h rail respectively represent the heights of the highway and the railway.
[0062] Preferably, in step 1), the corridor belt selection takes into account building or structure constraints and railway crossing constraints.
[0063] The present invention first utilizes the core theoretical framework of large language models and prompt engineering. By introducing exemplary instances in the training stage to guide the model to learn and reproduce these behavior patterns, complex problems are refined into a series of manageable subtasks, thereby achieving the efficient generation of a large number of preliminary screening schemes for corridor belt design using only natural language. After obtaining the preliminary rough selection results of the first stage, the multi-control points artificial potential field algorithm (MAPF) improved based on the robot path planning algorithm is used to further optimize the rough selection results of the corridor belt, including constraint checking, fitting of circular curves, etc. The method proposed by the present invention realizes the automatic generation of preliminary corridor belt design schemes by applying natural language processing technology, saves the manpower and time costs in the route preselection stage, can produce a large number of alternative schemes to assist in the design, and is also higher than the relatively mature genetic algorithm in terms of optimization effect. It is a successful exploration of the application of large language models in highway intelligent route selection. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flowchart of a highway relocation design method driven by a large language model in an embodiment;
[0065] Figure 2 is a schematic diagram of the MAPF algorithm in an embodiment;
[0066] Figure 3 is a schematic diagram of the preprocessing of terrain and ecological data in an embodiment;
[0067] Figure 4 is a schematic diagram of the visual comparison of the schemes in an embodiment;
[0068] Figure 5 is a schematic diagram of the visual comparison of the longitudinal section in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] To further understand the content of the present invention, the present invention will be described in detail with reference to the drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and not for limiting it.
[0070] Embodiment
[0071] As Figure 1As shown in the figure, this embodiment provides a highway relocation design method driven by a large language model, which includes the following steps:
[0072] Step 1) Use the large language model and prompt engineering for rough selection to select the corridor;
[0073] Step 2) Optimize through the improved artificial potential field MAPF algorithm.
[0074] Method for Selecting Corridor of Large Language Model Based on Principle of Prompt Engineering
[0075] Since the algorithms used by untrained large language models are relatively single and it is difficult to make refined adjustments and optimizations for specific actual situations, the principle of prompt engineering can be used to achieve a similar fine-tuning effect and improve the ability of large models to handle professional tasks.
[0076] Prompt Engineering is a technique used to guide and optimize pre-trained models, control and guide the output or behavior of large language models. By enforcing rules, automating processes, etc., it affects the response of large models and ensures that the generated output has specific quality and quantity. The key lies in understanding how to construct effective prompt words to stimulate the best performance of large models, including understanding the capabilities of the models, clearly defining the task requirements, and deeply mastering the language structure and patterns. Even by adjusting the content, format or tone of the prompt, the quality and relevance of the results generated by large models can be significantly affected.
[0077] The core of prompt engineering is the divide-and-conquer algorithm, that is, "divide and conquer" or the Chain of Thought (CoT), which decomposes complex problems into a series of sub-problems and encourages large models to perform intermediate-step reasoning, as Figure 1 shown. Specific methods include self-consistency demonstration, supervised fine-tuning, and generative knowledge, etc. That is, during the training process, examples of correct behavior are provided to guide large models to imitate these examples, allowing large models to continuously learn from examples with derivation steps demonstrated by humans, or organizing Q&A examples in the form of facts and knowledge and then asking targeted questions.
[0078] The selection of the corridor in this embodiment can start from a simple path planning problem, and use the method of combining prompt engineering and fine-tuning to let the large model gradually understand geographic information data, professional terms, and relatively complex constraints, decompose the final task into gradually progressive sub-tasks, and finally complete relatively complex tasks.
[0079] Since the prompt words are different for different specific tasks and scenarios, the types of base large language models used may also be different. Moreover, the output results of large language models are uncertain, and prompt words need to be used in a timely manner to reduce the possibility of hallucinations in large language models. The following uses a relatively simple numerical case as an example to demonstrate the application method of corridor belt selection for large language models based on prompt engineering. The base large language model used is Qwen2:72b open-sourced by Alibaba, and the LORA method is used for fine-tuning of relevant professional terms.
[0080] By leveraging the divide-and-conquer idea of prompt engineering, starting from a simple path planning problem for a relatively complex corridor belt selection problem, during the pre-training stage, the large language model gradually learns from the steps demonstrated by humans and gradually understands the meaning of relevant geographical information data and the constraints of the final case. After the pre-training stage ends, the result of this complex problem can be obtained by further describing the actual case in natural language. Among them, the content of pre-training can be adjusted according to the actual problem, including adding obstacles, changing different algorithms, adding other constraints, etc. After the pre-training stage ends, the selection result of the corridor belt can be quickly generated only using natural language, and subsequent multiple schemes can be generated or the output style can be modified without secondary training.
[0081] In step 1), the specific steps are as follows:
[0082] 1.1) Pre-train the large language model;
[0083] 1.2) Input prompt words into the large language model, including data, constraints, and requirements;
[0084] 1.3) Export the path points after fine-tuning the path using the prompt words;
[0085] 1.4) Process a series of control points from the path points generated by the large language model;
[0086] 1.5) Use all corridor belt control points as the source of gravitational force for the artificial potential field.
[0087] Multi-Controlled Point Based Artificial Potential Field (MAPF) Optimization Algorithm
[0088] The artificial potential field method is a virtual force field method widely used in the path planning of mobile robots. It can make the robot avoid the restricted area and obstacles in advance at a certain distance by repulsive force. By introducing a piecewise function of the relative distance between the current point and the target point into the traditional repulsive force function, the problem of unreachable local minimum target points is successfully solved, and the accuracy of robot path planning is improved. In this embodiment, multiple gravitational targets are introduced on the basis of the artificial potential field method, and relevant constraints of highway design are added to improve and obtain the multi-control points artificial potential field algorithm (MAPF) applicable to the field of intelligent highway route selection. The resultant force F total is the vector sum of the repulsive force of obstacles or constraints and the gravitational forces of all the control points ahead. A brief schematic diagram is shown in Figure 2 Figure
[0089] The main parameters of the model are shown in Table 1. Among them, the gain coefficient can be changed according to different sources. For example, the repulsive force gain coefficient can be enlarged in a strict restricted area, while a smaller repulsive force gain coefficient is adopted in areas with crossing costs such as vegetation areas. The target range ρ needs to be flexibly adjusted according to the actual situation of the source of gravitational or repulsive force.
[0090] Table 1 Main parameters of the model
[0091] Item Value <![CDATA[Initial velocity v0]]> 20m / s Sampling frequency / time t 0.025s <![CDATA[Initial gravitational gain coefficient α0]]> 1 <![CDATA[Initial repulsive gain coefficient β0]]> 0.8 Target range distance ρ /
[0092] In step 2), the specific steps are as follows:
[0093] 2.1) Establish a particle model and initialize the velocity, motion direction, and position;
[0094] 2.2) Select the source of the repulsive force of the artificial potential field and its target range according to the actual situation;
[0095] 2.3) Initialize the gravitational and repulsive force gain coefficients and perform MAPF using the particle model;
[0096] 2.4) Determine whether it is within the gravitational and repulsive force range. If so, update the particle velocity, position, and motion direction information according to the resultant force and the current state, and proceed to the next step; if not, maintain the particle motion state according to the current state and proceed to the next step;
[0097] 2.5) Determine whether the constraint conditions are met. If so, proceed to the next step; if not, return to step 2.3);
[0098] 2.6) Determine whether all control points have been passed. If so, proceed to the next step; if not, return to step 2.4);
[0099] 2.7) Use the least squares method to fit the curve segment to make it meet the standard.
[0100] In the improved artificial potential field MAPF algorithm, the core mainly consists of attractive and repulsive potential fields and attractive and repulsive force functions. The formula for the attractive potential field U att (q) and the attractive force function F att (q) are composed of a series of vector combinations, as shown in the following formula:
[0101]
[0102] U att,n = 0, when ρ(q, q contral,n ) > ρ n
[0103]
[0104] F att,n = 0, when ρ(q, q contral,n ) > ρ n
[0105] In the formula: α is the attractive gain coefficient, and the same value is adopted for different control points; q is the current spatial position of the particle; q contral,n is the spatial position of the nth control point; ρ(q, q contral,n ) is the Euclidean distance from the current point to the nth control point; ρ n is the target range of the nth control point, that is, the minimum distance that will affect the movement of the particle; U att,n (q), F att,n (q) are the attractive potential field and attractive force of the nth control point respectively;
[0106] The formula for the repulsive potential field U rep (q) and the repulsive force function F rep (q) are as follows:
[0107]
[0108] In the formula: β n is the repulsive gain coefficient of the nth repulsive source; q is the current spatial position of the particle; q obs is the spatial position of the obstacle; q goal is the spatial position of the target end point; ρ n is the target range of the nth repulsive source; ρ(q, q obs ) is the Euclidean distance from the current point to the obstacle; U rep,n (q), F rep,n (q) are the repulsive potential field and repulsive force of the nth control point respectively.
[0109] In the improved artificial potential field MAPF algorithm, the control points output by the large language model in the corridor belt rough selection stage are used as the source of the gravitational potential field, and the obstacles, restricted areas, and vegetation areas in the actual project are regarded as the source of the repulsive potential field. By dynamically and real-time adjusting the motion state of the mass points in the attractive and repulsive potential fields, the path planning is iteratively optimized.
[0110] The objective function of the improved artificial potential field MAPF algorithm is as follows:
[0111] The selection of the objective function is directly related to the algorithm efficiency and the route optimization result. Since the construction cost is the most considered factor in engineering practice, the total construction cost of the route is selected as the objective function, as shown in the following formula:
[0112] C c = C e + C b + C l + C v
[0113] In the formula: C c is the total construction cost; C e is the earthwork cost; C b is the bridge cost; C l is the construction cost related to the length; C v is the vegetation damage cost;
[0114] The calculation method of the earthwork cost C e is as shown in the following formula:
[0115]
[0116] In the formula: when a0 = 1, it represents a full cut section; when a1 = 1, it represents a full fill section; when a2 = 1, it represents a half cut and half fill section; A wi , A ti are the cut and fill areas of the i-th cross section; p t , p w are the fill and cut unit prices; L Ei is the length of the i-th cross section;
[0117] The calculation method of the bridge cost C b is as shown in the following formula:
[0118]
[0119] In the formula: n b is the number of bridges along the whole line; p bi is the unit construction cost of the i-th bridge; l bi is the length of the i-th bridge; C ai is the construction cost of the abutment of the i-th bridge;
[0120] Construction costs C related to length l As shown in the following formula:
[0121] C l = p li × L li
[0122] In the formula: p li is the unit land acquisition cost when the route passes through different regions; L li is the route length;
[0123] Since the regional vegetation types are single, the vegetation damage cost is calculated by multiplying the vegetation area obtained by supervised classification by the unit cost of this vegetation, and the vegetation area is obtained according to the green area in the grid file passed through by the route. As shown in the following formula:
[0124] C v = p v × ∑n grid × s grid
[0125] In the formula: C v is the vegetation damage cost; p v is the unit cost of regional vegetation; n grid is the number of vegetation grids passed through by the route; s grid is the area size of the grid.
[0126] The relevant constraints of the improved artificial potential field MAPF algorithm are:
[0127] a) Geometric constraints
[0128] Among them, the plane geometric constraints usually include: the combined constraints of curves and straight lines, the minimum curve radius constraint, the minimum curve length constraint, and the maximum slope constraint. The above plane geometric constraint conditions are expressed as φ i (P HPI ) ≤ 0, i = 0, 1,..., N + 1, where i represents the i-th plane intersection point and N represents the total number of plane intersection points;
[0129] The vertical section geometric constraints include: the maximum longitudinal slope constraint, the minimum vertical curve radius constraint, and the minimum slope length constraint. The above vertical section geometric constraint conditions are expressed as ψ j (P VPI ) ≤ 0, j = 0, 1,..., M + 1, where j represents the j-th vertical section intersection point and M represents the total number of vertical section intersection points;
[0130] b) Building or structure constraints
[0131] Expressed as U R and UF They are respectively the set of route regions and the set of all restricted areas;
[0132] c) Railway crossing constraint
[0133] The railway crossing constraint condition of the route is expressed as:
[0134] θ min ≤θ≤90°
[0135] L p ≤L pmin
[0136] Δh≤|h road -h rail |
[0137] In the formula: θ min is the minimum value of the railway crossing angle; L p and L pmin are respectively the distance between the bridge piers in the crossable area and the minimum restricted distance; Δh is the vertical clearance of the crossing; h road and h rail respectively represent the heights of the highway and the railway.
[0138] The selection of the corridor belt considers the constraints of buildings or structures and railway crossing constraints.
[0139] Case analysis
[0140] Taking a certain high-speed railway project in East China as an example at a railway crossing, the method proposed in this embodiment is verified again. Since the highway in this case crosses the railway in a way of passing under the railway, the problem can be transformed into a multi-scheme decision-making problem of the route passing through different necessary regions. That is, the schemes passing through different bridge piers can be compared to obtain the best scheme, and it is compared with the artificial route and the results of the currently relatively mature genetic algorithm.
[0141] Such as Figure 3 shown, first, the preprocessing of the contour data and DOM data is carried out. The contour data is mainly processed through software such as ArcGIS to obtain the digital elevation model (DEM), and the ecological data is obtained by supervised classification of the DOM data to obtain the vegetation distribution map.
[0142] Then, in the preliminary selection stage, multiple routes quickly and batch-generated by the large model are used as the reference for the corridor belt in the first stage, with only a few necessary areas added, that is, different railway intersections, as constraints. The optimal routes within each necessary area are optimized using the MAPF algorithm, with the gravitational source being the control points of the corridor belt in the first stage and the repulsive force source being the vegetation areas and the railway subgrade and pier areas. Based on the actual situation of the project, the main parameters calculated are as follows: the road width of a single-lane Class IV highway is 3.5m, assuming an approximate equivalent earthwork cost of 20¥ / m 3 , the pavement cost is 660¥ / m, and the vegetation cost is 1500¥ / m 2 .
[0143] Since too long route lengths will lead to a significant increase in project costs, only the best solutions among the first three intersections are selected for comparison. By calculating indicators such as route length, excavation and filling, and ecological data and comparing them with the manual route, the results are shown in Table 2. The optimal solution for intelligent route selection is Solution 1, which selects a closer intersection compared to the manual solution, while causing less vegetation damage cost. It saves 4.8% in project spending compared to the manual route solution and is better than the result of the genetic algorithm after iteration. Among them, Solution 2 selects the same intersection as the manual solution, and the route bypasses more vegetation areas. Therefore, although the total route length is greater than the manual solution, due to the significant optimization of the vegetation area, the project spending is optimized by 2.87% compared to the manual solution, and the optimization result is also better than that of the genetic algorithm. The main parameters of the genetic algorithm are mainly as follows: the crossover probability is 0.8, the mutation probability is 0.2, the initial population size is 100, and the number of iterations is 500.
[0144] Table 2 Comparison of solutions
[0145]
[0146] As Figure 4 shown, after exporting the manual solution route and the optimized route solution and embedding them into the topographic map (part a) and the vegetation distribution base map obtained by supervised classification (part b), the overall solution can be visually compared. Among them, green, yellow, and white respectively represent trees, cultivated land, and the original highway. It can be clearly seen that compared with the result of the manual route, Solution 1 and Solution 2 pass through fewer green areas (woods), significantly reducing the vegetation cost brought by ecological damage.
[0147] As Figure 5 shown is the longitudinal section visual comparison of all solutions and the manual solution.
[0148] This embodiment has the following advantages:
[0149] (1) An intelligent route selection model optimized based on the LLM and MAPF algorithms is constructed. In the first stage, a large number of rough corridor selection results can be efficiently generated using only natural language, saving certain human and time costs. Since it can learn different typical actual cases to guide the large model to learn their behavior patterns, and complex problems can be disassembled and the results can be continuously adjusted during the process, this method has strong adaptability and flexibility and can be applied to a wide range of actual scenarios. In addition, with the continuous enhancement of the capabilities of large models, the application prospects and potential of this method will also continue to improve.
[0150] (2) An artificial potential field algorithm with multiple control points based on the robot path planning algorithm is proposed. By changing the definition of the repulsive and attractive force objects, it is applied to the field of intelligent route selection to optimize the corridor results generated by the large model. Multiple constraints can be considered by using different repulsive and attractive force gain coefficients and target ranges, and it is compared with the relatively mature genetic algorithm, showing certain advantages in terms of speed and optimization effect.
[0151] (3) This embodiment is applied to a railway intersection of a high-speed rail project in the East China region. The results show that the optimal solution of intelligent route selection selects the optimal intersection, reducing more vegetation damage. The project cost is saved by 4.8% compared with the manual route plan, and the effect is also better than that of the genetic algorithm. The second solution of this method selects the same intersection as the manual plan and also saves 2.78% of the project cost. Therefore, it shows certain effectiveness in actual projects and is an effective exploration of large language models in the field of highway intelligent route selection.
[0152] (4) The method proposed in this embodiment may be difficult to handle more complex actual cases, and the related potential of large language models needs to be further explored. Follow-up research can also continue to explore its great potential: using RAG (Retrieval-Augmented Generation) to build a professional database to enhance the professional knowledge ability of large models; designing and building a professional AI agent (intelligent agent) to enable it to have the ability of independent thinking and tool invocation to effectively handle given complex tasks. In addition, the calculation of vegetation damage in this study is included in the project cost, and in the future, the optimization considering multiple objectives such as project cost and green ecology can also be studied.
[0153] The above schematically describes the present invention and its implementation manners. This description is not restrictive, and only one of the implementation manners of the present invention is shown in the drawings. The actual structure is not limited thereto. Therefore, if those of ordinary skill in the art are inspired by it and design similar structural manners and embodiments without creative work without departing from the spirit of the present invention, they shall fall within the protection scope of the present invention.
Claims
1. A highway diversion design method driven by a large language model, characterized in that: It includes the following steps: Step 1) Coarse selection is carried out using a large language model and prompt engineering to select the corridor belt; Step 2) Optimization is carried out through an improved artificial potential field MAPF algorithm; In Step 1), the specific steps are as follows: 1.1) Pre-train the large language model; 1.2) Input prompt words into the large language model, including data, constraints, and requirements; 1.3) Export the path points after fine-tuning the path using the prompt words; 1.4) Process a series of control points from the path points generated by the large language model; 1.5) Use all the control points of the corridor belt as the source of gravitational force of the artificial potential field; In Step 2), the specific steps are as follows: 2.1) Establish a particle model and initialize the velocity, movement direction, and position; 2.2) Select the source of repulsive force of the artificial potential field and its target range according to the actual situation; 2.3) Initialize the attraction and repulsion gain coefficients and perform MAPF using the particle model; 2.4) Judge whether it is within the repulsive force range. If so, update the particle velocity, position, and movement direction information according to the resultant force and the current state, and proceed to the next step; if not, maintain the particle movement state according to the current state and proceed to the next step; 2.5) Judge whether the constraint conditions are met. If so, proceed to the next step; if not, return to Step 2.3); 2.6) Judge whether all control points have been passed. If so, proceed to the next step; if not, return to Step 2.4); 2.7) Use the least squares method to fit the curve segment to make it meet the standard; In the improved artificial potential field MAPF algorithm, the control points output by the large language model in the corridor belt coarse selection stage are used as the source of the gravitational potential field, and the obstacles, restricted areas, and vegetation areas of the actual project are regarded as the source of the repulsive potential field. By dynamically and real-time adjusting the movement state of the particle in the attraction and repulsion potential fields, the path planning is iteratively optimized; In the improved artificial potential field MAPF algorithm, the gravitational potential field formula U att (q) and the gravitational function F att (q) are composed of a series of vector combinations, as shown in the following formula: U att,n = 0, when ρ(q, q contral,n ) > ρ n F att,n = 0, when ρ(q, q contral,n ) > ρ n Where: α is the gravitational gain coefficient, and the same value is adopted for different control points; q is the current spatial position of the particle; q contral,n is the spatial position of the nth control point; ρ(q, q contral,n ) is the Euclidean distance from the current point to the nth control point; ρ n is the target range of the nth control point, that is, the minimum distance that will affect the movement of the particle; U att,n (q), F att,n (q) are the gravitational potential field and gravity of the nth control point respectively; The repulsive potential field formula U rep (q) and the repulsive force function F rep (q) are as follows: where: β n is the repulsive force gain coefficient of the nth repulsive force source; q is the current spatial position of the particle; qobs is the spatial position of the obstacle; q goal is the spatial position of the target end point; ρ n is the target range of the nth repulsive force source; ρ(q, q obs ) is the Euclidean distance from the current point to the obstacle; U rep,n (q), F rep,n (q) are the repulsive force potential field and the repulsive force of the nth control point, respectively.
2. The large language model-driven highway relocation design method according to claim 1, wherein: The objective function of the improved artificial potential field MAPF algorithm is: Select the total construction cost of the route as the objective function, as shown in the following formula: C c = C e + C b + C l + C v Where: C c is the total construction cost; C e is the earthwork cost; C b is the bridge cost; C l is the construction cost related to the length; C v is the vegetation damage cost; Earthwork cost C e is calculated as shown in the following formula: Where: when a0 = 1, it represents a fully excavated cross-section; when a1 = 1, it represents a fully filled cross-section; when a2 = 1, it represents a half-filled and half-excavated cross-section; A wi and A ti are the areas of excavation and filling for the i-th cross-section; p t and p w are the unit prices for filling and excavation; L Ei is the length of the i-th cross-section; Bridge cost C b is calculated as shown in the following formula: where: n b is the number of bridges along the whole line; p bi is the unit construction cost of the i-th bridge; l bi is the length of the i-th bridge; C ai is the construction cost of the abutment of the i-th bridge; Length-related construction cost C l As shown in the following formula: C l = p li × L li Where: p li is the unit land expropriation cost when the route passes through different regions; L li is the route length; Multiply the vegetation area obtained by supervised classification by the unit cost of the vegetation to calculate the vegetation damage cost, and the vegetation area can be obtained according to the green area in the raster file passed through by the route, as shown in the following formula: C v = p v × ∑n grid × s grid Where: C v is the cost of vegetation damage; p v is the unit cost of regional vegetation; n grid is the number of vegetation grids crossed by the route; s grid is the area size of the grid.
3. The method for highway relocation design driven by a large language model according to claim 2, characterized in that: The relevant constraints of the improved artificial potential field MAPF algorithm are: a) Geometric constraints Among them, the plane geometric constraints usually include: combined constraints of curves and straight lines, minimum curve radius constraint, minimum curve length constraint, maximum slope constraint. The above plane geometric constraint conditions are expressed as φ i (P HPI ) ≤ 0, i = 0, 1,..., N + 1, where i represents the i-th plane intersection point and N represents the total number of plane intersection points; The vertical profile geometric constraints include: maximum longitudinal slope gradient constraint, minimum vertical curve radius constraint, and minimum slope length constraint. The above vertical profile geometric constraint conditions are expressed as ψ j (P VPI ) ≤ 0, j = 0, 1,..., M + 1, where j represents the j-th vertical profile intersection point and M represents the total number of vertical profile intersection points; b) Constraints on buildings or structures Denoted as U R and U F are the set of route regions and the set of all restricted areas, respectively; c) Railway crossing constraints The railway crossing constraint conditions of the route are expressed as: θ min ≤ θ ≤ 90° L p ≤ L pmin Δh ≤ |h road - h rail | where: θ min is the minimum value of the railway crossing angle; L p and L pmin are the distance between the piers and the minimum restricted distance in the crossable area respectively; Δh is the vertical clearance of the level crossing; h road and h rail represent the heights of the road and the railway respectively.
4. The method for highway diversion design driven by a large language model according to claim 3, characterized in that: In Step 1), the selection of the corridor belt takes into account the constraints on buildings or structures and railway crossings.
Citation Information
Patent Citations
Robot path planning method based on genetic algorithm and improved artificial potential field method
CN112596525A
Information pushing method and device, equipment and storage medium
CN117453994A