jianghaiyue
4 天以前 71f29001d7ec27a72b33143dc104abd34822268a
algo-zkd/src/main/java/com/algo/service/RemainingPathProcessor.java
@@ -193,8 +193,16 @@
            String currentDirection = currentCode.getDirection();
            String nextDirection = nextCode.getDirection();
            if (!currentDirection.equals(nextDirection)) {
                stayTime += config.getTurnTime(currentDirection, nextDirection);
            if (currentDirection != null && nextDirection != null) {
                if (!currentDirection.equals(nextDirection)) {
                    stayTime += config.getTurnTime(currentDirection, nextDirection);
                }
            } else {
                if (pathIndex == agv.getCurrentPathIndex()) {
                    System.out.println("AGV " + agv.getAgvId() +
                                     " 的剩余路径中direction字段为null");
                }
                stayTime += 0.5;
            }
        }
@@ -208,7 +216,7 @@
                    stayTime += 2.0; // 放货需要2秒
                    break;
                case "3": // 充电
                    stayTime += 10.0; // 充电停靠需要10秒
                    stayTime += 100.0; // 充电停靠
                    break;
                default:
                    stayTime += 1.0; // 其他动作需要1秒