From f66ef77efa4d0bd72ba331505e455cd8a34008e6 Mon Sep 17 00:00:00 2001 From: walker-sheng Date: Thu, 19 Aug 2021 10:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ATP=E5=8D=A0=E7=94=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E4=BF=AE=E6=94=B9=E6=8C=89=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E8=A1=8C=E8=BD=A6=E5=88=97=E8=BD=A6=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/service/AtsTrainLoadService.java | 12 +++--------- .../joylink/rtss/simulation/cbtc/CI/CILogicLoop.java | 8 ++++---- .../simulation/cbtc/tool/DeviceStatusModifyTool.java | 2 ++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java index b3639e10c..a503f16aa 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java @@ -1,9 +1,7 @@ package club.joylink.rtss.simulation.cbtc.ATS.service; import club.joylink.rtss.exception.BusinessExceptionAssertEnum; -import club.joylink.rtss.simulation.cbtc.ATP.ground.GroundAtpApiService; import club.joylink.rtss.simulation.cbtc.ATP.ground.MaService; -import club.joylink.rtss.simulation.cbtc.ATP.ground.ZCLogicLoop; import club.joylink.rtss.simulation.cbtc.CI.CILogicLoop; import club.joylink.rtss.simulation.cbtc.CI.service.RouteService; import club.joylink.rtss.simulation.cbtc.Simulation; @@ -61,12 +59,8 @@ public class AtsTrainLoadService { @Autowired private CILogicLoop ciLogicLoop; - @Autowired - private GroundAtpApiService groundAtpApiService; - - @Autowired - private ZCLogicLoop zcLogicLoop; + private AtsTrainMonitorService atsTrainMonitorService; @Autowired private MaService maService; @@ -417,8 +411,8 @@ public class AtsTrainLoadService { this.vrDeviceLogicLoop.updateTrainOccupySection(simulation); // 计轴占用处理 this.ciLogicLoop.getStatusFromVRDevice(simulation); - // 计轴区段状态发送地面ATP - this.groundAtpApiService.receiveAndHandleAxleSectionStatus(simulation); + // ATS监控逻辑 + this.atsTrainMonitorService.monitor(simulation); // 进路解锁逻辑 this.ciLogicLoop.routeLogic(simulation); MapConfig config = simulation.getRepository().getConfig(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CILogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CILogicLoop.java index de0a6ea10..d5fb5b734 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CILogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CILogicLoop.java @@ -51,9 +51,6 @@ public class CILogicLoop { // long start = System.currentTimeMillis(); // 设备状态采集(从虚拟真实设备采集) this.getStatusFromVRDevice(simulation); - // 计轴区段状态发送地面ATP - this.groundAtpApiService.receiveAndHandleAxleSectionStatus(simulation); - // 进路逻辑 this.routeLogic(simulation); @@ -101,6 +98,9 @@ public class CILogicLoop { // 道岔状态发送ATS this.atsApiService.handleDeviceStatus(simulation, signalList); this.atsApiService.handleDeviceStatus(simulation, switchList); + + // 计轴区段状态发送地面ATP + this.groundAtpApiService.receiveAndHandleAxleSectionStatus(simulation); } @@ -276,7 +276,7 @@ public class CILogicLoop { if (virtualAxleCounter.isOccupy()) { section.axleCounterOccupy(virtualAxleCounter.isRight()); } else { - section.axleCounterClear(); + section.clearOccupy(); section.judgeAsValid(); } //预复位 diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/tool/DeviceStatusModifyTool.java b/src/main/java/club/joylink/rtss/simulation/cbtc/tool/DeviceStatusModifyTool.java index 68d99d7d2..0d1c1bf78 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/tool/DeviceStatusModifyTool.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/tool/DeviceStatusModifyTool.java @@ -72,6 +72,7 @@ public class DeviceStatusModifyTool { } } for (SwitchElement switchElement : switchElementList) { + switchElement.getASwitch().ciUse(switchElement.isNormal()); this.setSingleSwitchPositionDirectly(switchElement.getASwitch(), switchElement.isNormal()); switchElement.getASwitch().fpLock(); } @@ -158,6 +159,7 @@ public class DeviceStatusModifyTool { switchElement.getASwitch().isOnPosition(!switchElement.isNormal())) { continue; } + switchElement.getASwitch().ciUse(switchElement.isNormal()); this.setSingleSwitchPositionDirectly(switchElement.getASwitch(), switchElement.isNormal()); if (routeLock) { switchElement.getASwitch().routeLock(route);