增加进路“ars”属性的判断逻辑:延续保护有侧向道岔的不行;进路中的区段与进路方向相反的不行。 修改删除驾驶参数“无”后出现的bug

This commit is contained in:
joylink_zhangsai 2023-10-30 18:07:39 +08:00
parent abbfabab40
commit 361d446a19
3 changed files with 27 additions and 8 deletions

View File

@ -1468,10 +1468,22 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
ars = false;
}
}
RouteOverlap overlap = route.getOverlap();
if (overlap != null && !overlap.isStraight()) { //如果延续保护不是直向没有联锁自动触发
ars = false;
}
for (Section section : route.getSectionList()) {
//进路中的区段类型与进路方向相反说明不是常规运行进路没有联锁自动触发
if (section.isLeftLine() && route.isRight() || section.isRightLine() && !route.isRight()) {
ars = false;
break;
}
}
if (start.isSameDirectionToSection() && end.isSameDirectionToSection() && route.isStraight()) {
// 进路始端终端信号机都是常规运行方向且进路是直向进路则为车队进路
flt = true;
}
route.setArs(ars);
route.setFlt(flt);
// 根据区段设置进路联锁站台相关元素

View File

@ -483,14 +483,7 @@ public class AtsTrainService {
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotNull(targetPosition, train.debugStr() + "找不到下一个停车点");
param.setThroughSignal(section.getSignalOf(right));
}
} else if (param.isRouteBlockDriver()) { // 进路闭塞行车
Signal signal = section.getSignalOf(right);
Route route = (signal != null) ? signal.getLockedRoute() : section.getRoute();
if (route != null) {
targetPosition = new SectionPosition(route.getLastRouteSection(), route.getLastRouteSection().getStopPointByDirection(train.isRight()));
param.setThroughSignal(signal);
}
}else {
} else {
param.setThroughSignal(null);
param.setThroughSignalAspect(null);
}

View File

@ -267,4 +267,18 @@ public class RouteOverlap extends MapNamedElement {
public boolean containSwitch(Switch aSwitch) {
return this.selectPath().containSwitch(aSwitch);
}
public boolean isStraight() {
if (CollectionUtils.isEmpty(pathList)) {
return true;
}
for (SectionPath path : pathList) {
for (SwitchElement se : path.getSwitchList()) {
if (!se.isNormal()) {
return false;
}
}
}
return true;
}
}