修改【人工驾驶默认停车】配置的生效逻辑
This commit is contained in:
parent
659b537f75
commit
5e5a17d79a
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +1,43 @@
|
|||
package club.joylink.rtss.simulation.cbtc.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 驾驶模式
|
||||
*/
|
||||
public enum DriveMode {
|
||||
/**
|
||||
* 列车自动驾驶模式:司机监控下的列车自动驾驶
|
||||
*/
|
||||
AM("列车自动驾驶模式", false),
|
||||
/**
|
||||
* ATP防护下的人工驾驶模式:司机在列车自动防护设备监控下驾驶列车
|
||||
*/
|
||||
CM("ATP防护下的人工驾驶模式", true),
|
||||
/**
|
||||
* 限制人工驾驶模式:地面设备故障或未设置地面信息设备的线路,列车按规定限速运行,超速时实时制动,直至停车
|
||||
*/
|
||||
RM("限制人工驾驶模式", true),
|
||||
/**
|
||||
* 无限制人工驾驶模式:列车在运行中没有车载ATP的保护,司机根据行车调度员的指示,按地面信号机的显示或手信号(口令)指示行车
|
||||
*/
|
||||
NRM("无限制人工驾驶模式", true);
|
||||
/**
|
||||
* 列车自动驾驶模式:司机监控下的列车自动驾驶
|
||||
*/
|
||||
AM("列车自动驾驶模式", false),
|
||||
/**
|
||||
* ATP防护下的人工驾驶模式:司机在列车自动防护设备监控下驾驶列车
|
||||
*/
|
||||
CM("ATP防护下的人工驾驶模式", true),
|
||||
/**
|
||||
* 限制人工驾驶模式:地面设备故障或未设置地面信息设备的线路,列车按规定限速运行,超速时实时制动,直至停车
|
||||
*/
|
||||
RM("限制人工驾驶模式", true),
|
||||
/**
|
||||
* 无限制人工驾驶模式:列车在运行中没有车载ATP的保护,司机根据行车调度员的指示,按地面信号机的显示或手信号(口令)指示行车
|
||||
*/
|
||||
NRM("无限制人工驾驶模式", true);
|
||||
|
||||
private final String label;
|
||||
//是否人工驾驶模式
|
||||
private final boolean manual;
|
||||
|
||||
DriveMode(String label, boolean manual) {
|
||||
this.label = label;
|
||||
this.manual = manual;
|
||||
}
|
||||
private final String label;
|
||||
//是否人工驾驶模式
|
||||
@Getter
|
||||
private final boolean manual;
|
||||
|
||||
public boolean isNotLowerThan(DriveMode driveMode) {
|
||||
return this.ordinal() <= driveMode.ordinal();
|
||||
}
|
||||
DriveMode(String label, boolean manual) {
|
||||
this.label = label;
|
||||
this.manual = manual;
|
||||
}
|
||||
|
||||
public boolean isHigherThan(DriveMode driveMode) {
|
||||
return this.ordinal() < driveMode.ordinal();
|
||||
}
|
||||
public boolean isNotLowerThan(DriveMode driveMode) {
|
||||
return this.ordinal() <= driveMode.ordinal();
|
||||
}
|
||||
|
||||
public boolean isHigherThan(DriveMode driveMode) {
|
||||
return this.ordinal() < driveMode.ordinal();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -609,7 +609,6 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
|||
this.robotDriveParam = new DriveParamVO();
|
||||
if (defaultStop) {
|
||||
this.robotDriveParam.setDefaultStop(true);
|
||||
this.robotDriveParam.setStop(true);
|
||||
this.robotDriveParam.setRun(false);
|
||||
}
|
||||
}
|
||||
|
@ -711,7 +710,6 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
|
|||
this.robotDriveParam = new DriveParamVO();
|
||||
if (defaultStop) {
|
||||
this.robotDriveParam.setDefaultStop(true);
|
||||
this.robotDriveParam.setStop(true);
|
||||
this.robotDriveParam.setRun(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,8 +176,14 @@ public class SimulationRobotService {
|
|||
if (train.isTakeOver() || !repository.isVrTrainOnline(train.getGroupNumber())) { //如果列车被接管或不在线
|
||||
continue;
|
||||
}
|
||||
//校验后开启ATO
|
||||
robotOpenATOAfterCheck(train);
|
||||
//非人工驾驶模式时,重置[人工驾驶默认不运行的列车]的运行状态
|
||||
if (!train.getDriveMode().isManual() && train.getRobotDriveParam().isDefaultStop()) {
|
||||
train.getRobotDriveParam().setRun(false);
|
||||
}
|
||||
//没有下令停车的情况下,校验后开启ATO
|
||||
if (!train.isRobotNeedStop()) {
|
||||
robotOpenATOAfterCheck(train);
|
||||
}
|
||||
//准备发车
|
||||
robotReadyForDeparture(simulation, train);
|
||||
//机器人人工驾驶
|
||||
|
|
Loading…
Reference in New Issue