| | |
| | | @Autowired |
| | | private LocService locService; |
| | | @Autowired |
| | | private LaneService laneService; |
| | | private LaneBuilder laneBuilder; |
| | | @Autowired |
| | | private AgvAreaDispatcher agvAreaDispatcher; |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | // 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()); |
| | |
| | | } |
| | | |
| | | public Boolean validCapacityOfLane(String agvNo, Code code) { |
| | | Lane lane = laneService.search(code.getData()); |
| | | Lane lane = laneBuilder.search(code.getData()); |
| | | if (null != lane) { |
| | | Integer maxAgvCountInLane = configService.getVal("maxAgvCountInLane", Integer.class); |
| | | |