diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java index 09236bb18..e074cd8c2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java @@ -491,18 +491,16 @@ public class Section extends MayOutOfOrderDevice { * @return */ public boolean isNonCbtcOccupy() { - synchronized (this){ - boolean ctOcc = this.ctOccupied; - if (!CollectionUtils.isEmpty(this.logicList)) { - for (Section logic : this.logicList) { - if (logic.isCtOccupied()) { - ctOcc = true; - break; - } + boolean nct = this.nctOccupied && !this.ctOccupied; + if (!CollectionUtils.isEmpty(this.logicList)) { + for (Section logic : this.logicList) { + if (logic.isCtOccupied() || !logic.isNctOccupied()) { + nct = false; + break; } } - return !ctOcc && this.nctOccupied; } + return nct; } public List
getAtpSectionListBy(float offset1, float offset2) {