场景3 道岔失表排列进路逻辑
This commit is contained in:
parent
582005279f
commit
dccba0e918
@ -44,7 +44,7 @@ public class CiRouteService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 进路中道岔没有被征用或锁定在相反位置
|
// 进路中道岔没有被征用或锁定在相反位置
|
||||||
Route.CheckFailMessage failMessage = setSwitchCheck(route.getSwitchList());
|
Route.CheckFailMessage failMessage = setSwitchCheck(simulation, route.getSwitchList());
|
||||||
if (failMessage != null) {
|
if (failMessage != null) {
|
||||||
return failMessage;
|
return failMessage;
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ public class CiRouteService {
|
|||||||
RouteOverlap overlap = route.getOverlap();
|
RouteOverlap overlap = route.getOverlap();
|
||||||
if (Objects.nonNull(overlap)) {
|
if (Objects.nonNull(overlap)) {
|
||||||
SectionPath sectionPath = overlap.selectPath();
|
SectionPath sectionPath = overlap.selectPath();
|
||||||
failMessage = setSwitchCheck(sectionPath.getSwitchList());
|
failMessage = setSwitchCheck(simulation, sectionPath.getSwitchList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return failMessage;
|
return failMessage;
|
||||||
@ -133,7 +133,7 @@ public class CiRouteService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Route.CheckFailMessage setSwitchCheck(List<SwitchElement> switchList) {
|
private static Route.CheckFailMessage setSwitchCheck(Simulation simulation, List<SwitchElement> switchList) {
|
||||||
if (switchList != null) {
|
if (switchList != null) {
|
||||||
for (SwitchElement switchElement : switchList) {
|
for (SwitchElement switchElement : switchList) {
|
||||||
Switch aSwitch = switchElement.getASwitch();
|
Switch aSwitch = switchElement.getASwitch();
|
||||||
@ -147,6 +147,13 @@ public class CiRouteService {
|
|||||||
if (aSwitch.isCiUseOnOppositePosition(switchElement.isNormal())) { // 道岔征用在相反位置
|
if (aSwitch.isCiUseOnOppositePosition(switchElement.isNormal())) { // 道岔征用在相反位置
|
||||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition, aSwitch);
|
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition, aSwitch);
|
||||||
}
|
}
|
||||||
|
// 非预先锁闭,道岔相应位置失表则不排进路
|
||||||
|
if (!simulation.getRepository().getConfig().isLockFirst() && aSwitch.isLoss()) {
|
||||||
|
if ((Switch.SwitchFault.NORMAL_SPLIT.equals(aSwitch.getFault()) && switchElement.isNormal())
|
||||||
|
|| (Switch.SwitchFault.REVERSE_SPLIT.equals(aSwitch.getFault()) && !switchElement.isNormal())) {
|
||||||
|
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -27,11 +27,23 @@ public class CiService {
|
|||||||
if (overlap.getSection().isRouteLock()) {
|
if (overlap.getSection().isRouteLock()) {
|
||||||
SectionPath sectionPath = overlap.selectPath();
|
SectionPath sectionPath = overlap.selectPath();
|
||||||
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||||
if (switchElement.getASwitch().isLocked() && !switchElement.isOnPosition()) {
|
Switch aSwitch = switchElement.getASwitch();
|
||||||
|
if (aSwitch.isLocked() && !switchElement.isOnPosition()) {
|
||||||
log.debug("延续保护进路[{}]道岔[{}]锁闭在相反位置,不触发办理", overlap.debugStr(),
|
log.debug("延续保护进路[{}]道岔[{}]锁闭在相反位置,不触发办理", overlap.debugStr(),
|
||||||
switchElement.getASwitch().debugStr());
|
aSwitch.debugStr());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 非预先锁闭,道岔相应位置失表则不排延续保护
|
||||||
|
if (!simulation.getRepository().getConfig().isLockFirst() && aSwitch.isLoss()) {
|
||||||
|
if ((Switch.SwitchFault.NORMAL_SPLIT.equals(aSwitch.getFault())
|
||||||
|
&& switchElement.isNormal())
|
||||||
|
|| (Switch.SwitchFault.REVERSE_SPLIT.equals(aSwitch.getFault())
|
||||||
|
&& !switchElement.isNormal())) {
|
||||||
|
log.debug("延续保护进路[{}]道岔[{}]位置失表,不触发办理", overlap.debugStr(),
|
||||||
|
aSwitch.debugStr());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
overlap.startSetting(simulation.getSystemTime());
|
overlap.startSetting(simulation.getSystemTime());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user