Revert "修改:恢复ARB判定。 新增:<无ARB判定>线路配置"

This reverts commit dce0f88e
This commit is contained in:
joylink_zhangsai 2021-06-21 09:36:44 +08:00
parent dce0f88ec4
commit eddd0171b7
6 changed files with 33 additions and 64 deletions

View File

@ -178,7 +178,6 @@ public class AtpSectionService {
* @param sectionList * @param sectionList
*/ */
public void sectionARBCheck(Simulation simulation, Section section, List<Section> sectionList) { public void sectionARBCheck(Simulation simulation, Section section, List<Section> sectionList) {
if (!simulation.getRepository().getConfig().isNoARB()) {
if (!section.isInvalid() && section.isNctOccupied()) { if (!section.isInvalid() && section.isNctOccupied()) {
if (!sectionList.contains(section)) { if (!sectionList.contains(section)) {
log.debug(String.format("区段[%s(%s)]检测为ARB故障", log.debug(String.format("区段[%s(%s)]检测为ARB故障",
@ -187,7 +186,6 @@ public class AtpSectionService {
} }
} }
} }
}
/** /**
* 获取列车可能存在的范围 * 获取列车可能存在的范围

View File

@ -126,20 +126,15 @@ public class ZCLogicLoop {
endList.add(end1); endList.add(end1);
return endList; return endList;
} }
// // 检查车头区段是否故障 // 检查车头区段是否故障
// if (headPosition.getSection().isFault()) { if (headPosition.getSection().isFault()) {
// endList.add(new MovementAuthority.End(headPosition.getSection(), MovementAuthority.EndType.FAULT_SECTION)); endList.add(new MovementAuthority.End(headPosition.getSection(), MovementAuthority.EndType.FAULT_SECTION));
// } }
// //非通信车占用区段
// if (section.isNonCbtcOccupy()) {
// endList.add(new MovementAuthority.End(section, MovementAuthority.EndType.NCT_OCCUPIED_SECTION));
// return endList;
// }
//非通信车占用区段 //非通信车占用区段
MovementAuthority.End nctOccupied = checkNctOccupied(train, section); if (section.isNonCbtcOccupy()) {
if (nctOccupied != null) endList.add(new MovementAuthority.End(section, MovementAuthority.EndType.NCT_OCCUPIED_IN_FRONT_OF_SECTION));
endList.add(nctOccupied); return endList;
}
int count = 0; int count = 0;
while (count < 50) { while (count < 50) {
++count; ++count;
@ -184,16 +179,12 @@ public class ZCLogicLoop {
break; break;
} }
//非通信车占用区段 //非通信车占用区段
MovementAuthority.End end = checkNctOccupied(train, temp); if (temp.isNonCbtcOccupy()) {
if (end != null) SectionPosition headPosition1 = train.getHeadPosition();
endList.add(end); if (!temp.isSamePhysical(headPosition1.getSection().getCode())) {
// //非通信车占用区段 endList.add(new MovementAuthority.End(temp, MovementAuthority.EndType.NCT_OCCUPIED_IN_FRONT_OF_SECTION));
// if (temp.isNonCbtcOccupy()) { }
// SectionPosition headPosition1 = train.getHeadPosition(); }
// if (!temp.isSamePhysical(headPosition1.getSection().getCode())) {
// endList.add(new MovementAuthority.End(temp, MovementAuthority.EndType.NCT_OCCUPIED_SECTION));
// }
// }
//检查关闭的区段 //检查关闭的区段
MovementAuthority.End cs = checkClosedSection(section); MovementAuthority.End cs = checkClosedSection(section);
if (cs != null) if (cs != null)
@ -221,20 +212,6 @@ public class ZCLogicLoop {
return endList; return endList;
} }
/**
* 检查非通信车占用的区段
*/
private MovementAuthority.End checkNctOccupied(VirtualRealityTrain train, Section section) {
if (train.isCBTC()) { //通信车
if (section.isNonCbtcOccupy() && !section.isInvalid())
return new MovementAuthority.End(section, MovementAuthority.EndType.NCT_OCCUPIED_SECTION);
} else { //非通信车
if (section.isNonCbtcOccupy())
return new MovementAuthority.End(section, MovementAuthority.EndType.NCT_OCCUPIED_SECTION);
}
return null;
}
private MovementAuthority.End checkClosedSection(Section section) { private MovementAuthority.End checkClosedSection(Section section) {
if (section.isClosed()) { if (section.isClosed()) {
return new MovementAuthority.End(section, MovementAuthority.EndType.CLOSED_SECTION); return new MovementAuthority.End(section, MovementAuthority.EndType.CLOSED_SECTION);

View File

@ -204,9 +204,6 @@ public class MapConfig {
/** 服务号的位数 */ /** 服务号的位数 */
private int figuresOfServiceNumber; private int figuresOfServiceNumber;
/** 没有ARB判定 */
private boolean noARB;
private Set<SimulationMember.Type> needConfirmConnectMembers = private Set<SimulationMember.Type> needConfirmConnectMembers =
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet()); Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet());
@ -254,7 +251,6 @@ public class MapConfig {
setDelayWhenCancelRouteWithAbnormalInterlock(configVO.isDelayWhenCancelRouteWithAbnormalInterlock()); setDelayWhenCancelRouteWithAbnormalInterlock(configVO.isDelayWhenCancelRouteWithAbnormalInterlock());
setFiguresOfTripNumber(configVO.getFiguresOfTripNumber()); setFiguresOfTripNumber(configVO.getFiguresOfTripNumber());
setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber()); setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber());
setNoARB(noARB);
} }
} }

View File

@ -727,20 +727,20 @@ public class Section extends MayOutOfOrderDevice {
if (!this.isAxleCounter()) { if (!this.isAxleCounter()) {
return; return;
} }
this.setInvalid(true); this.setNctOccupied(true);
if (this.isSwitchAxleCounterSection()) { // 道岔计轴区段 if (this.isSwitchAxleCounterSection()) { // 道岔计轴区段
List<Switch> relSwitchList = this.getRelSwitchList(); List<Switch> relSwitchList = this.getRelSwitchList();
for (Switch aSwitch : relSwitchList) { for (Switch aSwitch : relSwitchList) {
aSwitch.getA().setInvalid(true); aSwitch.getA().setNctOccupied(true);
if (aSwitch.isNormalPosition()) { if (aSwitch.isNormalPosition()) {
aSwitch.getB().setInvalid(true); aSwitch.getB().setNctOccupied(true);
aSwitch.getC().setInvalid(false); aSwitch.getC().setNctOccupied(false);
} else if (aSwitch.isReversePosition()) { } else if (aSwitch.isReversePosition()) {
aSwitch.getC().setInvalid(true); aSwitch.getC().setNctOccupied(true);
aSwitch.getB().setInvalid(false); aSwitch.getB().setNctOccupied(false);
} else { } else {
aSwitch.getB().setInvalid(true); aSwitch.getB().setNctOccupied(true);
aSwitch.getC().setInvalid(true); aSwitch.getC().setNctOccupied(true);
} }
} }
Section cross = queryCross(); Section cross = queryCross();
@ -749,7 +749,7 @@ public class Section extends MayOutOfOrderDevice {
} }
} else if (!CollectionUtils.isEmpty(this.logicList)) { } else if (!CollectionUtils.isEmpty(this.logicList)) {
for (Section logic : this.logicList) { for (Section logic : this.logicList) {
logic.setInvalid(true); logic.setNctOccupied(true);
} }
} }
@ -796,7 +796,7 @@ public class Section extends MayOutOfOrderDevice {
boolean leftSectionNctOccupied = leftSection.isNctOccupied() && leftSection.getParent().equals(this.parent); boolean leftSectionNctOccupied = leftSection.isNctOccupied() && leftSection.getParent().equals(this.parent);
Section rightSection = logic.getRightSection(); Section rightSection = logic.getRightSection();
boolean rightSectionNctOccupied = rightSection.isNctOccupied() && rightSection.getParent().equals(this.parent); boolean rightSectionNctOccupied = rightSection.isNctOccupied() && rightSection.getParent().equals(this.parent);
logic.setInvalid(leftSectionNctOccupied || rightSectionNctOccupied); logic.setNctOccupied(leftSectionNctOccupied || rightSectionNctOccupied);
}); });
} }

View File

@ -5,6 +5,7 @@ import club.joylink.rtss.simulation.cbtc.data.CalculateService;
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement; import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
import club.joylink.rtss.simulation.cbtc.data.map.Section; 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.Signal;
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain; import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain;
import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
@ -152,7 +153,7 @@ public class MovementAuthority {
// float offset = right ? 0 : baseSection.getLen(); // float offset = right ? 0 : baseSection.getLen();
// return new SectionPosition(baseSection, offset); // return new SectionPosition(baseSection, offset);
// } // }
case NCT_OCCUPIED_SECTION:{ case NCT_OCCUPIED_IN_FRONT_OF_SECTION:{
Section section = (Section) this.device; Section section = (Section) this.device;
Section previous = section.getNextRunningSectionOf(!right); Section previous = section.getNextRunningSectionOf(!right);
float offset = right ? 0 : previous.getLen(); float offset = right ? 0 : previous.getLen();
@ -212,9 +213,9 @@ public class MovementAuthority {
UNLOCKED_OVERLAP, UNLOCKED_OVERLAP,
UNLOCK_SECTION, UNLOCK_SECTION,
/** /**
* 非通信车占用区段 * 区段前方有非通信车占用
*/ */
NCT_OCCUPIED_SECTION, NCT_OCCUPIED_IN_FRONT_OF_SECTION,
/** /**
* 故障区段 * 故障区段
*/ */

View File

@ -159,9 +159,6 @@ public class RealLineConfigVO {
/** 服务号的位数 */ /** 服务号的位数 */
private int figuresOfServiceNumber = 3; private int figuresOfServiceNumber = 3;
/** 没有ARB判定 */
private boolean noARB;
public static RealLineConfigVO parseJsonStr(String configData) { public static RealLineConfigVO parseJsonStr(String configData) {
if (StringUtils.hasText(configData)) { if (StringUtils.hasText(configData)) {
return JsonUtils.read(configData, RealLineConfigVO.class); return JsonUtils.read(configData, RealLineConfigVO.class);