| | |
| | | } |
| | | } |
| | | |
| | | News.info("{}目标库位没有搜索到可用穿梭车", locNo); |
| | | //News.info("{}目标库位没有搜索到可用穿梭车", locNo); |
| | | return false; |
| | | } |
| | | |
| | |
| | | int currentLev = Utils.getLev(shuttleProtocol.getCurrentLocNo());//小车当前层高 |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo();//小车当前库位号 |
| | | |
| | | if (currentLocNo.equals(locNo)) { |
| | | if (currentLocNo.equals(locNo) || currentLocNo.equals(sourceLocNo)) { |
| | | //车辆当前位置已经是目标库位,调度该车 |
| | | //给工作档绑定小车号 |
| | | WrkMast wrkMast1 = wrkMastService.selectByWorkNo(wrkNo); |
| | |
| | | sameShuttles.put(-1, shuttleThread); |
| | | continue; |
| | | } |
| | | |
| | | //当前穿梭车线程到目标地点距离 |
| | | List<NavigateNode> currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | //TODO |
| | | List<NavigateNode> currentShuttlePath; |
| | | if (Utils.getLev(currentLocNo) != Utils.getLev(locNo)) { |
| | | //当前穿梭车线程到目标地点距离 |
| | | currentShuttlePath = navigateUtils.calc(currentLocNo, sourceLocNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | } |
| | | } else { |
| | | //当前穿梭车线程到目标地点距离 |
| | | currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图 |
| | | if (currentShuttlePath == null) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | Integer currentAllDistance = navigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离 |
| | | sameShuttles.put(currentAllDistance, shuttleThread); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小车迁移任务生成 |
| | | */ |