| | |
| | | Date now = new Date(); |
| | | Jam jam = jamService.getJam(agv.getId(), startCode.getId(), segment.getId()); |
| | | // judge avoid of jam |
| | | List<Jam> unfinishedOriginJamByCurrAgv = jamService.hasUnfinishedOriginJamByAvo(agv.getId(), startCode.getId(), segment.getId()); |
| | | List<Jam> unfinishedOriginJamByCurrAgv = jamService.getUnfinishedOriginJamByAvo(agv.getId(), startCode.getId(), segment.getId()); |
| | | List<String> blackPath = this.getBlackPathList(unfinishedOriginJamByCurrAgv); |
| | | |
| | | // 结果集 |
| | | List<String> pathList = new ArrayList<>(); |
| | | |
| | | // 无障碍解 |
| | | List<String> unlockPathList = mapService.checkoutPath(agvNo, startCode, endCode, false, blackPath); |
| | | List<String> unlockPathList = mapService.checkoutPath(agvNo, startCode, endCode, false, blackPath, segment); |
| | | // 避让解 |
| | | List<String> lockPathList = mapService.checkoutPath(agvNo, startCode, endCode, true, blackPath); |
| | | List<String> lockPathList = mapService.checkoutPath(agvNo, startCode, endCode, true, blackPath, segment); |
| | | |
| | | if (!Cools.isEmpty(lockPathList) && // 存在避让解 |
| | | Math.abs(lockPathList.size() - unlockPathList.size()) <= Arrays.stream(mapDataDispatcher.getCodeMatrix(lev)).mapToInt(row -> row.length).sum() / 10 |