|  |  |  | 
|---|
|  |  |  | if (rgvProtocol == null){ | 
|---|
|  |  |  | continue ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | double finalVelocity = 0.0;     // 最终速度 (m/s) | 
|---|
|  |  |  | double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed/60, 2)) / (2 * acceleration); | 
|---|
|  |  |  | BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", wrkMast.getSourceStaNo())); | 
|---|
|  |  |  | if (distance*proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(),rgvProtocol.getRgvPos(),perimeter) + (rgvProtocol.instantaneousSpeed/60)*10000*0.5))){ | 
|---|
|  |  |  | continue ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("rgv_no", rgvProtocol.getRgvNo()).eq("wrk_sts", 2L)); | 
|---|
|  |  |  | if (!wrkMasts.isEmpty()){ | 
|---|
|  |  |  | 
|---|
|  |  |  | && (rgvProtocol.getStatusType() == RgvStatusType.IDLE || rgvProtocol.getStatusType() == RgvStatusType.ROAM) | 
|---|
|  |  |  | && rgvProtocol.getTaskNo1()==0 | 
|---|
|  |  |  | && rgvProtocol.getAlarm() == 0){ | 
|---|
|  |  |  | if (rgvProtocol.getStatusType() == RgvStatusType.ROAM) { | 
|---|
|  |  |  | double finalVelocity = 0.0;     // 最终速度 (m/s) | 
|---|
|  |  |  | double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed/60, 2)) / (2 * acceleration); | 
|---|
|  |  |  | BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", wrkMast.getSourceStaNo())); | 
|---|
|  |  |  | if (distance*proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(),rgvProtocol.getRgvPos(),perimeter) + (rgvProtocol.instantaneousSpeed/60)*10000*0.5))){ | 
|---|
|  |  |  | continue ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | RgvCommand rgvCommand = new RgvCommand(); | 
|---|
|  |  |  | rgvCommand.setRgvNo(rgvProtocol.getRgvNo()); | 
|---|
|  |  |  | rgvCommand.setAckFinish1((short) 0);  // 工位1任务完成确认位 | 
|---|