修改CTC列车MA计算时机,修改非通信车ATP占用判断问题

This commit is contained in:
walker-sheng 2021-08-13 18:14:29 +08:00
parent b1672f8abb
commit 4a35fbca0f
5 changed files with 19 additions and 20 deletions

View File

@ -119,8 +119,11 @@ public class AtpSectionService {
//重新给atpSectionList塞值
atpSectionList.clear();
for (Section section : collect) {
atpSectionList.add(section);
atpSectionList.addAll(section.getLogicList());
if (CollectionUtils.isEmpty(section.getLogicList())) {
atpSectionList.add(section);
} else {
atpSectionList.addAll(section.getLogicList());
}
}
//将列车占压的物理区段及其关联的逻辑区段全部设为非通信车占用
atpSectionList.forEach(atpSection -> atpSection.nonCommunicateTrainOccupy(right));

View File

@ -29,6 +29,9 @@ public class GroundAtpApiServiceImpl implements GroundAtpApiService {
@Autowired
private AtsApiService atsApiService;
@Autowired
private MaService maService;
@Autowired
private TempSpeedLimitService tempSpeedLimitService;
@ -90,6 +93,8 @@ public class GroundAtpApiServiceImpl implements GroundAtpApiService {
// 发送区段状态
this.atsApiService.handleDeviceStatus(simulation, repository.getSectionList());
// 为ctc列车计算移动授权
this.maService.calculateMaOfCtcTrains(simulation);
}
@Override

View File

@ -27,7 +27,7 @@ public class MaService {
@Getter
public static class Ma {
public static final int Safety_Margin = 1; // 安全余量单位m
public static final int Safety_Margin = 1; // 安全余量单位m暂时没有计算紧急制动曲线暂时不用
public static final int EB_Trigger = 20; // 紧急制动触发点偏移量单位m
public static final int Safety_Distance = 30; // 安全距离 单位m
@ -45,10 +45,6 @@ public class MaService {
* ATO停车曲线
*/
private SpeedCurve atoStopCurve;
/**
* 移动的累计距离
*/
private float moveLen;
public Ma(VirtualRealityTrain train, MapNamedElement device, MaType type) {
this.train = train;
@ -58,10 +54,6 @@ public class MaService {
this.calculateDistanceToEoa();
}
public void addMoveLen(float len) {
this.moveLen += len;
}
public void setEbTriggerCurve(SpeedCurve ebTriggerCurve) {
this.ebTriggerCurve = ebTriggerCurve;
}

View File

@ -680,8 +680,8 @@ public class ZCLogicLoop {
return null;
}
public void addJobs(Simulation simulation) {
// simulation.addJob(SimulationModule.ZC.name(), () -> this.run(simulation), SimulationConstants.ZC_LOOP_RATE);
simulation.addJob("MaCal", () -> this.maService.calculateMaOfCtcTrains(simulation), 1000);
}
// public void addJobs(Simulation simulation) {
//// simulation.addJob(SimulationModule.ZC.name(), () -> this.run(simulation), SimulationConstants.ZC_LOOP_RATE);
// simulation.addJob("MaCal", () -> this.maService.calculateMaOfCtcTrains(simulation), 1000);
// }
}

View File

@ -4,7 +4,6 @@ import club.joylink.rtss.services.IVirtualRealityIbpService;
import club.joylink.rtss.services.IVoiceCommandService;
import club.joylink.rtss.services.psl.IVirtualRealityPslService;
import club.joylink.rtss.simulation.SimulationManager;
import club.joylink.rtss.simulation.cbtc.ATP.ground.ZCLogicLoop;
import club.joylink.rtss.simulation.cbtc.ATS.ATSLogicLoop;
import club.joylink.rtss.simulation.cbtc.ATS.ATSMessageCollectAndDispatcher;
import club.joylink.rtss.simulation.cbtc.CI.CILogicLoop;
@ -67,9 +66,9 @@ public class SimulationLifeCycleServiceImpl implements SimulationLifeCycleServic
@Autowired
private VRDeviceLogicLoop vrDeviceLogicLoop;
@Autowired
private ZCLogicLoop zcLogicLoop;
//
// @Autowired
// private ZCLogicLoop zcLogicLoop;
@Autowired
private ATSMessageCollectAndDispatcher atsMessageCollectAndDispatcher;
@ -126,7 +125,7 @@ public class SimulationLifeCycleServiceImpl implements SimulationLifeCycleServic
vrTrainRunningService.addJobs(simulation);
ciLogicLoop.addJobs(simulation);
vrDeviceLogicLoop.addJobs(simulation);
zcLogicLoop.addJobs(simulation);
// zcLogicLoop.addJobs(simulation);
atsMessageCollectAndDispatcher.addJobs(simulation);
joylink3DMessageService.addJobs(simulation);
faultGenerator.addJobs(simulation);