延续保护中的设备状态不正确时,取消延续保护锁闭状态

This commit is contained in:
joylink_zhangsai 2021-05-27 13:33:43 +08:00
parent bdb2777522
commit f2de22e0d8
2 changed files with 23 additions and 8 deletions

View File

@ -423,7 +423,7 @@ public class RouteService {
this.sectionLock(simulation, route);
route.getStart().setLevel(Signal.LEVEL_2);
// 侧防检查
boolean flsOnPosition = this.isFlsSwitchOnPosition(route.getFlsList());
boolean flsOnPosition = this.isFlsCheckPass(route.getFlsList());
if (flsOnPosition) {
// 侧防锁闭
this.routeFlsLock(route.getFlsList());
@ -455,9 +455,10 @@ public class RouteService {
SwitchElement pSwitch = flsElement.getPSwitch();
if (pSwitch != null) {
switchElementList.add(pSwitch);
} else if (flsElement.getFpae() != null) {
switchElementList.add(flsElement.getFpae());
}
// else if (flsElement.getFpae() != null) {
// switchElementList.add(flsElement.getFpae());
// }
}
}
this.routeSwitchTurn(simulation, switchElementList);
@ -552,7 +553,7 @@ public class RouteService {
}
}
// 道岔是否转换到位置
boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsSwitchOnPosition(flsList);
boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsCheckPass(flsList);
if (!onPosition) return; // 未到位返回
if (!overlap.getSection().isRouteLock()) {
return;
@ -562,7 +563,10 @@ public class RouteService {
log.debug(String.format("进路延续保护[%s]办理成功", overlap.debugStr()));
}
private boolean isFlsSwitchOnPosition(List<RouteFls> flsList) {
/**
* 侧防检查是否通过
*/
private boolean isFlsCheckPass(List<RouteFls> flsList) {
if (!CollectionUtils.isEmpty(flsList)) {
for (RouteFls routeFls : flsList) {
List<RouteFls.FlsElement> level1List = routeFls.getLevel1List();
@ -1293,11 +1297,22 @@ public class RouteService {
}
}
}
RouteOverlap overlap = route.getOverlap();
if (route.isOpen()) {
if (this.checkCanOverlapSet(simulation, route) && !route.getOverlap().isLock()) {
if (this.checkCanOverlapSet(simulation, route) && !overlap.isLock()) {
this.checkAndSetLockedRouteOverlap(simulation, route);
}
}
//延续保护锁闭后持续监视
if (overlap != null && overlap.isLock()) {
SectionPath sectionPath = overlap.selectPath();
List<SwitchElement> switchList = sectionPath.getSwitchList();
List<RouteFls> flsList = sectionPath.getFlsList();
boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsCheckPass(flsList);
if (!onPosition) {
overlap.setLock(false);
}
}
}
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {

View File

@ -597,14 +597,14 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
if (Fault.DRIVE_FAULT.equals(fault) && fk > 0) {
return;
}
if (isNeedDepartureCommand()) {
if (isNeedDepartureCommand() && fk > 0) {
return;
}
enforceUpdateTBForce(fk, fb);
}
/**
* 强制改变牵引制动力暂时只用于连挂操作
* 强制改变牵引制动力
*/
public void enforceUpdateTBForce(float fk, float fb) {
this.fk = fk;