修改列车移动授权——添加未锁闭区段作为移动授权终点逻辑
This commit is contained in:
parent
f838bd8ba3
commit
20f23b5468
@ -416,6 +416,22 @@ public class MaService {
|
||||
// 道岔故障进路,直接构建返回
|
||||
ma = this.checkAndUpdateMa(ma, new Ma(train, section, MaType.Fault_Route));
|
||||
}
|
||||
// 反向锁闭区段
|
||||
if (right != route.getStart().isRight()) { // 列车方向和区段进路方向相反
|
||||
Signal aheadSignal = section.getSignalOf(right);
|
||||
if (aheadSignal == null || aheadSignal.getLockedRoute() == null ||
|
||||
!aheadSignal.getLockedRoute().isOpen()) {
|
||||
ma = this.checkAndUpdateMa(ma, new Ma(train, section, MaType.Closed_Section));
|
||||
}
|
||||
}
|
||||
} else if(front) {
|
||||
if (!section.isRouteLock() && !section.isOverlapLock()) {//列车前方区段未锁闭
|
||||
Signal aheadSignal = section.getSignalOf(right);
|
||||
if (aheadSignal == null || aheadSignal.getLockedRoute() == null ||
|
||||
!aheadSignal.getLockedRoute().isOpen()) {
|
||||
ma = this.checkAndUpdateMa(ma, new Ma(train, section, MaType.Closed_Section));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (section.isClosed()) {
|
||||
// 关闭的区段
|
||||
|
@ -273,6 +273,8 @@ public class ATPService {
|
||||
// 车尾变车头,车头变车尾
|
||||
train.setHeadPosition(newHeadPosition);
|
||||
train.setRight(!right);
|
||||
// 清除旧的移动授权
|
||||
train.setMa2(null);
|
||||
}
|
||||
|
||||
public void changeEndsProgress(VirtualRealityTrain train) {
|
||||
|
Loading…
Reference in New Issue
Block a user