ATS进路触发bug修改,添加进路服务日志

This commit is contained in:
walker-sheng 2021-01-21 16:09:38 +08:00
parent 6b843ad147
commit c747a67d59
2 changed files with 19 additions and 8 deletions

View File

@ -39,11 +39,9 @@ public class AtsRouteSettingService {
// 执行进路排列 // 执行进路排列
for (TrainRoute trainRoute : waitSetList) { for (TrainRoute trainRoute : waitSetList) {
Route route = trainRoute.getRoute(); Route route = trainRoute.getRoute();
if (!simulation.getRepository().hasSettingRoute(route)) {
this.ciApiService.settingRoute(simulation, route.getCode()); this.ciApiService.settingRoute(simulation, route.getCode());
} }
} }
}
private List<TrainRoute> queryWaitSettingRoutes(Simulation simulation, List<TrainInfo> trainList) { private List<TrainRoute> queryWaitSettingRoutes(Simulation simulation, List<TrainInfo> trainList) {
SimulationDataRepository repository = simulation.getRepository(); SimulationDataRepository repository = simulation.getRepository();

View File

@ -792,9 +792,13 @@ public class RouteService {
List<Section> sectionList = route.getSectionList(); List<Section> sectionList = route.getSectionList();
for (Section section : sectionList) { for (Section section : sectionList) {
if (!section.isRouteLockOn(right)) { if (!section.isRouteLockOn(right)) {
log.info(String.format("进路[%s]连锁条件检查失败:区段[%s]锁闭方向错误", route.debugStr(),
section.debugStr()));
return level; return level;
} }
if (section.isNoStatus()) { if (section.isNoStatus()) {
log.info(String.format("进路[%s]连锁条件检查失败:区段[%s]连锁无状态", route.debugStr(),
section.debugStr()));
return level; return level;
} }
} }
@ -813,13 +817,15 @@ public class RouteService {
} else { } else {
p = "失表"; p = "失表";
} }
log.debug(String.format("联锁网络检查失败:道岔[%s(%s)]位置[%s]", log.info(String.format("进路[%s]连锁条件检查失败:道岔[%s(%s)]位置[%s]",
route.debugStr(),
element.getASwitch().getName(), element.getASwitch().getCode(), p)); element.getASwitch().getName(), element.getASwitch().getCode(), p));
return level; return level;
} }
} }
level = Signal.LEVEL_2; // 引导级 level = Signal.LEVEL_2; // 引导级
if (route.getStart().isBlockade()) { if (route.getStart().isBlockade()) {
log.info(String.format("进路[%s]连锁条件检查失败:始端信号机封锁", route.debugStr()));
return level; return level;
} }
// 进路侧防检查 // 进路侧防检查
@ -839,6 +845,7 @@ public class RouteService {
if ((pSignal != null && !pSignal.isClose()) || if ((pSignal != null && !pSignal.isClose()) ||
(fpae != null && !fpae.getASwitch().isOnPosition(fpae.isNormal()))) { (fpae != null && !fpae.getASwitch().isOnPosition(fpae.isNormal()))) {
level1Result = false; level1Result = false;
break;
} }
} }
} }
@ -851,6 +858,8 @@ public class RouteService {
if (!CollectionUtils.isEmpty(route.getEspList())) { if (!CollectionUtils.isEmpty(route.getEspList())) {
for (ESP esp : route.getEspList()) { for (ESP esp : route.getEspList()) {
if (esp.isEffective()) { if (esp.isEffective()) {
log.info(String.format("进路[%s]连锁条件检查失败:站台紧急停车按钮[%s]按下", route.debugStr(),
esp.debugStr()));
return level; return level;
} }
} }
@ -865,10 +874,12 @@ public class RouteService {
Collections.reverse(logicList); Collections.reverse(logicList);
} }
if (logicList.get(0).isOccupied()) { if (logicList.get(0).isOccupied()) {
log.info(String.format("进路[%s]连锁条件检查失败CTC模式首个区段占用", route.debugStr()));
return level; return level;
} }
} else { } else {
if (firstRouteSection.isOccupied()) { if (firstRouteSection.isOccupied()) {
log.info(String.format("进路[%s]连锁条件检查失败CTC模式首个区段占用", route.debugStr()));
return level; return level;
} }
} }
@ -876,7 +887,8 @@ public class RouteService {
// 区段占用检查 // 区段占用检查
Route.CheckFailMessage checkFailMessage = this.ciLevelCheck(route); Route.CheckFailMessage checkFailMessage = this.ciLevelCheck(route);
if (Objects.nonNull(checkFailMessage)) { if (Objects.nonNull(checkFailMessage)) {
log.debug(String.format("联锁网络检查失败:[%s]", checkFailMessage.toJson())); log.info(String.format("进路[%s]连锁条件检查失败:[%s]",
route.debugStr(), checkFailMessage.toJson()));
return level; return level;
} }
// // 屏蔽门 // // 屏蔽门
@ -894,7 +906,8 @@ public class RouteService {
if (!CollectionUtils.isEmpty(route.getStandHoldList())) { if (!CollectionUtils.isEmpty(route.getStandHoldList())) {
for (Stand stand : route.getStandHoldList()) { for (Stand stand : route.getStandHoldList()) {
if (stand.isHoldTrain()) { if (stand.isHoldTrain()) {
log.debug(String.format("联锁网络检查失败:站台[%s(%s)]扣车", log.info(String.format("进路[%s]连锁条件检查失败:站台[%s(%s)]扣车",
route.debugStr(),
stand.getName(), stand.getCode())); stand.getName(), stand.getCode()));
return level; return level;
} }
@ -1153,8 +1166,8 @@ public class RouteService {
if (!interlocked) { if (!interlocked) {
// 进路信号开放联锁逻辑不满足需关闭信号 // 进路信号开放联锁逻辑不满足需关闭信号
this.routeClose(simulation, route); this.routeClose(simulation, route);
log.debug(String.format("进路始端信号联锁条件不满足,信号机[%s(%s)]关灯", log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯",
route.getStart().getName(), route.getStart().getCode())); route.debugStr(), route.getStart().getName(), route.getStart().getCode()));
} }
// this.reLockOverlap(simulation, route); // this.reLockOverlap(simulation, route);
// } // }