| | |
| | | import com.zy.core.News; |
| | | import com.zy.core.enums.MapNodeType; |
| | | import com.zy.core.model.PythonSimilarityResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | |
| | | @Value("${pythonCalcPath}") |
| | | private String pythonCalcPath; |
| | | |
| | | @Value("${pythonCalcSimilarity}") |
| | | private String pythonCalcSimilarity; |
| | | @Autowired |
| | | private NavigateMapData navigateMapData; |
| | | |
| | | public List<NavigateNode> calc(String startPoint, String endPoint, Integer mapType, List<int[]> shuttlePoints, List<int[]> whites) { |
| | | return calcJava(startPoint, endPoint, mapType, shuttlePoints, whites); |
| | |
| | | * 检测路径是否可用(可走) |
| | | */ |
| | | public boolean checkPathIsAvailable(List<NavigateNode> path, Integer shuttleNo, Integer lev) { |
| | | NavigateSolution solution = new NavigateSolution(NavigationMapType.DFX.id, lev, null, Utils.getShuttlePoints(shuttleNo, lev));//获取无白名单地图(该地图包含小车坐标) |
| | | int[][] map = solution.map; |
| | | int[][] map = navigateMapData.getDataFromRedis(lev, NavigationMapType.DFX.id, null, Utils.getShuttlePoints(shuttleNo, lev)); |
| | | for (NavigateNode node : path) { |
| | | int value = map[node.getX()][node.getY()]; |
| | | if (value != MapNodeType.NORMAL_PATH.id && value != MapNodeType.MAIN_PATH.id && value != MapNodeType.CHARGE.id && value != MapNodeType.CONVEYOR_CAR_GO.id) {//母轨道3、子轨道0、充电桩5、小车可走输送站 |