修改:延续保护解锁逻辑(西安三49)
This commit is contained in:
parent
7119fad066
commit
d335982687
@ -51,7 +51,7 @@ public class AtsApiServiceImpl implements AtsApiService {
|
||||
public void handleTrainStopMessage(Simulation simulation, TrainStopMessage stopMessage) {
|
||||
// 处理正常站台停车
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
TrainInfo train = repository.findSupervisedTrainByGroup(stopMessage.getGroupNumber());
|
||||
TrainInfo train = repository.findSupervisedTrainByGroup(stopMessage.getTrain().getGroupNumber());
|
||||
Section section = stopMessage.getSection();
|
||||
Station station = section.getStation();
|
||||
if (train == null || station == null) {
|
||||
|
@ -343,6 +343,8 @@ public class RouteService {
|
||||
if (switchElement.getASwitch().isFaultOnPosition(switchElement.isNormal()) && switchElement.getASwitch().isLoss()) {
|
||||
// 道岔指定位置故障且失表,不再触发
|
||||
return false;
|
||||
} else if (switchElement.getASwitch().isLocked() && !switchElement.getASwitch().isOnPosition(switchElement.isNormal())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1463,7 +1465,7 @@ public class RouteService {
|
||||
List<RouteOverlap> overlapList = simulation.getRepository()
|
||||
.getListByType(MapElement.DeviceType.OVERLAP, RouteOverlap.class);
|
||||
for (RouteOverlap routeOverlap : overlapList) {
|
||||
if (routeOverlap.allSectionsOl() && section.isRouteLockOn(routeOverlap.isRight()) && routeOverlap.isRouteLastSection(section)) {
|
||||
if (routeOverlap.allSectionsOl() && stopMessage.getTrain().isParkingAt() && section.isRouteLockOn(routeOverlap.isRight()) && routeOverlap.isRouteLastSection(section)) {
|
||||
// 是此延续保护的解锁区段,立即解锁
|
||||
routeOverlap.releaseImmediately();
|
||||
log.debug(String.format("收到列车停稳消息,[%s]延续保护[%s],触发区段[%s(%s)]立即解锁",
|
||||
|
@ -10,12 +10,12 @@ import lombok.Getter;
|
||||
@Getter
|
||||
public class TrainStopMessage {
|
||||
|
||||
private String groupNumber;
|
||||
private VirtualRealityTrain train;
|
||||
|
||||
private Section section;
|
||||
|
||||
public TrainStopMessage(VirtualRealityTrain train) {
|
||||
this.groupNumber = train.getGroupNumber();
|
||||
this.train = train;
|
||||
this.section = train.getHeadPosition().getSection();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user