加载备用车时,如果选择了ITC相关预选模式,当前模式会是RM,后续运行收到移动授权后升级;驾驶操作的参数,”进路闭塞法行车“替代”无“,删除原”进路闭塞法行车“

This commit is contained in:
joylink_zhangsai 2023-10-30 17:34:40 +08:00
parent 9b5c54f749
commit abbfabab40
6 changed files with 20 additions and 39 deletions

View File

@ -203,14 +203,11 @@ public class AtsRouteService {
throw new SimulationException(SimulationExceptionType.Operation_Conflict,
String.format("进路[%s(%s)]自动通过已开启,不能设置自动追踪", route.getName(), route.getCode()));
}
// if (route.isCiControl()) {
// throw new SimulationException(SimulationExceptionType.Operation_Repetition, String.format("进路[%s(%s)]自动追踪/连锁自动触发已开启,无需重复设置", route.getName(), route.getCode()));
// }
});
for (Route route : routeList) {
// route.setAtsControl(false);
if (route.isArs())
if (route.isArs()) {
route.setCiControl(true);
}
}
}
}

View File

@ -7,6 +7,7 @@ import club.joylink.rtss.simulation.cbtc.CI.CiApiService;
import club.joylink.rtss.simulation.cbtc.CI.CiLogic;
import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.SimulationLifeCycleService;
import club.joylink.rtss.simulation.cbtc.constant.DriveMode;
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
import club.joylink.rtss.simulation.cbtc.data.CalculateService;
@ -980,6 +981,12 @@ public class AtsTrainLoadService {
if (!repository.getConfig().isHandleDepot()) {
if (preselectionMode != null && !preselectionMode.isHigherThan(train.getPreselectionMode())) {
train.initByPreselectionMode(preselectionMode);
//列车初始为ITC级别如果当时的移动授权不允许移动则会无法移动所以将实际级别降为RM
if (preselectionMode.isMatchTheRunLevel(RunLevel.ITC)) {
train.setDriveMode(DriveMode.RM);
train.setRunLevel(RunLevel.IL);
train.setGear(VirtualRealityTrain.Handwheel.MANUAL);
}
}
TrainInfo trainInfo = TrainInfo.constructManualTrain(train);
trainInfo.tracking(train);

View File

@ -1159,6 +1159,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
this.setTempPreselectionMode(this.preselectionMode);
this.setDriveMode(DriveMode.AM);
this.setRunLevel(RunLevel.CBTC);
this.setAtoOn(true);
}
public void initAsSM_C() {
@ -1167,6 +1168,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
this.setTempPreselectionMode(this.preselectionMode);
this.setDriveMode(DriveMode.CM);
this.setRunLevel(RunLevel.CBTC);
this.setAtoOn(false);
this.setGear(Handwheel.MANUAL);
}
public void initAsAM_I() {
@ -1175,6 +1178,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
this.setTempPreselectionMode(this.preselectionMode);
this.setDriveMode(DriveMode.AM);
this.setRunLevel(RunLevel.ITC);
this.setAtoOn(true);
}
public void initAsSM_I() {
@ -1183,6 +1187,8 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
this.setTempPreselectionMode(this.preselectionMode);
this.setDriveMode(DriveMode.CM);
this.setRunLevel(RunLevel.ITC);
this.setAtoOn(false);
this.setGear(Handwheel.MANUAL);
}
public void initAsRM() {

View File

@ -3,11 +3,9 @@ package club.joylink.rtss.simulation.cbtc.onboard.ATP;
import club.joylink.rtss.simulation.cbtc.ATP.ground.MaService;
import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.constant.DriveMode;
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
import club.joylink.rtss.simulation.cbtc.constant.SimulationModule;
import club.joylink.rtss.simulation.cbtc.data.CalculateService;
import club.joylink.rtss.simulation.cbtc.data.map.MapConfig;
import club.joylink.rtss.simulation.cbtc.data.map.Section;
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
@ -41,7 +39,6 @@ public class ATPLogicLoop {
private ApplicationContext applicationContext;
public void run(Simulation simulation) {
// long start = System.currentTimeMillis();
// ATP防护逻辑
List<VirtualRealityTrain> onlineTrain = simulation.getRepository().getOnlineTrainList();
for (VirtualRealityTrain train : onlineTrain) {
@ -59,33 +56,11 @@ public class ATPLogicLoop {
this.driveLogicRun(simulation, train);
}
}
// long end = System.currentTimeMillis();
// System.out.println(String.format("------------ATP防护、检查、消息构建发送逻辑耗时: %s ms", (end-start)));
}
private void driveLogicRun(Simulation simulation, VirtualRealityTrain train) {
// MaService.Ma ma2 = train.getMa2();
// // ITC级别列车停车手动释放操作判断
// if (train.isStop() && train.isITC() && train.isAtoOn() && ma2 != null && !train.isReleased()) {
// Section section = train.getHeadPosition().getSection();
// if (train.isParkingAt()) {
// if (!train.isStandReadyStart() || section.equals(train.getTarget())) {
// return;
// }
// }
// // 对于ITC列车若列车在站台且出站信号机开放且ITC移动授权终点为出站信号机手动进行释放操作
// boolean right = train.isRight();
// Signal signal = section.getSignalOf(right);
// if (signal != null && signal.isMainAspect() &&
// (ma2.getDevice().equals(signal) || (ma2.calculateDistanceToEoa() <= 0))) {
// // 信号机开放前一个ITC-MA的终点就是此信号机 到终点的移动授权距离小于0应该是折返轨情况
// // 手动释放
// log.debug(String.format("ITC列车[%s]站台准备出发,手动释放速度", train.getGroupNumber()));
//// atpService.confirmMessage(train, VirtualRealityTrain.ConfirmationMessage.Confirm_Release_Speed);
// }
// }
if (train.isChangeEnds() && train.isStop()) {
// 列车换端中
this.atpService.changeEndsProgress(train);
@ -112,9 +87,6 @@ public class ATPLogicLoop {
}
this.updateRunningTime(train);
if (train.isStop()) { // 列车停车
// this.sendStopMessage2GroundAtp(simulation, train);
// // 检查列车是否在转换轨
// this.checkOnTransferAndSend2Ats(simulation, train, headPosition, tailPosition);
if (!train.isBreaking() && !train.isRMMode() && !train.isNRMMode()) { // 制动状态
// 施加常规制动防止倒溜
this.atoService.openBreaking(train);

View File

@ -191,8 +191,8 @@ public class SimulationRobotService {
robotDrive(simulation, driver, train, train.getRobotTargetPosition());
}
} else if (train.isCMMode()) { //CM
// SpeedCurve speedCurve = train.getMa2().getAtoStopCurve();
// atoService.doControlBySpeedCurve(train, speedCurve, speedCurve.getTotalDistance(), train.getAtoSpeed());
SpeedCurve speedCurve = train.getMa2().getAtoStopCurve();
atoService.doControlBySpeedCurve(train, speedCurve, speedCurve.getTotalDistance(), train.getAtoSpeed());
}
}
}
@ -248,7 +248,7 @@ public class SimulationRobotService {
if (throughSignal != null && !Objects.equals(section, throughSignal.getSection())) { //当车头与要越过的信号机不在同一区段
throughSignal = null;
throughAspect = null;
robotDriveParam.setThrough(DriveParamVO.NO);
robotDriveParam.setThrough(DriveParamVO.DRIVER_ROUTE_BLOCK);
}
SectionPosition selectedPosition = robotDriveParam.getTargetPosition(); //用户选择的位置

View File

@ -64,11 +64,10 @@ public class DriveParamVO {
*/
private int through;
public static final int NO = 0;
public static final int DRIVER_ROUTE_BLOCK = 0;
public static final int RED_SIGNAL = 1;
public static final int GUIDE_SIGNAL = 2;
public static final int DRIVER_NEXT_STAND = 3;
public static final int DRIVER_ROUTE_BLOCK = 4;
/**
* 要越过的信号机
@ -115,7 +114,7 @@ public class DriveParamVO {
public void setThrough(int v) {
this.through = v;
if (through == NO) {
if (through == DRIVER_ROUTE_BLOCK) {
throughSignal = null;
throughSignalAspect = null;
}