From f04cb9ae1930a607687111621453571bcdf2b3cc Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 30 Jun 2021 13:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E6=8C=82=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E5=88=97=E8=BD=A6=E9=80=BB=E8=BE=91=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java | 3 +++ .../cbtc/device/virtual/VRTrainRunningService.java | 3 +++ .../joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java index 67b599709..97acd9ade 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java @@ -624,6 +624,9 @@ public class VirtualRealityTrain extends VirtualRealityDevice { * 强制改变牵引制动力 */ public void enforceUpdateTBForce(float fk, float fb) { + if (linkTrain != null && linkTrain.isEB()) { + return; + } this.fk = fk; this.fb = fb; if (fk > 0) { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/virtual/VRTrainRunningService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/virtual/VRTrainRunningService.java index 16177d6c4..0151c6465 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/device/virtual/VRTrainRunningService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/virtual/VRTrainRunningService.java @@ -112,11 +112,14 @@ public class VRTrainRunningService { if (right == aTrain.isRight()) { //车头同向 if (!aTrainTailPosition.isAheadOf(checkPosition, right) && !checkPosition.isAheadOf(aTrainHeadPosition, right)) { change = false; + train.setSpeed(0); break; } } else { if (!aTrainHeadPosition.isAheadOf(checkPosition, right) && !aTrainTailPosition.isAheadOf(checkPosition, right)) { change = false; + train.setSpeed(0); + break; } } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java index 8f1b3e44c..66506ac9e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java @@ -108,6 +108,11 @@ public class ATPService { } case AM: case CM:{ + // 驾驶故障导致EB + if (VirtualRealityTrain.Fault.DRIVE_FAULT.equals(train.getFault()) && !train.isEB()) { + log.warn(train.debugStr() + "因驾驶故障EB"); + this.triggerSignalEB(train); + } MovementAuthority ma = train.getMa(); if (Objects.nonNull(ma)) { // 通信正常,移动授权可用 // 获取移动授权剩余距离