| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.PriorityQueue; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by vincent on 6/12/2024 |
| | |
| | | // 单巷道车辆容载数量 |
| | | Lane lane = laneService.search(node.getCodeData()); |
| | | if (null != lane) { |
| | | int otherVehicleCount = 0; |
| | | Set<String> lanVehicleSet = new HashSet<>(); |
| | | |
| | | List<String> laneCodes = lane.getCodes(); |
| | | for (String laneCodeData : laneCodes) { |
| | |
| | | assert !laneVehicle.equals(DynamicNodeType.BLOCK.val); |
| | | if (!laneVehicle.equals(DynamicNodeType.ACCESS.val)) { |
| | | if (!laneVehicle.equals(agvNo)) { |
| | | otherVehicleCount++; |
| | | lanVehicleSet.add(laneVehicle); |
| | | // redis.setObject(RedisConstant.AGV_TO_STANDBY_FLAG, laneVehicle, true, 30); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (otherVehicleCount + 1 > maxAgvCountInLane) { |
| | | if (lock) { |
| | | continue; |
| | | } |
| | | if (lanVehicleSet.size() + 1 > maxAgvCountInLane) { |
| | | // if (lock) { |
| | | // continue; |
| | | // } |
| | | continue; |
| | | } |
| | | } |
| | | |