修改ATP占用问题

修改按计划行车列车加载逻辑
This commit is contained in:
walker-sheng 2021-08-19 10:34:36 +08:00
parent f1cb974e8c
commit f66ef77efa
3 changed files with 9 additions and 13 deletions

View File

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

View File

@ -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();
}
//预复位

View File

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