# Bio-Inspired Traffic Pattern Generation for Multi-AMR Systems
## 3 Methodology
### Bio-Inspired Coordination Mechanisms  
In our framework, each AMR acts as an \"ant\" executing transport tasks. Paths are planned using a modified A* algorithm that favors straight-line movements by adding small penalties for direction changes. The costmap guiding AMR navigation evolves through the following four bio-inspired mechanisms that continuously update edge weights:  
**Movement rewards (pheromone deposition):** Similar to pheromone trails in natural ant colonies, successful movements reinforce paths by reducing their costs:  
\[\Delta w_{e}=-r_{m} \tag{2}\]  
where \(r_{m}\) is the movement reward factor. The mechanism encourages the reuse of paths. **Collision handling:** When AMRs encounter conflicts, the system applies both temporal delays and spatial penalties:  
\[t_{collision}=t_{p}\cdot n_{conflict} \tag{3}\]  
where \(t_{p}\) is the base penalty duration and \(n_{conflict}\) is the number of AMRs involved. In addition, the edges that lead to the collision are penalized to prevent the AMRs from taking these paths in the future:  
\[\Delta w_{e}=p_{c}\cdot \begin{cases}1&\text{if regular collision}\\ \alpha_{s}&\text{if side collision}\end{cases}  \tag{4}\]  
where \(p_{c}\) is the collision penalty factor and \(\alpha_{s}\in[0,1]\) is the side collision multiplier, which can be adjusted to reduce the penalty for side collisions. This reflects that merging into the existing traffic flow is less disruptive than head-on collisions. **Delay feedback:** The third mechanism takes into account the delay by reducing costs when the task is completed on time and increasing costs when collisions and resulting delays occur. When a task is completed, all edges in its path are updated based on the delay:  
\[\Delta w_{e}=\alpha_{d}\cdot(t_{completion}-t_{due}) \tag{5}\]  
where \(\alpha_{d}\) is the delay factor and \((t_{completion}-t_{due})\) is the task's delay. This mechanism reinforces paths without delays and helps to avoid future conflicts by discouraging AMRs from using recently contested paths. **Pheromone evaporation:** The evaporation mechanism is designed to prevent the system from over-relying on recently adjusted edge weights that may have been affected by temporary conditions such as transient congestion or short-lived obstacles. By gradually resetting the value of each weight to its initial value \(w_{init}\), the system ensures that the influence of past events diminishes over time. The edge weights gradually return to their initial value \(w_{init}\) through  
\[\Delta w_{e}=-\lambda(w_{e}-w_{init}) \tag{6}\]  
where \(\lambda\) is the evaporation rate. This prevents the system from becoming trapped in suboptimal patterns. **Weight update implementation:** The effectiveness of the bio-inspired mechanisms depends critically on how weight modifications are implemented. A key challenge is maintaining edge weights within meaningful bounds ([\(\epsilon\), \(1-\epsilon\)]) while ensuring that repeated modifications do not lead to saturation or numerical instability. To address this, we employ a log-ratio transformation for all weight updates:  
\[w_{new}=\frac{e^{\ln(w_{add}/(1-w_{old}))+\Delta w}}{1+e^{\ln(w_{old}/(1-w_{old }))+\Delta w}} \tag{7}\]where \(w_{new}\) is the updated edge weight, \(w_{old}\) is the current edge weight, and \(\Delta w\) represents the weight modification determined by the various mechanisms. This transformation naturally bounds weights between 0 and 1 while preserving relative differences in magnitudes of the modifications. It enables smooth, continuous updates without abrupt changes. All previously described mechanisms (movement rewards, collision penalties, delay feedback, and evaporation) express their modifications as \(\Delta w\) values, which are then applied through this transformation. This unified approach to weight updates ensures that the different mechanisms work harmoniously, creating a robust and stable adaptation system that maintains its responsiveness throughout extended operation periods.