Merge remote-tracking branch 'origin/test' into third-part-control
This commit is contained in:
commit
09de047a74
@ -177,6 +177,7 @@ public class CILogicLoop {
|
|||||||
for (RouteOverlap overlap : overlapList) {
|
for (RouteOverlap overlap : overlapList) {
|
||||||
if (overlap.isLock()) {// 延续保护已锁闭
|
if (overlap.isLock()) {// 延续保护已锁闭
|
||||||
this.routeService.overlapUnlock(simulation, overlap);
|
this.routeService.overlapUnlock(simulation, overlap);
|
||||||
|
this.routeService.overlapCancelLock(overlap);
|
||||||
} else {
|
} else {
|
||||||
// 延续保护锁闭禁止条件释放
|
// 延续保护锁闭禁止条件释放
|
||||||
this.routeService.checkAndAllowOverlap(simulation, overlap);
|
this.routeService.checkAndAllowOverlap(simulation, overlap);
|
||||||
|
@ -1313,8 +1313,12 @@ public class RouteService {
|
|||||||
this.checkAndSetLockedRouteOverlap(simulation, route);
|
this.checkAndSetLockedRouteOverlap(simulation, route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//延续保护锁闭后持续监视
|
}
|
||||||
if (overlap != null && overlap.isLock()) {
|
|
||||||
|
/**
|
||||||
|
* 延续保护取消锁闭
|
||||||
|
*/
|
||||||
|
public void overlapCancelLock(RouteOverlap overlap) {
|
||||||
SectionPath sectionPath = overlap.selectPath();
|
SectionPath sectionPath = overlap.selectPath();
|
||||||
List<SwitchElement> switchList = sectionPath.getSwitchList();
|
List<SwitchElement> switchList = sectionPath.getSwitchList();
|
||||||
List<RouteFls> flsList = sectionPath.getFlsList();
|
List<RouteFls> flsList = sectionPath.getFlsList();
|
||||||
@ -1323,7 +1327,6 @@ public class RouteService {
|
|||||||
overlap.setLock(false);
|
overlap.setLock(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {
|
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {
|
||||||
RouteOverlap overlap = route.getOverlap();
|
RouteOverlap overlap = route.getOverlap();
|
||||||
@ -1454,11 +1457,13 @@ public class RouteService {
|
|||||||
|
|
||||||
public void handleTrainStopMessage(Simulation simulation, TrainStopMessage stopMessage) {
|
public void handleTrainStopMessage(Simulation simulation, TrainStopMessage stopMessage) {
|
||||||
// 进路最后一个区段通信车停车,进路延续保护立即解锁
|
// 进路最后一个区段通信车停车,进路延续保护立即解锁
|
||||||
|
Section section = stopMessage.getSection();
|
||||||
|
if (!section.isRouteLock())
|
||||||
|
return;
|
||||||
List<RouteOverlap> overlapList = simulation.getRepository()
|
List<RouteOverlap> overlapList = simulation.getRepository()
|
||||||
.getListByType(MapElement.DeviceType.OVERLAP, RouteOverlap.class);
|
.getListByType(MapElement.DeviceType.OVERLAP, RouteOverlap.class);
|
||||||
for (RouteOverlap routeOverlap : overlapList) {
|
for (RouteOverlap routeOverlap : overlapList) {
|
||||||
Section section = stopMessage.getSection();
|
if (routeOverlap.allSectionsOl() && section.isRouteLockOn(routeOverlap.isRight()) && routeOverlap.isRouteLastSection(section)) {
|
||||||
if (/*routeOverlap.isLock() && */ routeOverlap.anyElementLocked() && routeOverlap.isRouteLastSection(section)) {
|
|
||||||
// 是此延续保护的解锁区段,立即解锁
|
// 是此延续保护的解锁区段,立即解锁
|
||||||
routeOverlap.releaseImmediately();
|
routeOverlap.releaseImmediately();
|
||||||
log.debug(String.format("收到列车停稳消息,[%s]延续保护[%s],触发区段[%s(%s)]立即解锁",
|
log.debug(String.format("收到列车停稳消息,[%s]延续保护[%s],触发区段[%s(%s)]立即解锁",
|
||||||
|
@ -237,24 +237,16 @@ public class RouteOverlap extends MapNamedElement {
|
|||||||
/**
|
/**
|
||||||
* 有延续保护的元素处于锁闭状态
|
* 有延续保护的元素处于锁闭状态
|
||||||
*/
|
*/
|
||||||
public boolean anyElementLocked() {
|
public boolean allSectionsOl() {
|
||||||
if (!CollectionUtils.isEmpty(this.pathList)) {
|
if (!CollectionUtils.isEmpty(this.pathList)) {
|
||||||
for (SectionPath path : this.pathList) {
|
for (SectionPath path : this.pathList) {
|
||||||
if (path.getSwitchList().stream().anyMatch(element -> element.getASwitch().isOverlapLock())) {
|
for (Section s : path.getSectionList()) {
|
||||||
return true;
|
if (!s.isOverlapLock()) {
|
||||||
}
|
|
||||||
if (path.getSectionList().stream().anyMatch(Section::isOverlapLock)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
List<RouteFls> flsList = path.getFlsList();
|
|
||||||
if (!CollectionUtils.isEmpty(flsList)) {
|
|
||||||
for (RouteFls routeFls : flsList) {
|
|
||||||
if (routeFls.anyLocked())
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user