| | |
| | | @Autowired |
| | | private MainService mainService; |
| | | @Autowired |
| | | private MainLockWrapService mainLockWrapService; |
| | | @Autowired |
| | | private MapService mapService; |
| | | @Autowired |
| | | private MapDataDispatcher mapDataDispatcher; |
| | |
| | | if (!Cools.isEmpty(waitingSegList)) { |
| | | for (Segment waitingSeg : waitingSegList) { |
| | | if (!waitingSeg.getId().equals(segment.getId())) { |
| | | log.error("AGV[{}] 任务异常,服务器错误!!!", agv.getUuid()); |
| | | return; |
| | | } |
| | | } |
| | |
| | | if (!pathList.get(pathList.size() - 1).equals(endCode.getData())) { |
| | | assert !Cools.isEmpty(blockVehicleList); |
| | | |
| | | boolean hasUnavoidableBlocks = blockVehicleList.stream().anyMatch(blockVehicleDto -> !blockVehicleDto.isAvoidable()); |
| | | boolean hasUnavoidableBlocks = blockVehicleList.stream().anyMatch(blockVehicleDto -> !blockVehicleDto.isAvoidable()); |
| | | if (hasUnavoidableBlocks && pathList.size() <= MIN_SLICE_PATH_LENGTH) { |
| | | log.info("AGV[{}] waiting in place, because the path list is too short...", agvNo); |
| | | pathList.clear(); |
| | | } |
| | | |
| | | boolean hasCycleJam = blockVehicleList.stream().anyMatch( |
| | | blockVehicleDto -> null != jamService.getCycleJam(agv.getId(), segment.getId(), blockVehicleDto.getVehicle()) |
| | | ); |
| | | if (hasCycleJam) { |
| | | log.info("AGV[{}] waiting in place, because has cycle jam...", agvNo); |
| | | pathList.clear(); |
| | | } |
| | | } |
| | |
| | | |
| | | } else { |
| | | |
| | | return mainService.buildMinorTask(agv, null, TaskTypeType.MOVE, endCodeData); |
| | | return mainLockWrapService.buildMinorTask(agv, null, TaskTypeType.MOVE, endCodeData); |
| | | } |
| | | |
| | | return true; |