| | |
| | | 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; |
| | | } |
| | | } |
| | | |
| | |
| | | stayTime += 2.0; // 放货需要2秒 |
| | | break; |
| | | case "3": // 充电 |
| | | stayTime += 10.0; // 充电停靠需要10秒 |
| | | stayTime += 100.0; // 充电停靠 |
| | | break; |
| | | default: |
| | | stayTime += 1.0; // 其他动作需要1秒 |