添加检查站台状态以取消列车扣车状态的循环逻辑
This commit is contained in:
parent
8adda9b160
commit
0f81295f3f
@ -52,6 +52,9 @@ public class ATSLogicLoop {
|
||||
this.atsStandService.countDown(simulation);
|
||||
// 车站随时间变化的属性更新
|
||||
this.atsStationService.updateField(simulation);
|
||||
// 如果站台没有扣车,取消列车的扣车状态
|
||||
simulation.getRepository().getStandList().stream().filter(stand -> !stand.isHoldTrain())
|
||||
.forEach(stand -> atsStandService.checkAndCancelTrainHold(simulation, stand));
|
||||
// long end = System.currentTimeMillis();
|
||||
// System.out.println(String.format("------------ATS自动排列进路逻辑耗时: %s ms", (end-start)));
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ public class AtsStandService {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAndCancelTrainHold(Simulation simulation, Stand stand) {
|
||||
public void checkAndCancelTrainHold(Simulation simulation, Stand stand) {
|
||||
if (!stand.isHoldTrain()) {
|
||||
// 先默认CBTC模式,取消扣车发送给列车
|
||||
List<TrainInfo> superviseTrainList = simulation.getRepository().getSuperviseTrainList();
|
||||
|
Loading…
Reference in New Issue
Block a user