| | |
| | | package com.zy.acs.manager.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.acs.common.constant.RedisConstant; |
| | | import com.zy.acs.common.utils.RedisSupport; |
| | | import com.zy.acs.common.utils.Utils; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.manager.common.utils.MapDataUtils; |
| | | import com.zy.acs.manager.core.constant.MapDataConstant; |
| | | import com.zy.acs.manager.core.domain.Lane; |
| | | import com.zy.acs.manager.core.service.astart.*; |
| | | import com.zy.acs.manager.core.service.astart.domain.DynamicNode; |
| | | import com.zy.acs.manager.core.utils.RouteGenerator; |
| | | import com.zy.acs.manager.manager.entity.Code; |
| | | import com.zy.acs.manager.manager.entity.Jam; |
| | | import com.zy.acs.manager.manager.entity.Route; |
| | | import com.zy.acs.manager.manager.entity.Segment; |
| | | import com.zy.acs.manager.manager.enums.JamStateType; |
| | | import com.zy.acs.manager.manager.service.*; |
| | |
| | | |
| | | @Autowired |
| | | private CodeService codeService; |
| | | @Autowired |
| | | private RouteService routeService; |
| | | @Autowired |
| | | private MapDataDispatcher mapDataDispatcher; |
| | | @Autowired |
| | |
| | | String breakPoint = avoidPathList.stream().findFirst().orElse(null); |
| | | List<String> blackList = Utils.singletonList(sponsor); |
| | | |
| | | Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModelService.getById(agvService.selectByUuid(sponsor).getAgvModel()).getDiameter() |
| | | Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModelService.getByAgvNo(sponsor).getDiameter() |
| | | , MapDataConstant.MAX_DISTANCE_BETWEEN_ADJACENT_AGV_FACTOR); |
| | | List<String> avoidPathListWave = mapService.getWaveScopeByCodeList(lev, avoidPathList, avoidDistance); |
| | | |
| | |
| | | if (!Cools.isEmpty(blackList) && blackList.contains(otherWave)) { |
| | | continue label; |
| | | } |
| | | if (1 < mapDataDispatcher.queryCodeListFromDynamicNode(lev, otherWave).size()) { |
| | | if (mapService.isWalkingByVehicle(lev, otherWave)) { |
| | | phaseSecond = false; // there is a running way |
| | | continue label; |
| | | } else { |
| | |
| | | |
| | | } |
| | | |
| | | Code code = codeService.selectByData(node.getCodeData()); |
| | | Code code = codeService.getCacheByData(node.getCodeData()); |
| | | |
| | | // judge whether the node has already been marked as a retreat node? |
| | | // This is a very troublesome matter, if the node be repeatedly mark as a retreat node |
| | |
| | | if (!Cools.isEmpty(blackList) && blackList.contains(otherWave)) { |
| | | continue; |
| | | } |
| | | if (1 < mapDataDispatcher.queryCodeListFromDynamicNode(lev, otherWave).size()) { |
| | | if (mapService.isWalkingByVehicle(lev, otherWave)) { |
| | | |
| | | if (null != availablePointOfTurn && actualLanesOfTurn > 0) { |
| | | actualLanesOfTurn --; |