| | |
| | | } |
| | | |
| | | // choose min number of running task |
| | | actualAvailableAgvNos.sort(Comparator.comparingInt(agvNo -> calcAllocateWeight(agvNo, task))); |
| | | actualAvailableAgvNos.sort((o1, o2) -> Integer.compare( |
| | | calcAllocateWeight(o2, task), |
| | | calcAllocateWeight(o1, task) |
| | | )); |
| | | |
| | | if (null != originLane) { |
| | | task.setOriLaneHash(originLane.getHashCode()); |
| | |
| | | |
| | | // has enough backpack space to load |
| | | Integer backpack = agvService.getBackpack(agvId); |
| | | int countRemainingBackpack = segmentService.countRemainingBackpack(null, agvId); |
| | | if (countRemainingBackpack >= backpack) { |
| | | List<Integer> usedBackpacks = segmentService.selectUsedBackpacks(null, agvId); |
| | | if (usedBackpacks.size() >= backpack) { |
| | | continue; |
| | | } |
| | | |