Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
thesai 2021-10-27 17:36:38 +08:00
commit 4e7a87cf6b
4 changed files with 24 additions and 1 deletions

View File

@ -58,6 +58,10 @@ public class AtsTrainStageHandler {
SimulationDataRepository repository = simulation.getRepository();
Section parkSection = repository.getByCode(trainInfo.getActualArriveStandTrack(), Section.class);
AtsStageService stageService = this.getStageService(trainInfo);
// 通知ctc列车站台扣车
if (parkSection.isStandHoldTrain() && trainInfo.isCtcLevel()) {
this.onboardAtpApiService.standHoldTrain(simulation, trainInfo.getGroupNumber());
}
if (parkSection.isTransferTrack()) { // 转换轨
stageService.handleTransferTrackParking(simulation, trainInfo, parkSection);
} else if (parkSection.isNormalStandTrack()) { // 正常站台轨

View File

@ -1156,6 +1156,18 @@ public class Section extends DelayUnlockDevice {
return false;
}
public boolean isStandHoldTrain() {
List<Stand> standList = this.getStandList();
if (standList != null) {
for (Stand stand : standList) {
if (stand.isHoldTrain()) {
return true;
}
}
}
return false;
}
public enum SectionRoadType {
/**
* 左行线

View File

@ -55,6 +55,13 @@ public class ATOService {
if (train.isEB()) { // EB中不控制
return;
}
// 站台是否扣车
if (
// train.isHold() &&
train.isParkingAt() &&
train.getHeadPosition().getSection().isStandHoldTrain()) {
return;
}
// 是否停车制动
if (train.isBreaking()) { // 站台持续停车制动中输出持续制动
doBreakMax(train);

View File

@ -140,7 +140,7 @@ public class ATPService {
return;
}
train.setSignalEB(true);
log.warn(String.format("列车[%s]触发信号EB", train.getGroupNumber()));
log.warn("列车[{}]触发信号EB", train.getGroupNumber());
train.emergencyBreak();
closeATO(train);
}