实现“进路中道岔故障时,区段和道岔由远及近锁闭,并且可以开放引导信号”逻辑
This commit is contained in:
parent
cd92403096
commit
1be9cccc4a
|
@ -164,6 +164,10 @@ public class CiRouteService {
|
|||
if (aSwitch.isCiUseOnOppositePosition(switchElement.isNormal())) { // 道岔征用在相反位置
|
||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition, aSwitch);
|
||||
}
|
||||
//道岔失表时,进路中的区段和道岔由远及近锁闭,直到失表的道岔处 -南铁院叶老师
|
||||
if (simulation.getRepository().getConfig().isRouteCanSetWhenSwitchFault()) {
|
||||
continue;
|
||||
}
|
||||
// 非预先锁闭,道岔相应位置失表则不排进路
|
||||
if (!simulation.getRepository().getConfig().isLockFirst() && aSwitch.isLoss()) {
|
||||
if ((Switch.SwitchFault.NORMAL_SPLIT.equals(aSwitch.getFault()) && switchElement.isNormal())
|
||||
|
@ -259,7 +263,7 @@ public class CiRouteService {
|
|||
// 道岔位置转换
|
||||
boolean mainRouteSwitchOnPos = this.switchControlService.ensureSwitchPosCurrent(simulation, route.getSwitchList(), route.isGuideSetting());
|
||||
// 预先锁闭
|
||||
if (mainRouteSwitchOnPos || config.isLockFirst()) {
|
||||
if (mainRouteSwitchOnPos || config.isLockFirst() || config.isRouteCanSetWhenSwitchFault()) {
|
||||
// 进路排列区段预先锁闭
|
||||
this.checkAndLockRouteMain(route, config.isRailway());
|
||||
}
|
||||
|
@ -336,21 +340,42 @@ public class CiRouteService {
|
|||
boolean right = route.isRight();
|
||||
List<Section> sectionList = route.getSectionList();
|
||||
List<SwitchElement> switchList = route.getSwitchList();
|
||||
for (SwitchElement switchElement : switchList) {
|
||||
if (switchElement.isOnPosition() || (route.isGuideSetting() && switchElement.getASwitch().isGuideMasterLock())) {
|
||||
switchElement.getASwitch().routeLock(route);
|
||||
}
|
||||
}
|
||||
for (Section section : sectionList) {
|
||||
//大铁引导进路只锁闭指定区段(为了解决引导总锁方式办理道岔失表的引导进路时,失表道岔的所有区段都锁闭的问题)
|
||||
if (section.isSwitchTrack() && !(railway && route.isGuideSetting())) {
|
||||
Switch relSwitch = section.getRelSwitch();
|
||||
relSwitch.sectionRouteLocking(route, right);
|
||||
for (int i = sectionList.size() - 1; i >= 0; i--) {
|
||||
Section section = sectionList.get(i);
|
||||
if (section.isSwitchTrack()) {
|
||||
if (section.getRelSwitch().isLoss()) {
|
||||
break;
|
||||
} else {
|
||||
section.getRelSwitch().sectionRouteLocking(route, right);
|
||||
}
|
||||
} else {
|
||||
section.routeLocking(route, right);
|
||||
}
|
||||
}
|
||||
for (int i = switchList.size() - 1; i >= 0; i--) {
|
||||
SwitchElement switchElement = switchList.get(i);
|
||||
if (switchElement.isOnPosition() || (route.isGuideSetting() && switchElement.getASwitch().isGuideMasterLock())) {
|
||||
switchElement.getASwitch().routeLock(route);
|
||||
}
|
||||
}
|
||||
route.setLock(true);
|
||||
|
||||
|
||||
// for (SwitchElement switchElement : switchList) {
|
||||
// if (switchElement.isOnPosition() || (route.isGuideSetting() && switchElement.getASwitch().isGuideMasterLock())) {
|
||||
// switchElement.getASwitch().routeLock(route);
|
||||
// }
|
||||
// }
|
||||
// for (Section section : sectionList) {
|
||||
// //大铁引导进路只锁闭指定区段(为了解决引导总锁方式办理道岔失表的引导进路时,失表道岔的所有区段都锁闭的问题)
|
||||
// if (section.isSwitchTrack() && !(railway && route.isGuideSetting())) {
|
||||
// Switch relSwitch = section.getRelSwitch();
|
||||
// relSwitch.sectionRouteLocking(route, right);
|
||||
// } else {
|
||||
// section.routeLocking(route, right);
|
||||
// }
|
||||
// }
|
||||
// route.setLock(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -147,6 +147,9 @@ public class CiService {
|
|||
return level;
|
||||
}
|
||||
// 进路区段检查
|
||||
if (simulation.getRepository().getConfig().isRouteCanSetWhenSwitchFault()) {
|
||||
level = Signal.LEVEL_Guide;
|
||||
}
|
||||
boolean right = route.isRight();
|
||||
List<Section> sectionList = route.getSectionList();
|
||||
for (Section section : sectionList) {
|
||||
|
|
|
@ -251,7 +251,7 @@ public class MapConfig {
|
|||
private boolean hasTDCS;
|
||||
|
||||
/**
|
||||
* 道岔故障时可以办理进路(由远及近锁闭,到故障处终止)
|
||||
* 道岔失表/挤岔时可以办理进路(由远及近锁闭,到失表/挤岔处终止,并且可以开放引导信号)
|
||||
*/
|
||||
private boolean routeCanSetWhenSwitchFault;
|
||||
|
||||
|
|
Loading…
Reference in New Issue