修改设置头码车时路径选择bug;修改驾驶模式相关
This commit is contained in:
parent
3ef2b12939
commit
7f3b8b2792
@ -312,9 +312,9 @@ public class AtsTrainService {
|
||||
RoutePath routePath = routePaths.stream()
|
||||
.min(Comparator.comparingDouble(RoutePath::getReverseSwitchQuantity))
|
||||
.get();
|
||||
List<Section> sections = routePath.getSectionList().stream()
|
||||
.filter(Section::isSpecialSection)
|
||||
.collect(Collectors.toList());
|
||||
List<Section> sections = new ArrayList<>();
|
||||
sections.add(routePath.getStart());
|
||||
sections.add(routePath.getEnd());
|
||||
supervisedTrain.setHctPath(new SectionRunPath(sections, routePath.isRight()));
|
||||
}
|
||||
break;
|
||||
|
@ -528,7 +528,7 @@ public class CommandBO {
|
||||
public Step executeOrReturnStep(Simulation simulation, CommandBO command) {
|
||||
SimulationMember targetMember = command.getTargetMember();
|
||||
VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice();
|
||||
if (train.isRMMode()) {
|
||||
if (DriveMode.RM.equals(train.getPreDriveMode())) {
|
||||
targetMember.setCommand(null);
|
||||
return null;
|
||||
} else {
|
||||
@ -553,7 +553,7 @@ public class CommandBO {
|
||||
SimulationMember targetMember = command.getTargetMember();
|
||||
VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice();
|
||||
targetMember.setCommand(null);
|
||||
if (train.isCMMode()) {
|
||||
if (DriveMode.CM.equals(train.getPreDriveMode())) {
|
||||
return null;
|
||||
} else {
|
||||
if (!train.isAtpOn()) {
|
||||
@ -575,7 +575,7 @@ public class CommandBO {
|
||||
public Step executeOrReturnStep(Simulation simulation, CommandBO command) {
|
||||
SimulationMember targetMember = command.getTargetMember();
|
||||
VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice();
|
||||
if (train.isAMMode()) {
|
||||
if (DriveMode.AM.equals(train.getPreDriveMode())) {
|
||||
targetMember.setCommand(null);
|
||||
return null;
|
||||
}
|
||||
|
@ -235,7 +235,6 @@ public class ATPLogicLoop {
|
||||
private void driveModeControl(Simulation simulation, VirtualRealityTrain train) {
|
||||
DriveMode preDriveMode = train.getPreDriveMode();
|
||||
DriveMode driveMode = train.getDriveMode();
|
||||
MapConfig config = simulation.getRepository().getConfig();
|
||||
switch (preDriveMode) {
|
||||
case AM:
|
||||
train.setCommunication(true); //恢复列车通信
|
||||
|
Loading…
Reference in New Issue
Block a user