进路逻辑bug修改

This commit is contained in:
walker-sheng 2021-02-01 13:53:35 +08:00
parent dd434fe399
commit 202e0bb01f

View File

@ -390,7 +390,6 @@ public class RouteService {
log.debug(section.debugStr() + "因<预先锁闭>锁闭");
}
}
if (!route.isRequisition()) {
// 征用设备
// 道岔位置转换
List<SwitchElement> switchList = route.getSwitchList();
@ -406,11 +405,9 @@ public class RouteService {
}
}
}
route.updateRequisition(true);
return;
}
// 设备已征用检查进路条件
boolean onPosition = this.checkSwitchPosition(simulation, route);
boolean onPosition = this.checkSwitchPosition(simulation, route) &&
this.isFlsSwitchOnPosition(route.getFlsList());
if (!onPosition) { // 还未转换到位置
return;
}
@ -1234,11 +1231,18 @@ public class RouteService {
boolean interlocked = this.isInterlocked(route);
if (!interlocked) {
// 进路信号开放联锁逻辑不满足需关闭信号
if (route.isOpen()) {
this.routeClose(simulation, route);
log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯",
route.debugStr(), route.getStart().getName(), route.getStart().getCode()));
}
}
if (route.isOpen()) {
if (this.checkCanOverlapSet(simulation, route) && !route.getOverlap().isLock()) {
this.checkAndSetLockedRouteOverlap(simulation, route);
}
}
}
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {
RouteOverlap overlap = route.getOverlap();