[Python] Path planning and collision avoidance in a specialized unidirectional track network

Discussão em 'Python' iniciado por Stack, Agosto 4, 2025.

  1. Stack

    Stack Membro Participativo

    I’m an AnyLogic newbie but work in operations research algorithms, and I’ve hit some roadblocks in my project. This post will be long—it’s a chronicle of my struggles, and honestly, it’s been exhausting.

    My project aims to plan paths for a group of robots traveling on unidirectional tracks similar to railways, preventing them from colliding at track intersections (their radar is very poor and cannot detect whether other robots are present at junctions). Additionally, I hope to optimize the pathfinding algorithm for these robots (currently using standard Dijkstra's algorithm) so they can quantify congestion levels on various paths during planning and avoid crowded routes.

    So far, my idea is to install RFID tags at each intersection of the tracks, enabling them to function like traffic lights: a central control system determines whether a location is in a "red" or "green" phase based on system time and predefined signal phase plans. When a robot passes an RFID tag, its onboard scanner reads the tag, and the central system receives a command to issue a "stop" or "proceed" order to the robot. Simultaneously, I will add a delay term to the robots' pathfinding algorithm—similar to A* algorithm—representing potential delays caused by red lights on their planned paths, thereby achieving traffic distribution. Furthermore, I believe the current track network for the robots is overly complex with too many intersections. If signals were installed at every intersection, traffic efficiency would significantly decline. Thus, I hope to identify truly critical paths within the network and block unimportant ones to reduce intersections.

    However, my plan has encountered significant difficulties: I researched transportation literature and realized this resembles a traffic flow assignment problem. For my first attempt, I used the User Equilibrium (UE) model from traffic flow theory. The challenge is that the model requires impedance functions to represent the impedance of road sections or nodes, and these functions—whether HCM2000, BRP functions, or others—demand extensive traffic parameters. These parameters are impossible to obtain for a project still on paper, especially since my project is not a real road network, and the differences would introduce more errors. I ran the model with my assumed parameters, and the results were terrible and unusable.

    I then turned to simulation, thinking that if I could use software like AnyLogic to construct my track network and simulate robot movement logic, I might obtain needed data—such as intersection throughput and segment flow rates—or even train machine learning models via simulation to directly calculate delay metrics required for traffic distribution algorithms. Yet, as an AnyLogic beginner, this is also very difficult: I found none of the libraries provided by AnyLogic (traffic, material handling, or standard process modeling) perfectly fit my needs. Each has characteristics distinct from my scenario, and my work computer cannot handle overly complex scenes. Building the network in AnyLogic exhausted me, and I still haven’t devised a suitable method to extract the data I need, let alone complete the network.

    If you’ve read this far, please accept my gratitude for enduring my complaint-like background. I sincerely welcome suggestions from any angle of this plan, as I’m currently somewhat lost and unsure how to advance this project.

    Continue reading...

Compartilhe esta Página