修改:延续保护解锁逻辑(西安三49)

This commit is contained in:
joylink_zhangsai 2021-07-02 09:18:17 +08:00
parent 7119fad066
commit d335982687
3 changed files with 6 additions and 4 deletions

View File

@ -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) {

View File

@ -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)]立即解锁",

View File

@ -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();
}