测试过程问题修改

This commit is contained in:
zgw
2026-01-15 08:49:34 +08:00
parent 4fef962e6c
commit 3b5f168b45
9 changed files with 376 additions and 54 deletions

View File

@@ -0,0 +1,22 @@
I will implement collision avoidance logic in `BaseSRgvThread.java` to handle scenarios where a path is blocked by another SRGV.
**Implementation Plan:**
1. **Modify `sendPointToPointTask` method in `BaseSRgvThread.java`**:
* Locate the block where `shortestPath` is null or empty (indicating a blocked path).
* After the existing specific logic for "Floor 1", add a generic avoidance strategy.
* **Avoidance Strategy**:
1. Query `WcsSrgvMap` for all sites with `remark="cache"` (avoidance points) on the current floor.
2. Filter out sites that are currently occupied by other SRGVs.
3. Find the nearest reachable avoidance point to the current car.
4. **Task Splitting (Yielding Logic)**:
* **Create a new "Continuation" Queue**: Clone the current task but set its `StartSite` to the avoidance point and keep the original `EndSite`. Insert this as a new pending task.
* **Update Current Queue**: Change the `EndSite` of the current blocked task to the **Avoidance Point**. This effectively converts the current task into a "Yielding" task.
5. Return `false` to allow the scheduler to pick up the modified task in the next cycle.
**Technical Details:**
* Use `wcsSrgvMapService` to fetch avoidance points.
* Use `PathFinder` to verify reachability of the avoidance point.
* Use `BeanUtil` (Hutool) or manual setters to clone the queue.
* Ensure the new logic does not interfere with the existing "Floor 1" logic (put it after or as an `else` condition).
This approach ensures that when blocked, the car moves to a safe spot (Yielding Queue) and then resumes its original journey (Continuation Queue).