A rail transit path planning method, device and readable medium based on ORCA

By adopting the multi-agent path planning method of ORCA and MAPF algorithms in the rail transit system, the limitations of centralized and decentralized methods are solved, global optimization and collision avoidance are achieved, and the flexibility of the system is improved by adapting to different regional needs. and efficiency.

CN118419100BActive Publication Date: 2024-09-06HUAQIAO UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410892289.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-06
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

When existing rail transit systems manage complex railway networks, centralized methods have the risk of single points of failure and high communication requirements, while decentralized methods lack global optimization, leading to local optimal solutions and possible conflicts or deadlocks.

Method used

Adopt path planning methods based on ORCA and MAPF, model train agents through undirected graphs, and combine search algorithms, ORCA algorithms and MAPF algorithms to achieve multi-agent path planning, avoid collisions and deadlocks, and adapt to the needs of different regions and traffic density .

Benefits of technology

It achieves global optimized path planning, reduces the risk of single point failure, improves the efficiency and independence of path planning, and is suitable for various network sizes and environments, especially when resources are limited.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118419100B
    Figure CN118419100B
Patent Text Reader

Abstract

The present invention discloses a rail transit path planning method, device and readable medium based on ORCA, which relates to the technical field of multi-agents, including: performing single train path planning for each agent to obtain a first path; using an ORCA algorithm to determine whether a collision will occur, if so, performing a first local path planning for the agent to obtain a first moving speed and a second path, the agent moves toward the next path point along the second path at the first moving speed, otherwise determining whether the agent is deadlocked, if so, performing a second local path planning for the agent using a MAPF algorithm to obtain a third path, the agent moves toward the next path point along the third path, otherwise calculating the second moving speed of the agent, the agent moves toward the next path point along the first path at the second moving speed; repeating the above steps until the agent reaches the end point, giving full play to the advantages of centralized and decentralized methods, and achieving global optimization and avoiding collisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multi-agent technology, and in particular to an ORCA-based rail transit path planning method, device and readable medium. Background Art

[0002] In rail transit operations, effectively managing dense traffic on complex railway networks is a real challenge faced by many transportation and logistics companies worldwide. This challenging task can be broadly categorized into two approaches: centralized and decentralized. The centralized approach assumes the existence of a central controller that possesses comprehensive information about all trains and the environment and can communicate with the trains. The controller generates a complete path plan and then has the trains execute it. Based on this global information, the controller optimizes the entire railway network, maximizing system efficiency and safety. It coordinates the paths of all trains, avoiding conflicts and congestion, and ensuring safe distances between trains and smooth operation. However, the centralized approach also has drawbacks. If the central controller fails, the operation of the entire system will be affected, potentially leading to system failure or partial malfunction. Extensive communication and data transmission are required, resulting in relatively high costs. In the decentralized approach, when there is no central controller or when trains have limited observation and communication capabilities, each train typically plans its own path independently and relies on collision avoidance mechanisms during execution. Each train independently plans its own path without intervention from the central controller, resulting in a high degree of independence. Decentralized approaches typically require less communication and data transmission, placing lower demands on communication networks and infrastructure, and resulting in relatively low costs. However, decentralized approaches rely solely on local information for decision-making, lacking a global optimization perspective. This can lead to local, rather than global, optimal solutions. Independent decisions between trains can lead to conflicts or even deadlocks.

[0003] In practical railway dispatching systems, adopting either centralized or decentralized approaches alone can present challenges. For example, on trunk lines with large networks and high traffic density, centralized dispatching may be more effective in achieving global optimization and coordination, but this places high demands on communication and data transmission, and also carries the risk of single points of failure. In marginal areas or on branch lines with lower traffic density, decentralized dispatching may be more suitable, reducing communication costs and increasing system flexibility, but lacking global optimization and coordination. Summary of the Invention

[0004] The purpose of this application is to propose a rail transit path planning method, device and readable medium based on ORCA to address the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a rail transit path planning method based on ORCA, comprising the following steps:

[0006] Obtain a rail transit network, perform map modeling on the rail transit network, and obtain an undirected graph. The undirected graph includes nodes and edges, and trains in the rail transit network are modeled as intelligent agents based on the undirected graph.

[0007] Obtain the train's driving task, and perform single-train path planning for each agent based on the undirected graph and the train's driving task to obtain a first path. The first path includes several path points. At each time step, the agent starts from the starting point and moves along its corresponding first path toward the next path point.

[0008] According to the train's driving mission and the first path of all intelligent agents, the state information of the intelligent agent and the state information of the first neighbor intelligent agent within the communication range of the intelligent agent are obtained, and the ORCA algorithm is used to determine whether the intelligent agent and the first neighbor intelligent agent will collide based on the state information of the intelligent agent and the state information of the first neighbor intelligent agent. If so, a first local path planning is performed on the intelligent agent to obtain a first moving speed and a second path. The intelligent agent moves toward the next path point along the second path at the first moving speed. Otherwise, it is determined whether the intelligent agent is deadlocked based on the state information of the intelligent agent and the state information of the first neighbor intelligent agent. If so, a second local path planning is performed on the intelligent agent to obtain a third path. The intelligent agent moves toward the next path point along the third path. Otherwise, the moving speed of the intelligent agent is recalculated to obtain a second moving speed. The intelligent agent moves toward the next path point along the first path at the second moving speed.

[0009] Repeat the previous step until the agent reaches the end.

[0010] Preferably, a rail transit network is obtained, and a map modeling is performed on the rail transit network to obtain an undirected graph, wherein the undirected graph includes nodes and edges, and trains in the rail transit network are modeled as intelligent agents based on the undirected graph, specifically including:

[0011] Obtain the rail transit network and abstract the key locations of the rail transit network into nodes of an undirected graph. Key locations include switches and stations, and the connection between two nodes is the edge of the undirected graph.

[0012] Based on the undirected graph, the trains in the rail transit network are modeled as intelligent agents. The position of the train in the rail transit network corresponds to the position of the intelligent agent on the undirected graph. The position of the intelligent agent on the undirected graph is represented by a triple (Tr, v, t) and coordinates (x, y), where Tr represents the intelligent agent, v represents the node on the undirected graph, t represents the time step, and x and y represent the horizontal and vertical coordinates of the intelligent agent on the undirected graph, respectively.

[0013] Preferably, an ORCA algorithm is used to determine whether the agent and the first neighbor agent will collide based on the state information of the agent and the state information of the first neighbor agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path. The agent moves toward the next path point along the second path at the first moving speed, specifically including:

[0014] The ORCA algorithm is used to calculate the moving speed and moving direction of the agent according to the state information of the agent and the state information of the first neighboring agent, and obtain the first moving speed and the first moving direction; according to the first moving direction and the first path, it is determined whether the first moving direction deviates from the first path. If so, the current position of the agent is obtained and the first moving speed and the first moving direction are obtained. The search algorithm performs a first local path planning on the agent to obtain a second path. The agent moves toward the next path point along the second path at the first moving speed, otherwise the agent moves toward the next path point along the first path at the current moving speed.

[0015] Preferably, a MAPF algorithm is used to perform a second local path planning on the agent to obtain a third path, and the agent moves toward the next path point along the third path, specifically including:

[0016] Obtaining a current location of the agent, a current location of a first neighboring agent, and a current location of a second neighboring agent within a communication range of the first neighboring agent;

[0017] Determine the minimum x coordinate based on the current position of the agent, the current position of the first neighbor agent, and the current position of the second neighbor agent , the maximum x-coordinate , the minimum y coordinate , the maximum y coordinate , according to the 、 、 and The straight line perpendicular to the coordinate axis determines a rectangle, and the ends of each side of the rectangle are extended by the distance of the offset parameter d to obtain the range of the second local path planning of the agent. The size of the range of the second local path planning is ;

[0018] Within the scope of the second local path planning, respectively obtain the position with the closest Euclidean distance to the next path point of the agent, the position with the closest Euclidean distance to the next path point of the first neighboring agent, and the position with the closest Euclidean distance to the next path point of the second neighboring agent, and respectively obtain the local path planning endpoint of the agent, the local path planning endpoint of the first neighboring agent, and the local path planning endpoint of the second neighboring agent;

[0019] According to the scope of the second local path planning and the current positions of all intelligent agents, the first neighbor intelligent agent, the second neighbor intelligent agent and the local path planning end point within the scope of the second local path planning, the MAPF algorithm is used to perform the second local path planning on the intelligent agent to obtain the third path. The intelligent agent moves toward the next path point along the third path.

[0020] Preferably, the status information includes moving speed and moving direction.

[0021] As a preference, use The search algorithm performs single train path planning for each agent based on the undirected graph and the train's driving tasks, and obtains the first path. The search algorithm specifically includes:

[0022] Initialize the open list, closed list, and each node of the undirected graph. Set the G value of each node of the undirected graph to infinity. The G value represents the cost of moving from the starting point to the node, the H value represents the estimated cost of moving from the node to the end point, and the F value represents the sum of the G value and the H value.

[0023] Put the starting point of the train's travel mission into the open list and set the G value of the starting point to 0;

[0024] In response to determining that the open list is not empty, a node with the smallest F value is selected from the open list as the current node, the current node is removed from the open list, and added to the closed list. In response to determining that the current node is not the end point, the adjacent nodes of the current node are traversed. In response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is not in the open list, the adjacent node is added to the open list, and the actual movement cost from the starting point through the current node to the adjacent node is calculated to obtain the actual G value.

[0025] In response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is in the open list, calculating an actual movement cost from the starting point through the current node to the adjacent node to obtain an actual G value, comparing the actual G value with the current G value of the adjacent node, and in response to determining that the actual G value is less than the current G value of the adjacent node, updating the movement cost and replacing the current G value of the adjacent node with the actual G value;

[0026] In response to determining that the adjacent node is an obstacle or is on a closed list, ignoring the adjacent node;

[0027] In response to determining that the current node is the end point, ending the search and returning to the first path;

[0028] In response to determining that the open list is empty, the search is terminated and the first path is returned.

[0029] In a second aspect, the present invention provides a rail transit path planning device based on ORCA, comprising:

[0030] a modeling module configured to obtain a rail transit network, perform map modeling on the rail transit network, obtain an undirected graph, the undirected graph including nodes and edges, and model trains in the rail transit network as intelligent agents based on the undirected graph;

[0031] A single train path planning module is configured to obtain the train's travel mission and perform single train path planning for each agent based on the undirected graph and the train's travel mission to obtain a first path. The first path includes a number of path points. At each time step, the agent starts from the starting point and moves along its corresponding first path toward the next path point.

[0032] The local path planning module is configured to obtain the state information of the agent and the state information of the first neighboring agent within the communication range of the agent based on the train's driving mission and the first path of all agents, and use the ORCA algorithm to determine whether the agent and the first neighboring agent will collide based on the state information of the agent and the state information of the first neighboring agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path, and the agent moves toward the next path point along the second path at the first moving speed. Otherwise, based on the state information of the agent and the state information of the first neighboring agent, it is determined whether the agent is deadlocked. If so, a second local path planning is performed on the agent to obtain a third path, and the agent moves toward the next path point along the third path. Otherwise, the moving speed of the agent is recalculated to obtain a second moving speed, and the agent moves toward the next path point along the first path at the second moving speed.

[0033] The repetition module is configured to repeat the previous step until the agent reaches the end point.

[0034] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0035] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0036] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which implements the method described in any implementation manner in the first aspect when the computer program is executed by a processor.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] (1) The ORCA-based rail transit path planning method proposed in this invention is combined with The search algorithm, ORCA algorithm and MAPF algorithm are used for rail transit path planning, which overcomes the limitations of using only centralized methods or decentralized methods, gives full play to the advantages of centralized methods and decentralized methods, and effectively solves the problems of train operation conflicts and congestion in rail transit systems, achieves global optimization and collision avoidance, reduces the risk of single point failure, and can adapt to the needs of different regions and traffic densities, making path planning more efficient and optimized.

[0039] (2) The ORCA-based rail transit path planning method proposed in the present invention adopts the ORCA algorithm to achieve collision avoidance of multiple agents, and performs the first local path planning for the agents with the assistance of local obstacle avoidance logic, ensuring that the agents can find an effective path to reach the next path point even when facing dynamic obstacles. It has higher independence, flexibility and more refined path planning, and requires less communication and data transmission, and has higher path planning efficiency.

[0040] (3) The ORCA-based rail transit path planning method proposed in the present invention adopts the MAPF algorithm to implement multi-agent path planning with local constraints of potential deadlocks, and solves deadlocks within the scope of the second local path planning. It combines the advantages of centralized methods and decentralized methods, requires less communication and data transmission, and has lower requirements for communication networks and infrastructure. It is applicable to various network scales and environments, especially in marginal areas or with limited resources, and has higher path planning efficiency.

[0041] (4) The ORCA-based rail transit path planning method proposed in this invention considers the impact of dynamic environmental changes on the intelligent agent's path planning through information exchange between adjacent trains in the first local path planning stage and the second local path planning stage, and has more refined path planning.

[0042] (5) The ORCA-based rail transit path planning method proposed in this invention can coordinate the travel paths of all trains in a centralized manner, avoid conflicts and congestion, and ensure a safe distance and smooth operation between trains. In a decentralized manner, each train plans its path independently without the intervention of a central controller, thus having higher independence and flexibility and more flexible conflict handling capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 A schematic flow chart of a rail transit path planning method based on ORCA according to an embodiment of the present application;

[0045] Figure 2 This is an example diagram of map modeling and agent modeling of a rail transit network in the ORCA-based rail transit path planning method according to an embodiment of the present application;

[0046] Figure 3 A flowchart of a single train path planning process of an ORCA-based rail transit path planning method according to an embodiment of the present application;

[0047] Figure 4 A flowchart of a rail transit path planning method based on ORCA according to an embodiment of the present application;

[0048] Figure 5 Schematic diagram of a rail transit path planning device based on ORCA according to an embodiment of the present application;

[0049] Figure 6 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0051] Figure 1 An ORCA-based rail transit path planning method provided in an embodiment of the present application is shown, comprising the following steps:

[0052] S1, obtain the rail transit network, map model the rail transit network, obtain an undirected graph, the undirected graph includes nodes and edges, and model the trains in the rail transit network into intelligent agents based on the undirected graph.

[0053] In a specific embodiment, a rail transit network is obtained, a map modeling is performed on the rail transit network to obtain an undirected graph, the undirected graph including nodes and edges, and trains in the rail transit network are modeled as intelligent agents based on the undirected graph, specifically including:

[0054] Obtain the rail transit network and abstract the key locations of the rail transit network into nodes of an undirected graph. Key locations include switches and stations, and the connection between two nodes is the edge of the undirected graph.

[0055] Based on the undirected graph, the trains in the rail transit network are modeled as intelligent agents. The position of the train in the rail transit network corresponds to the position of the intelligent agent on the undirected graph. The position of the intelligent agent on the undirected graph is represented by a triple (Tr, v, t) and coordinates (x, y), where Tr represents the intelligent agent, v represents the node on the undirected graph, t represents the time step, and x and y represent the horizontal and vertical coordinates of the intelligent agent on the undirected graph, respectively.

[0056] Specifically, refer to Figure 2 ,The rail transit network is mapped and modeled to obtain an undirected graph. The key locations of the rail transit network are abstracted as nodes of the undirected graph. Key locations include switches and stations. Each node represents a specific location. There may be multiple nodes on a long track, e.g. Figure 2 As shown, nodes 3, 4, 6, 7, and 8 correspond to switches, while nodes 1, 2, 5, and 9 are nodes on the long track. Connections between two nodes are represented by edges in an undirected graph. Edges in an undirected graph are represented by scaling down the rail transit network. Each edge has a unique identifier. For example, the edge between nodes 1 and 2 is represented by e1, and the edge between nodes 2 and 3 is represented by e2. A train can travel from one location to another within a certain period of time. Through map modeling and agent modeling, this can be represented as an agent incurring a certain time cost when moving along an edge. Furthermore, within a time step, the agent can choose to wait at the current node or move to an adjacent node. Therefore, through map modeling and agent modeling, we can more clearly understand the movement and time costs of trains in the rail transit network, thereby abstracting the complex rail transit path planning problem into a multi-agent path planning problem.

[0057] Taking into account the characteristics of rail transit networks, we need to recognize some of the limitations, especially in the case of three-way switches. Not all directions can be freely passed. For example, Figure 1In the network shown, at node 3, there are three edges, e2, e3, and e5. However, in actual train operation scenarios, path 6-3-4 may be a prohibited section. Similarly, at node 6, the intersection formed by e5, e6, and e8, path 3-6-5 may also be impassable. These prohibited sections need to be properly considered during path planning to ensure that the generated path planning solution is consistent with actual conditions. During the path planning process, these impassable sections are excluded from the graph so that the path planning adheres to actual operating constraints and generates a more reasonable and efficient path. Through such optimization and consideration, we can ensure that the planned path not only meets the structural characteristics of the network but can also be successfully applied in actual train operations.

[0058] Based on the undirected graph, the trains in the rail transit network are modeled as intelligent agents, so that the positions of the intelligent agents and trains in the rail transit network correspond to the positions of the intelligent agents on the undirected graph. The positions of the intelligent agents on the undirected graph are represented by triples (Tr, v, t) and coordinates (x, y), where Tr represents the intelligent agent, v represents the node on the undirected graph, t represents the time step, and x and y represent the horizontal and vertical coordinates of the intelligent agent on the undirected graph, respectively. For example, refer to Figure 2 , (Tr1, 9, 0) indicates that at time step 0, train Tr1 is located at node 9, and (Tr2, 5, 0) indicates that at time step 0, train Tr2 is located at node 5. Using triples to represent the positions of agents on an undirected graph accurately describes the train's position within the rail transit network. Matching the agent's position with the edges of the map allows for accurate determination of the train's location during path planning, enabling better response to various rail transit path planning requirements, such as determining whether there is a conflict between two agents in the CBS algorithm. This strategy of agent modeling and map adaptation ensures the accuracy and practicality of path planning, providing a solid foundation for the successful implementation of the entire rail transit path planning method.

[0059] S2, obtain the train's driving task, and perform single train path planning for each agent based on the undirected graph and the train's driving task to obtain a first path. The first path includes several path points. At each time step, the agent starts from the starting point and moves toward the next path point along its corresponding first path.

[0060] In a specific embodiment, reference Figure 3 ,use The search algorithm performs single train path planning for each agent based on the undirected graph and the train's driving tasks, and obtains the first path. The search algorithm specifically includes:

[0061] Initialize the open list, closed list, and each node of the undirected graph. Set the G value of each node of the undirected graph to infinity. The G value represents the cost of moving from the starting point to the node, the H value represents the estimated cost of moving from the node to the end point, and the F value represents the sum of the G value and the H value.

[0062] Put the starting point of the train's travel mission into the open list and set the G value of the starting point to 0;

[0063] In response to determining that the open list is not empty, a node with the smallest F value is selected from the open list as the current node, the current node is removed from the open list, and added to the closed list. In response to determining that the current node is not the end point, the adjacent nodes of the current node are traversed. In response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is not in the open list, the adjacent node is added to the open list, and the actual movement cost from the starting point through the current node to the adjacent node is calculated to obtain the actual G value.

[0064] In response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is in the open list, calculating an actual movement cost from the starting point through the current node to the adjacent node to obtain an actual G value, comparing the actual G value with the current G value of the adjacent node, and in response to determining that the actual G value is less than the current G value of the adjacent node, updating the movement cost and replacing the current G value of the adjacent node with the actual G value;

[0065] In response to determining that the adjacent node is an obstacle or is on a closed list, ignoring the adjacent node;

[0066] In response to determining that the current node is the end point, ending the search and returning to the first path;

[0067] In response to determining that the open list is empty, the search is terminated and the first path is returned.

[0068] Specifically, by mapping the rail transit network, an undirected graph is obtained, so that the path planning problem can be simplified to a graph search. The undirected graph and the train driving task are input, and the undirected graph and the train driving task are used. The search algorithm performs single-train path planning for each agent based on the undirected graph and the train's travel mission, ignoring all other agents. The algorithm then finds the optimal path for each train within the rail transit network, which serves as the first path for that path. When initializing the open list, closed list, and each node in the undirected graph, the initial G value is set to infinity to determine whether the node has been visited. Only when a node is visited for the first time is its G value updated from infinity to a specific travel cost. This also ensures that the G value is correctly updated the first time a node is visited, ensuring that the travel cost of any actual path to that node is lower than the initial value. The starting point of the train's travel mission is placed in the open list, and the G value of the starting point is set to 0, indicating that the travel cost from the starting point to the starting point is zero.

[0069] S3, according to the train's driving mission and the first path of all intelligent agents, obtain the status information of the intelligent agent and the status information of the first neighbor intelligent agent within the communication range of the intelligent agent, and use the ORCA algorithm to determine whether the intelligent agent and the first neighbor intelligent agent will collide based on the status information of the intelligent agent and the status information of the first neighbor intelligent agent. If so, perform a first local path planning on the intelligent agent to obtain a first moving speed and a second path, and the intelligent agent moves toward the next path point along the second path at the first moving speed. Otherwise, determine whether the intelligent agent is deadlocked based on the status information of the intelligent agent and the status information of the first neighbor intelligent agent. If so, perform a second local path planning on the intelligent agent to obtain a third path, and the intelligent agent moves toward the next path point along the third path. Otherwise, recalculate the moving speed of the intelligent agent to obtain a second moving speed, and the intelligent agent moves toward the next path point along the first path at the second moving speed.

[0070] In a specific embodiment, an ORCA algorithm is used to determine whether an agent and a first neighboring agent will collide based on the agent's state information and the state information of the first neighboring agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path. The agent moves toward the next path point along the second path at the first moving speed, specifically including:

[0071] The ORCA algorithm is used to calculate the moving speed and moving direction of the agent according to the state information of the agent and the state information of the first neighboring agent, and obtain the first moving speed and the first moving direction; according to the first moving direction and the first path, it is determined whether the first moving direction deviates from the first path. If so, the current position of the agent is obtained and the first moving speed and the first moving direction are obtained. The search algorithm performs a first local path planning on the agent to obtain a second path. The agent moves toward the next path point along the second path at the first moving speed, otherwise the agent moves toward the next path point along the first path at the current moving speed.

[0072] In a specific embodiment, the state information includes movement speed and movement direction.

[0073] Specifically, based on the first paths of all agents, the multi-agent path planning problem can be simplified as follows: time is discretized, and at each time step, the agent selects a movement speed that directs it to the next waypoint on the first path. In other words, the agent moves as quickly as possible along the first path constructed by the single-train path planner. This, in practice, will lead to numerous collisions. Therefore, the Optimal Reciprocal Collision Avoidance (ORCA) algorithm is employed to achieve collision avoidance. This algorithm aims to adjust the movement speed at each time step to ensure that the agent safely moves to the next waypoint. When adjusting the movement speed, the ORCA algorithm relies on local observations: only other mobile agents and static obstacles within the visible range are considered.

[0074] refer to Figure 4 , take the driving tasks and the first path of all trains as input, and at each time step, the agent moves to the next path point along the first path. Obtain the state information of the agent and the state information of the first neighbor agent within the communication range of the agent, and the state information includes moving speed, moving direction, etc. The position and moving speed of the agent and its first neighbor agent are monitored by the ORCA algorithm to predict and avoid possible collisions. If the operation of the first neighbor agent does not cause potential conflicts with the operation of the agent, the agent will operate normally until it reaches the end; if the first neighbor agent may collide with the agent, the moving speed of the agent will be adjusted. If the agent deviates from the first path due to collision avoidance, the agent needs to be evaluated and the path planned. At this time, the agent will trigger The search algorithm enters the first local path planning phase, replanning the agent's path from its current position to the next waypoint. This results in a second path, which the agent follows to its endpoint before resuming normal operation. Therefore, the first local path planning phase is aided by local obstacle avoidance logic, ensuring that the agent can find a valid path to the next waypoint even in the presence of dynamic obstacles.

[0075] In a specific embodiment, a MAPF algorithm is used to perform a second local path planning on the agent to obtain a third path, and the agent moves toward the next path point along the third path, specifically including:

[0076] Obtaining a current location of the agent, a current location of a first neighboring agent, and a current location of a second neighboring agent within a communication range of the first neighboring agent;

[0077] Determine the minimum x coordinate based on the current position of the agent, the current position of the first neighbor agent, and the current position of the second neighbor agent , the maximum x-coordinate , the minimum y coordinate , the maximum y coordinate , according to the 、 、 and The straight line perpendicular to the coordinate axis determines a rectangle, and the ends of each side of the rectangle are extended by the distance of the offset parameter d to obtain the range of the second local path planning of the agent. The size of the range of the second local path planning is ;

[0078] Within the scope of the second local path planning, respectively obtain the position with the closest Euclidean distance to the next path point of the agent, the position with the closest Euclidean distance to the next path point of the first neighboring agent, and the position with the closest Euclidean distance to the next path point of the second neighboring agent, and respectively obtain the local path planning endpoint of the agent, the local path planning endpoint of the first neighboring agent, and the local path planning endpoint of the second neighboring agent;

[0079] According to the scope of the second local path planning and the current positions of all intelligent agents, the first neighbor intelligent agent, the second neighbor intelligent agent and the local path planning end point within the scope of the second local path planning, the MAPF algorithm is used to perform the second local path planning on the intelligent agent to obtain the third path. The intelligent agent moves toward the next path point along the third path.

[0080] Specifically, the Multi-Agent Path Finding (MAPF) problem involves multiple agents, each with its own starting point and destination. They must find an optimal path to the destination while avoiding collisions. When an agent is unlikely to collide with its first neighbor, but the movement speed of the first neighbor falls below a threshold, a deadlock is detected. The agents then enter a second local path planning phase. The agent, the first neighbor, and any second neighbor within the first neighbor's communication range switch to MAPF mode, employing a centralized MAPF algorithm, such as the CBS algorithm or the PushAndRotate algorithm, to resolve the deadlock. After determining the scope of the second local path planning, the current positions of all agents, the first neighbor, and the second neighbor, and the local path planning endpoint, the second local path planning is performed to obtain a third path. The agent, the first neighbor, and the second neighbor each move toward the next pathpoint along their corresponding third path. Upon reaching the endpoint of their respective third paths, normal operation resumes.

[0081] S4, repeat the previous step until the agent reaches the end point.

[0082] Requirements for rail transit route planning include safety, efficiency, smoothness, and schedule consistency. Specifically, safety: The route planning algorithm must ensure safe intervals between trains to avoid collisions, rear-end collisions, and other dangerous situations. Efficiency: The route planning algorithm should generate efficient routes, minimize train stops and waiting time, and thus improve system efficiency. Smoothness: Smooth train operation reduces energy consumption and wear, extending the lifespan of trains and track equipment. Schedule consistency: Rail transit systems typically have strict schedules, requiring trains to arrive and depart from stations on time. In centralized algorithms, a central controller is responsible for collecting information from the entire rail transit network and generating global train route plans. It can implement route planning using dynamic programming methods, such as the conflict-based search algorithm (CBS algorithm). In decentralized algorithms, each train has autonomous decision-making capabilities, can plan its route based on local information, and avoid collisions and conflicts by communicating with surrounding trains.

[0083] Compared with the use of centralized or decentralized path planning methods alone, the ORCA-based rail transit path planning method proposed in this invention fully combines the local processing characteristics of the ORCA algorithm with the global characteristics of the centralized algorithm, and has the following advantages:

[0084] (1) More sophisticated path planning. The real environment is often changing. The method proposed in this paper takes into account the impact of other trains or dynamic obstacles on train path planning. By exchanging information with adjacent trains and monitoring changes in other trains or dynamic obstacles, local path planning is performed. Train path planning has high independence and flexibility.

[0085] (2) Higher path planning efficiency. The method proposed in the present invention requires less communication and data transmission, has lower requirements for communication networks and infrastructure, and is applicable to various network sizes and environments, especially in marginal areas or where resources are limited.

[0086] (3) More flexible conflict handling. In a centralized system, the routes of all trains can be coordinated to avoid conflicts and congestion, ensuring a safe distance between trains and smooth operation. In a decentralized system, each train independently plans its own route without the intervention of a central controller, thus having higher independence and flexibility.

[0087] The above steps S1-S4 do not necessarily represent the order between the steps, but are symbolic representations of the steps, and the order between the steps can be adjusted.

[0088] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a rail transit path planning device based on ORCA. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0089] The present application provides an ORCA-based rail transit path planning device, including:

[0090] Modeling module 1 is configured to obtain a rail transit network, perform map modeling on the rail transit network, obtain an undirected graph, the undirected graph including nodes and edges, and model trains in the rail transit network as intelligent agents based on the undirected graph;

[0091] Single train path planning module 2 is configured to obtain the train's travel mission, perform single train path planning for each agent based on the undirected graph and the train's travel mission, and obtain a first path. The first path includes a number of path points. At each time step, the agent starts from the starting point and moves along its corresponding first path toward the next path point.

[0092] The local path planning module 3 is configured to obtain the state information of the agent and the state information of the first neighboring agent within the communication range of the agent based on the train's driving mission and the first path of all agents, and use the ORCA algorithm to determine whether the agent and the first neighboring agent will collide based on the state information of the agent and the state information of the first neighboring agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path, and the agent moves toward the next path point along the second path at the first moving speed. Otherwise, based on the state information of the agent and the state information of the first neighboring agent, it is determined whether the agent is deadlocked. If so, a second local path planning is performed on the agent to obtain a third path, and the agent moves toward the next path point along the third path. Otherwise, the moving speed of the agent is recalculated to obtain a second moving speed, and the agent moves toward the next path point along the first path at the second moving speed.

[0093] The repetition module 4 is configured to repeat the previous step until the agent reaches the end point.

[0094] Figure 6 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Figure 6 As shown, the electronic device of this embodiment includes: a processor 601 and a memory 602; wherein the memory 602 is used to store computer-executable instructions; and the processor 601 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description of the above method embodiment.

[0095] Optionally, the memory 602 may be independent or integrated with the processor 601 .

[0096] When the memory 602 is independently provided, the electronic device further includes a bus 603 for connecting the memory 602 and the processor 601 .

[0097] An embodiment of the present invention further provides a computer storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0098] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the above method is implemented.

[0099] In the embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, which may be electrical, mechanical or other forms.

[0100] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.

[0101] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each module may exist physically separately, or two or more modules may be integrated into a single unit. The aforementioned modular units may be implemented in the form of hardware or hardware plus software functional units.

[0102] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0103] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0104] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.

[0105] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0106] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0107] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0108] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0109] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A rail transit path planning method based on ORCA, characterized in that: The following steps are involved: Acquire a rail transit network, perform map modeling on the rail transit network to obtain an undirected graph, wherein the undirected graph includes nodes and edges, and model trains in the rail transit network as intelligent agents based on the undirected graph; Acquire the driving task of the train, perform single train path planning for each of the intelligent agents according to the undirected graph and the driving task of the train, and obtain a first path, wherein the first path includes a plurality of path points, and at each time step, the intelligent agent starts from a starting point and moves toward a next path point according to the first path corresponding to the intelligent agent; According to the driving task of the train and the first path of all the agents, the state information of the agent and the state information of the first neighbor agent within the communication range of the agent are obtained, and the ORCA algorithm is used to determine whether the agent and the first neighbor agent will collide according to the state information of the agent and the state information of the first neighbor agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path, and the agent moves toward the next path point along the second path at the first moving speed. Otherwise, according to the state information of the agent and the state information of the first neighbor agent, it is determined whether the agent is deadlocked. If so, a second local path planning is performed on the agent using the MAPF algorithm to obtain a third path, and the agent moves toward the next path point along the third path. Otherwise, the moving speed of the agent is recalculated to obtain a second moving speed, and the agent moves toward the next path point along the first path at the second moving speed. Repeat the previous step until the agent reaches the end point.

2. The rail transit path planning method based on ORCA according to claim 1 is characterized in that: The obtaining of the rail transit network, performing map modeling on the rail transit network to obtain an undirected graph, wherein the undirected graph includes nodes and edges, and modeling trains in the rail transit network into intelligent agents based on the undirected graph, specifically includes: Acquire a rail transit network, and abstract key positions of the rail transit network into nodes of an undirected graph, wherein the key positions include a turnout and a station, and a connection between two nodes is an edge of the undirected graph; Based on the undirected graph, the trains in the rail transit network are modeled as intelligent agents. The position of the train in the rail transit network corresponds to the position of the intelligent agent on the undirected graph. The position of the intelligent agent on the undirected graph is represented by a triple (Tr, v, t) and a coordinate (x, y), wherein Tr represents the intelligent agent, v represents the node on the undirected graph, t represents the time step, and x and y represent the horizontal and vertical coordinates of the intelligent agent on the undirected graph, respectively.

3. The rail transit path planning method based on ORCA according to claim 1 is characterized in that: The ORCA algorithm is used to determine whether the agent and the first neighbor agent will collide according to the state information of the agent and the state information of the first neighbor agent. If so, a first local path planning is performed on the agent to obtain a first moving speed and a second path. The agent moves toward the next path point along the second path at the first moving speed, specifically including: The ORCA algorithm is used to calculate the moving speed and moving direction of the agent according to the state information of the agent and the state information of the first neighboring agent, and obtain a first moving speed and a first moving direction; according to the first moving direction and the first path, it is determined whether the first moving direction deviates from the first path. If so, the current position of the agent is obtained, and the first moving speed and the first moving direction are determined. The search algorithm performs a first local path planning on the agent to obtain a second path, and the agent moves toward the next path point along the second path at the first moving speed, otherwise the agent moves toward the next path point along the first path at the current moving speed.

4. The rail transit path planning method based on ORCA according to claim 1 is characterized in that: The adopting of the MAPF algorithm to perform a second local path planning on the agent to obtain a third path, and the agent moving toward a next path point according to the third path, specifically includes: Acquire the current position of the agent, the current position of a first neighbor agent, and the current position of a second neighbor agent within the communication range of the first neighbor agent; Determine the minimum x coordinate based on the current position of the agent, the current position of the first neighbor agent, and the current position of the second neighbor agent , the maximum x-coordinate , the minimum y coordinate , the maximum y coordinate , according to , , and A rectangle is defined by a straight line perpendicular to the coordinate axis, and the ends of each side of the rectangle are extended by the distance of the offset parameter d to obtain the range of the second local path planning of the agent. The size of the range of the second local path planning is ; Within the scope of the second local path planning, respectively obtain the position with the closest Euclidean distance to the next path point of the agent, the position with the closest Euclidean distance to the next path point of the first neighboring agent, and the position with the closest Euclidean distance to the next path point of the second neighboring agent, and respectively obtain the local path planning end point of the agent, the local path planning end point of the first neighboring agent, and the local path planning end point of the second neighboring agent; According to the scope of the second local path planning and the current positions of all agents within the scope of the second local path planning, the first neighbor agent, the second neighbor agent and the local path planning end point, the second local path planning is performed on the agent using the MAPF algorithm to obtain a third path, and the agent moves toward the next path point along the third path.

5. The rail transit path planning method based on ORCA according to claim 1 is characterized in that: The state information includes moving speed and moving direction.

6. The rail transit path planning method based on ORCA according to claim 1, characterized in that: use The search algorithm performs single train path planning for each of the intelligent agents according to the undirected graph and the train driving task to obtain a first path. The search algorithm specifically includes: Initialize an open list, a closed list and each node of the undirected graph, set the G value of each node of the undirected graph to infinity, the G value represents the movement cost from the starting point to the node, the H value represents the estimated movement cost from the node to the end point, and the F value represents the sum of the G value and the H value; Put the starting point of the train's travel mission into the open list, and set the G value of the starting point to 0; In response to determining that the open list is not empty, a node with the smallest F value is selected from the open list as the current node, the current node is removed from the open list, and added to the closed list; in response to determining that the current node is not an end point, the adjacent nodes of the current node are traversed; in response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is not in the open list, the adjacent node is added to the open list, and the actual movement cost from the starting point through the current node to the adjacent node is calculated to obtain an actual G value; In response to determining that the adjacent node is not an obstacle and is not in the closed list, and the adjacent node is in the open list, calculating an actual movement cost from the starting point through the current node to the adjacent node to obtain an actual G value, comparing the actual G value with the current G value of the adjacent node, and in response to determining that the actual G value is less than the current G value of the adjacent node, updating the movement cost and replacing the current G value of the adjacent node with the actual G value; In response to determining that the neighboring node is an obstacle or is in the closed list, ignoring the neighboring node; In response to determining that the current node is an end point, ending the search and returning to the first path; In response to determining that the open list is empty, the search is terminated and the first path is returned.

7. A rail transit path planning device based on ORCA, characterized in that: include: A modeling module is configured to obtain a rail transit network, perform map modeling on the rail transit network to obtain an undirected graph, wherein the undirected graph includes nodes and edges, and model trains in the rail transit network into intelligent agents based on the undirected graph; a single train path planning module, configured to obtain a train driving task, perform single train path planning for each of the agents according to the undirected graph and the train driving task, and obtain a first path, wherein the first path includes a plurality of path points, and at each time step, the agent moves from a starting point along the first path corresponding to the agent toward a next path point; The local path planning module is configured to obtain the state information of the agent and the state information of the first neighbor agent within the communication range of the agent according to the driving task of the train and the first path of all the agents, and use the ORCA algorithm to determine whether the agent and the first neighbor agent will collide according to the state information of the agent and the state information of the first neighbor agent. If so, perform a first local path planning on the agent to obtain a first moving speed and a second path, and the agent moves toward the next path point along the second path at the first moving speed; otherwise, determine whether the agent is deadlocked according to the state information of the agent and the state information of the first neighbor agent; if so, perform a second local path planning on the agent using the MAPF algorithm to obtain a third path, and the agent moves toward the next path point along the third path; otherwise, recalculate the moving speed of the agent to obtain a second moving speed, and the agent moves toward the next path point along the first path at the second moving speed; The repetition module is configured to repeat the previous step until the agent reaches the end point.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.