zc故障不停车bug修改;运行至前方站指令流程修改
This commit is contained in:
parent
794d8a0a0a
commit
da35d772bd
@ -63,7 +63,7 @@ public class ZCLogicLoop {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//更新CBTC ma
|
//更新CBTC ma
|
||||||
if (!deviceStation.isFault()) { //如果列车头所在区段所属设备集中站zc未故障
|
if (!deviceStation.getZc().isFault()) { //如果列车头所在区段所属设备集中站zc未故障
|
||||||
this.calculateMAOfCBTC(simulation, train, trainList);
|
this.calculateMAOfCBTC(simulation, train, trainList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,10 @@ import club.joylink.rtss.simulation.cbtc.constant.DriveMode;
|
|||||||
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
|
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.CalculateService;
|
import club.joylink.rtss.simulation.cbtc.data.CalculateService;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
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;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
|
import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.support.SectionPosition;
|
import club.joylink.rtss.simulation.cbtc.data.support.SectionPosition;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain;
|
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain;
|
||||||
@ -176,18 +179,18 @@ public class CommandBO {
|
|||||||
@Override
|
@Override
|
||||||
public Step executeOrReturnStep(Simulation simulation, CommandBO command) {
|
public Step executeOrReturnStep(Simulation simulation, CommandBO command) {
|
||||||
VirtualRealityTrain train = (VirtualRealityTrain) command.getTargetMember().getDevice();
|
VirtualRealityTrain train = (VirtualRealityTrain) command.getTargetMember().getDevice();
|
||||||
Step step = getStepOfRm2BmAndOpenAto(command);
|
//如果列车没停到目标位置,先想办法开过去---
|
||||||
if (step != null) {
|
|
||||||
return step;
|
|
||||||
}
|
|
||||||
if (!DriveMode.RM.equals(train.getDriveMode())) {
|
|
||||||
return buildDriverDriveModeChangeOperationStep(train.getGroupNumber(), DriveMode.RM);
|
|
||||||
}
|
|
||||||
List<Step> steps = command.getStepByType(Step.StepType.DRIVE);
|
List<Step> steps = command.getStepByType(Step.StepType.DRIVE);
|
||||||
Step driveStep = steps.get(0);
|
Step driveStep = steps.get(0);
|
||||||
if (!train.isStopAtThePosition(driveStep.getTargetPosition())) { //如果列车没停到目标位置
|
if (!train.isStopAtThePosition(driveStep.getTargetPosition())) { //如果列车没停到目标位置
|
||||||
|
if (!train.isStop())
|
||||||
|
return buildDriverForceChangeOperationStep(train.getGroupNumber(), -100);
|
||||||
|
if (!DriveMode.RM.equals(train.getDriveMode()))
|
||||||
|
return buildDriverDriveModeChangeOperationStep(train.getGroupNumber(), DriveMode.RM);
|
||||||
return driveStep;
|
return driveStep;
|
||||||
} else { //如果列车已经停到目标位置
|
} else { //如果列车已经停到目标位置
|
||||||
|
if (!DriveMode.AM.equals(train.getDriveMode()))
|
||||||
|
return getStepOfRm2BmAndOpenAto(command);
|
||||||
command.getTargetMember().setCommand(null);
|
command.getTargetMember().setCommand(null);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -517,7 +520,6 @@ public class CommandBO {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum ParamName {
|
public enum ParamName {
|
||||||
stationCode,
|
stationCode,
|
||||||
switchCode,
|
switchCode,
|
||||||
@ -538,6 +540,7 @@ public class CommandBO {
|
|||||||
*/
|
*/
|
||||||
speedLimit;
|
speedLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final List<ParamName> paramNames;
|
private final List<ParamName> paramNames;
|
||||||
|
|
||||||
CommandType(List<ParamName> paramNames) {
|
CommandType(List<ParamName> paramNames) {
|
||||||
|
Loading…
Reference in New Issue
Block a user