From 508b8fa08615da0ab4097cdd62d389121f69d7f2 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Sat, 12 Oct 2024 17:30:21 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E4=BA=BA=E8=A7=A3=E8=BF=9B?= =?UTF-8?q?=E8=B7=AF=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BC=95=E5=AF=BC=E4=BF=A1=E5=8F=B7=E5=8A=9F=E8=83=BD=EF=BC=88?= =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=89=EF=BC=89=20[=E6=96=B0=E5=A2=9E]?= =?UTF-8?q?=E9=A6=96=E5=8C=BA=E6=AE=B5=E5=8D=A0=E7=94=A8=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=8A=9E=E7=90=86=E5=BC=95=E5=AF=BC=E8=BF=9B=E8=B7=AF=E5=BB=B6?= =?UTF-8?q?=E6=97=B615=E7=A7=92=E5=90=8E=E5=85=B3=E9=97=AD=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simulation/cbtc/CI/CiApiServiceImpl2.java | 14 +- .../simulation/cbtc/data/map/MapConfig.java | 671 ++++++++++-------- .../joylink/rtss/vo/map/RealLineConfigVO.java | 388 +++++----- 3 files changed, 572 insertions(+), 501 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java index 0e7e266ce..4d84ee0a6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java @@ -246,11 +246,11 @@ public class CiApiServiceImpl2 implements CiApiService { @Override public void humanCancel(Simulation simulation, String routeCode) { Route route = simulation.getRepository().getByCode(routeCode, Route.class); -// if (simulation.getRepository().getConfig().isRailway()) { -// BusinessExceptionAssertEnum.OPERATION_FAIL.assertTrue(route.isApproachLock(), -// "进路未接近锁闭,不能人解"); -// } - this.routeService.delayUnlockStart(simulation, route, route.getStart()); + if (route.getStart().isGuideAspect()) { // 根据成都三引导解锁逻辑修改 + signalService.closeRoute(simulation, route.getStart()); + } else { + this.routeService.delayUnlockStart(simulation, route, route.getStart()); + } } @Override @@ -504,6 +504,10 @@ public class CiApiServiceImpl2 implements CiApiService { signal.guideDelayStart(); } } + if (repository.getConfig().isGuideDelayCloseWhenFirstSectionOccupied() + && signal.isGuideAspect()) { + signal.guideDelayStart(); + } // if (signal.getGuideRemain() > 0) { // signal.setGuideRemain(0); // } else { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MapConfig.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MapConfig.java index d093af3f1..b4f8c424d 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MapConfig.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MapConfig.java @@ -1,20 +1,22 @@ package club.joylink.rtss.simulation.cbtc.data.map; +import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.DISPATCHER; +import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.ELECTRIC_DISPATCHER; +import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.MAINTAINER; +import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.STATION_SUPERVISOR; + import club.joylink.rtss.simulation.cbtc.constant.RunLevel; import club.joylink.rtss.simulation.cbtc.member.SimulationMember; import club.joylink.rtss.vo.map.MapFunctionConfig; import club.joylink.rtss.vo.map.RealLineConfigVO; -import lombok.Getter; -import lombok.Setter; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; - -import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.*; +import lombok.Getter; +import lombok.Setter; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; /** * 地图配置 @@ -23,379 +25,420 @@ import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.*; @Setter public class MapConfig { - /** - * 上行方向是否向右 - */ - private boolean upRight; + /** + * 上行方向是否向右 + */ + private boolean upRight; - /** - * 信号封锁下进路是否可以办理 - */ - private boolean signalBlockRouteSettable; + /** + * 信号封锁下进路是否可以办理 + */ + private boolean signalBlockRouteSettable; - /** - * 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线) - */ - private boolean lockFirst; + /** + * 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线) + */ + private boolean lockFirst; - /** - * 进路办理不失败一直尝试办理 - */ - private boolean routeSettingNoFail; + /** + * 进路办理不失败一直尝试办理 + */ + private boolean routeSettingNoFail; - /** - * 列车停站开门后,才办理出站进路开放出站信号机 - */ - private boolean signalOpenAfterParking; + /** + * 列车停站开门后,才办理出站进路开放出站信号机 + */ + private boolean signalOpenAfterParking; - /** - * 站台扣车是否关闭逻辑点灯的信号机 - */ - private boolean standHoldCloseLogicLight; + /** + * 站台扣车是否关闭逻辑点灯的信号机 + */ + private boolean standHoldCloseLogicLight; - /** - * ATS是否自动处理人工设置的站前折返自动更新车次 - */ - private boolean atsAutoHandleManualFrontTurnBack; + /** + * ATS是否自动处理人工设置的站前折返自动更新车次 + */ + private boolean atsAutoHandleManualFrontTurnBack; - /** - * CTC列车进路延续保护仅折返站处锁闭 - */ - private boolean ctcOverlapOnlyTurnBackStationLock; + /** + * CTC列车进路延续保护仅折返站处锁闭 + */ + private boolean ctcOverlapOnlyTurnBackStationLock; - /** - * 引导办理是否需要先排列进路 - */ - private boolean guideNeedRouteSettingFirst; + /** + * 引导办理是否需要先排列进路 + */ + private boolean guideNeedRouteSettingFirst; - /** - * 进路是否分为ATP信号、地面信号、引导信号 - */ - private boolean routeLikeHa1; + /** + * 进路是否分为ATP信号、地面信号、引导信号 + */ + private boolean routeLikeHa1; - /** - * 道岔区段是否单独占用(对于两个相连的道岔情况) - */ - private boolean switchSingleHandle; + /** + * 道岔区段是否单独占用(对于两个相连的道岔情况) + */ + private boolean switchSingleHandle; - /** - * 进路延续保护设置通过触发设置 - */ - private boolean overlapSettingByTrigger; + /** + * 进路延续保护设置通过触发设置 + */ + private boolean overlapSettingByTrigger; - /** - * 道岔正/反操是否联动 - */ - private boolean switchNRTurnChain; + /** + * 道岔正/反操是否联动 + */ + private boolean switchNRTurnChain; - /** - * 道岔单解/锁是否联动 - */ - private boolean switchSingleLockChain; + /** + * 道岔单解/锁是否联动 + */ + private boolean switchSingleLockChain; - /** - * 道岔失表联动 - */ - private boolean switchLossChain; + /** + * 道岔失表联动 + */ + private boolean switchLossChain; - /** - * 取消进路命令能否取消引导或接近锁闭的进路 - */ - private ApproachLockCancel singleApproachLockCancelRoute; + /** + * 取消进路命令能否取消引导或接近锁闭的进路 + */ + private ApproachLockCancel singleApproachLockCancelRoute; - /** - * 列车控制模式/级别 - */ - private RunLevel runMode; + /** + * 列车控制模式/级别 + */ + private RunLevel runMode; - /** - * 初始加载设备时是否默认单锁正线道岔 - */ - private boolean initSingleLockSwitch; + /** + * 初始加载设备时是否默认单锁正线道岔 + */ + private boolean initSingleLockSwitch; - /** - * 不停站头码车服务号列表:010-999 - */ - private String noParkingSM = ""; - /** - * 停站头码车服务号列表:010-999 - */ - private String parkingSM = ""; + /** + * 不停站头码车服务号列表:010-999 + */ + private String noParkingSM = ""; + /** + * 停站头码车服务号列表:010-999 + */ + private String parkingSM = ""; - /** - * RM模式下ATP防护速度(单位m/s) - */ - private float rmAtpSpeed; + /** + * RM模式下ATP防护速度(单位m/s) + */ + private float rmAtpSpeed; - /** - * URM下ATP防护速度(单位m/s) - */ - private float urmAtpSpeed; + /** + * URM下ATP防护速度(单位m/s) + */ + private float urmAtpSpeed; - /** - * 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关 - */ - private boolean cancelAtsControlOfAllRoutesWhenCancelRoute; + /** + * 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关 + */ + private boolean cancelAtsControlOfAllRoutesWhenCancelRoute; - /** - * 在设置自排开或自动触发之前,信号机需处于人工控状态 - */ - private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger; + /** + * 在设置自排开或自动触发之前,信号机需处于人工控状态 + */ + private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger; - /** - * 扣车时是否允许提前发车 - */ - private boolean allowEarlyDepartureWhenHoldTrain; + /** + * 扣车时是否允许提前发车 + */ + private boolean allowEarlyDepartureWhenHoldTrain; - /** - * 取消进路时列车紧急制动 - */ - private boolean EBWhenCancelRoute; + /** + * 取消进路时列车紧急制动 + */ + private boolean EBWhenCancelRoute; - /** - * ATS自动调整运行 - */ - private boolean adjustOperationAutomatically; + /** + * ATS自动调整运行 + */ + private boolean adjustOperationAutomatically; - /** - * 在办理车队进路前是否要先排列进路 - */ - private boolean setRouteBeforeSetFlt; + /** + * 在办理车队进路前是否要先排列进路 + */ + private boolean setRouteBeforeSetFlt; - /** - * 在取消车队进路时同时取消进路 - */ - private boolean cancelRouteWhenCancelFlt; + /** + * 在取消车队进路时同时取消进路 + */ + private boolean cancelRouteWhenCancelFlt; - /** - * 办理引导前需要信号机接近锁闭 - */ - private boolean needApproachLockBeforeSetGuide; + /** + * 办理引导前需要信号机接近锁闭 + */ + private boolean needApproachLockBeforeSetGuide; - /** - * 封锁命令(状态)仅在后备模式下有效 - */ - private boolean blockadeCommandOnlyValidInStandbyMode; + /** + * 封锁命令(状态)仅在后备模式下有效 + */ + private boolean blockadeCommandOnlyValidInStandbyMode; - /** - * 计轴预复位前需要车站预复位 - */ - private boolean stationPreResetBeforeAxlePreReset; + /** + * 计轴预复位前需要车站预复位 + */ + private boolean stationPreResetBeforeAxlePreReset; - /** - * 道岔转动操作可以使失表故障恢复 - */ - private boolean switchTurnOperationCanRecoverSplitFault; + /** + * 道岔转动操作可以使失表故障恢复 + */ + private boolean switchTurnOperationCanRecoverSplitFault; - /** - * 扣车命令不区分控制模式 - */ - private boolean holdCommandIgnoreControlMode; + /** + * 扣车命令不区分控制模式 + */ + private boolean holdCommandIgnoreControlMode; - /** 共享紧急关闭效果的车站 */ - private Set sharingECStations; + /** + * 共享紧急关闭效果的车站 + */ + private Set sharingECStations; - /** 取消联锁条件不满足的进路时需要延时解锁 */ - private boolean delayWhenCancelRouteWithAbnormalInterlock; + /** + * 取消联锁条件不满足的进路时需要延时解锁 + */ + private boolean delayWhenCancelRouteWithAbnormalInterlock; - /** 车次号的位数 */ - private int figuresOfTripNumber; + /** + * 车次号的位数 + */ + private int figuresOfTripNumber; - /** 服务号的位数 */ - private int figuresOfServiceNumber; + /** + * 服务号的位数 + */ + private int figuresOfServiceNumber; - /** 设置头码车时检查方向 */ - private boolean checkDirectionWhenSetHead; + /** + * 设置头码车时检查方向 + */ + private boolean checkDirectionWhenSetHead; - /** 转换轨进路只能通过故障解锁来取消 */ - private boolean transferRouteCanOnlyFaultUnlock; + /** + * 转换轨进路只能通过故障解锁来取消 + */ + private boolean transferRouteCanOnlyFaultUnlock; - /** 头码车抵达目的地后变为人工车 */ - private boolean setManualWhenHeadTrainArriveTarget; + /** + * 头码车抵达目的地后变为人工车 + */ + private boolean setManualWhenHeadTrainArriveTarget; - /** 进路默认开启冲突检测 */ - private boolean routeDefaultCheckConflict; + /** + * 进路默认开启冲突检测 + */ + private boolean routeDefaultCheckConflict; - /** 处理停车场/车辆段逻辑 */ - private boolean handleDepot; + /** + * 处理停车场/车辆段逻辑 + */ + private boolean handleDepot; - /** 运行图中车次号是否唯一 */ - private boolean tripNumberIsUnique; + /** + * 运行图中车次号是否唯一 + */ + private boolean tripNumberIsUnique; - /** 站台折返策略不生效 */ - private boolean standTbStrategyIsInvalid; + /** + * 站台折返策略不生效 + */ + private boolean standTbStrategyIsInvalid; - /** 根据服务号更新车次计划(西安三提出,抽线之后,后续列车还跑原来的服务,不会自动顶上) */ - private boolean updateTripPlanByServiceNumber; + /** + * 根据服务号更新车次计划(西安三提出,抽线之后,后续列车还跑原来的服务,不会自动顶上) + */ + private boolean updateTripPlanByServiceNumber; - /** - * 大铁线路 - */ - private boolean railway; - /** - * 对信号机封锁操作,是否影响信号显示 - *

- * true-封锁信号机,会使信号机显示禁止色
- * false-封锁信号机,不会影响信号机显示。 - */ - private boolean signalBolckOptReflectSignal; + /** + * 大铁线路 + */ + private boolean railway; + /** + * 对信号机封锁操作,是否影响信号显示 + *

+ * true-封锁信号机,会使信号机显示禁止色
false-封锁信号机,不会影响信号机显示。 + */ + private boolean signalBolckOptReflectSignal; - /** - * 区故解只能应用于故障锁闭区段 - */ - private boolean SFUCanOnlyApplyForFaultLockSection; + /** + * 区故解只能应用于故障锁闭区段 + */ + private boolean SFUCanOnlyApplyForFaultLockSection; - private boolean hasCTC; + private boolean hasCTC; - private boolean hasTDCS; + private boolean hasTDCS; - /** - * 道岔失表/挤岔时可以办理进路(由远及近锁闭,到失表/挤岔处终止,并且可以开放引导信号) - */ - private boolean routeCanSetWhenSwitchFault; + /** + * 道岔失表/挤岔时可以办理进路(由远及近锁闭,到失表/挤岔处终止,并且可以开放引导信号) + */ + private boolean routeCanSetWhenSwitchFault; - /** - * 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态 - */ - private boolean manualTrainDefaultStop; + /** + * 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态 + */ + private boolean manualTrainDefaultStop; - private Set needConfirmConnectMembers = - Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet()); + /** + * 办理引导进路时,如果进路首区段占用,引导信号15秒后关闭 + */ + private boolean guideDelayCloseWhenFirstSectionOccupied; - public MapConfig() { - this.lockFirst = false; - this.runMode = RunLevel.CBTC; - } + private Set needConfirmConnectMembers = + Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER) + .collect(Collectors.toSet()); - public void copyConfigBy(RealLineConfigVO configVO) { - if (Objects.nonNull(configVO)) { - setUpRight(configVO.getUpRight()); - this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable()); - setLockFirst(configVO.getLockFirst()); - setRouteSettingNoFail(configVO.isRouteSettingNoFail()); - setSignalOpenAfterParking(configVO.isSignalOpenAfterParking()); - this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight()); - this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack()); - setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock()); - this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst()); - setSwitchSingleHandle(configVO.getSwitchSingleHandle()); - setSwitchNRTurnChain(configVO.getSwitchNRTurnChain()); - setSwitchSingleLockChain(configVO.getSwitchSingleLockChain()); - setSwitchLossChain(configVO.getSwitchLossChain()); - setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute()); - setRunMode(RunLevel.valueOf(configVO.getRunMode())); - setInitSingleLockSwitch(configVO.isInitSingleLockSwitch()); - setNoParkingSM(configVO.getNoParkingSM()); - setParkingSM(configVO.getParkingSM()); - setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f); - setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f); - setCancelAtsControlOfAllRoutesWhenCancelRoute(configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute()); - setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger(configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger()); - setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain()); - setEBWhenCancelRoute(configVO.isEBWhenCancelRoute()); - setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically()); - setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt()); - setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt()); - setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide()); + public MapConfig() { + this.lockFirst = false; + this.runMode = RunLevel.CBTC; + } + + public void copyConfigBy(RealLineConfigVO configVO) { + if (Objects.nonNull(configVO)) { + setUpRight(configVO.getUpRight()); + this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable()); + setLockFirst(configVO.getLockFirst()); + setRouteSettingNoFail(configVO.isRouteSettingNoFail()); + setSignalOpenAfterParking(configVO.isSignalOpenAfterParking()); + this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight()); + this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack()); + setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock()); + this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst()); + setSwitchSingleHandle(configVO.getSwitchSingleHandle()); + setSwitchNRTurnChain(configVO.getSwitchNRTurnChain()); + setSwitchSingleLockChain(configVO.getSwitchSingleLockChain()); + setSwitchLossChain(configVO.getSwitchLossChain()); + setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute()); + setRunMode(RunLevel.valueOf(configVO.getRunMode())); + setInitSingleLockSwitch(configVO.isInitSingleLockSwitch()); + setNoParkingSM(configVO.getNoParkingSM()); + setParkingSM(configVO.getParkingSM()); + setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f); + setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f); + setCancelAtsControlOfAllRoutesWhenCancelRoute( + configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute()); + setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger( + configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger()); + setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain()); + setEBWhenCancelRoute(configVO.isEBWhenCancelRoute()); + setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically()); + setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt()); + setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt()); + setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide()); // setStandSkipSetTrainOnlyOnce(configVO.isStandSkipSetTrainOnlyOnce()); - setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode()); + setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode()); // setSomeCommandNeedInit(configVO.isSwitchBlockadeCommandNeedInit()); - setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset()); - setSwitchTurnOperationCanRecoverSplitFault(configVO.isSwitchTurnOperationCanRecoverSplitFault()); - setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode()); - setDelayWhenCancelRouteWithAbnormalInterlock(configVO.isDelayWhenCancelRouteWithAbnormalInterlock()); - setFiguresOfTripNumber(configVO.getFiguresOfTripNumber()); - setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber()); - setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead()); - setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock()); - setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget()); - setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict()); - setTripNumberIsUnique(configVO.isTripNumberIsUnique()); - setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid()); - setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber()); - setRailway(configVO.isRailway()); - setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal()); - setSFUCanOnlyApplyForFaultLockSection(configVO.isSFUCanOnlyApplyForFaultLockSection()); - setRouteCanSetWhenSwitchFault(configVO.isRouteCanSetWhenSwitchFault()); - setManualTrainDefaultStop(configVO.isManualTrainDefaultStop()); + setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset()); + setSwitchTurnOperationCanRecoverSplitFault( + configVO.isSwitchTurnOperationCanRecoverSplitFault()); + setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode()); + setDelayWhenCancelRouteWithAbnormalInterlock( + configVO.isDelayWhenCancelRouteWithAbnormalInterlock()); + setFiguresOfTripNumber(configVO.getFiguresOfTripNumber()); + setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber()); + setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead()); + setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock()); + setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget()); + setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict()); + setTripNumberIsUnique(configVO.isTripNumberIsUnique()); + setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid()); + setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber()); + setRailway(configVO.isRailway()); + setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal()); + setSFUCanOnlyApplyForFaultLockSection(configVO.isSFUCanOnlyApplyForFaultLockSection()); + setRouteCanSetWhenSwitchFault(configVO.isRouteCanSetWhenSwitchFault()); + setManualTrainDefaultStop(configVO.isManualTrainDefaultStop()); + setGuideDelayCloseWhenFirstSectionOccupied( + configVO.isGuideDelayCloseWhenFirstSectionOccupied()); + } + } + + public void copyConfigBy(MapFunctionConfig mapFunctionConfig) { + if (mapFunctionConfig == null) { + return; + } + this.hasCTC = mapFunctionConfig.isHasCTC(); + this.hasTDCS = mapFunctionConfig.isHasTDCS(); + } + + public boolean isNoParkingServiceNumber(String serviceNumber) { + if (StringUtils.hasText(noParkingSM)) { + if (noParkingSM.contains("-")) { + String[] split = noParkingSM.split("-"); + if (split.length == 2) { + return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) + && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]); } + } } + return false; + } - public void copyConfigBy(MapFunctionConfig mapFunctionConfig) { - if (mapFunctionConfig == null) - return; - this.hasCTC = mapFunctionConfig.isHasCTC(); - this.hasTDCS = mapFunctionConfig.isHasTDCS(); - } - - public boolean isNoParkingServiceNumber(String serviceNumber) { - if (StringUtils.hasText(noParkingSM)) { - if (noParkingSM.contains("-")) { - String[] split = noParkingSM.split("-"); - if (split.length == 2) { - return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]); - } - } + public boolean isParkingServiceNumber(String serviceNumber) { + if (StringUtils.hasText(parkingSM)) { + if (parkingSM.contains("-")) { + String[] split = parkingSM.split("-"); + if (split.length == 2) { + return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) + && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]); } - return false; + } } + return false; + } - public boolean isParkingServiceNumber(String serviceNumber) { - if (StringUtils.hasText(parkingSM)) { - if (parkingSM.contains("-")) { - String[] split = parkingSM.split("-"); - if (split.length == 2) { - return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]); - } - } - } - return false; + /** + * 是否向右,根据上/下行 + * + * @param up 是否上行 + * @return + */ + public boolean isRight(boolean up) { + if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) { + return true; + } else { + return false; } + } + /** + * 是否是上行,根据左/右行 + */ + public boolean isUp(boolean right) { + return this.upRight == right; + } + + public boolean isSharingECStation(String stationCode) { + if (CollectionUtils.isEmpty(this.sharingECStations)) { + return false; + } + for (String code : sharingECStations) { + if (code.equals(stationCode)) { + return true; + } + } + return false; + } + + public enum ApproachLockCancel { /** - * 是否向右,根据上/下行 - * - * @param up 是否上行 - * @return + * 不能取消 */ - public boolean isRight(boolean up) { - if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) { - return true; - } else { - return false; - } - } - + NOT, /** - * 是否是上行,根据左/右行 + * 延时取消 */ - public boolean isUp(boolean right) { - return this.upRight == right; - } - - public boolean isSharingECStation(String stationCode) { - if (CollectionUtils.isEmpty(this.sharingECStations)) - return false; - for (String code : sharingECStations) { - if (code.equals(stationCode)) - return true; - } - return false; - } - - public enum ApproachLockCancel { - /** - * 不能取消 - */ - NOT, - /** - * 延时取消 - */ - DELAY, - /** - * 直接取消 - */ - DIRECT,; - } + DELAY, + /** + * 直接取消 + */ + DIRECT, + ; + } } diff --git a/src/main/java/club/joylink/rtss/vo/map/RealLineConfigVO.java b/src/main/java/club/joylink/rtss/vo/map/RealLineConfigVO.java index 429c2f9d1..cd9df13ff 100644 --- a/src/main/java/club/joylink/rtss/vo/map/RealLineConfigVO.java +++ b/src/main/java/club/joylink/rtss/vo/map/RealLineConfigVO.java @@ -10,251 +10,275 @@ import lombok.Setter; import org.springframework.util.StringUtils; /** - *地图线路公共配置项 + * 地图线路公共配置项 */ @Getter @Setter @NoArgsConstructor public class RealLineConfigVO { - /** - *上行是否右方向 - */ - private Boolean upRight = true; + /** + * 上行是否右方向 + */ + private Boolean upRight = true; - /** - *进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线) - */ - private Boolean lockFirst = false; + /** + * 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线) + */ + private Boolean lockFirst = false; - /** - * 信号封锁下进路是否可以办理 - */ - private boolean signalBlockRouteSettable = false; + /** + * 信号封锁下进路是否可以办理 + */ + private boolean signalBlockRouteSettable = false; - /** - * 进路办理不失败 - */ - private boolean routeSettingNoFail = false; + /** + * 进路办理不失败 + */ + private boolean routeSettingNoFail = false; - /** - *是否列车停站开门后,才办理出站进路开放出站信号机 - */ - private boolean signalOpenAfterParking = false; + /** + * 是否列车停站开门后,才办理出站进路开放出站信号机 + */ + private boolean signalOpenAfterParking = false; - /** - *站台扣车是否关闭逻辑点灯的信号机 - */ - private boolean standHoldCloseLogicLight = false; + /** + * 站台扣车是否关闭逻辑点灯的信号机 + */ + private boolean standHoldCloseLogicLight = false; - /** - *ATS是否自动处理人工设置的站前折返自动更新车次 - */ - private boolean atsAutoHandleManualFrontTurnBack = false; + /** + * ATS是否自动处理人工设置的站前折返自动更新车次 + */ + private boolean atsAutoHandleManualFrontTurnBack = false; - /** - *CTC列车进路延续保护仅折返站处锁闭 - */ - private boolean ctcOverlapOnlyTurnBackStationLock = false; + /** + * CTC列车进路延续保护仅折返站处锁闭 + */ + private boolean ctcOverlapOnlyTurnBackStationLock = false; - /** - *引导办理是否需要先排列进路 - */ - private boolean guideNeedRouteSettingFirst = true; + /** + * 引导办理是否需要先排列进路 + */ + private boolean guideNeedRouteSettingFirst = true; - /** - *道岔区段状态改变按单个道岔处理 - */ - private Boolean switchSingleHandle = true; + /** + * 道岔区段状态改变按单个道岔处理 + */ + private Boolean switchSingleHandle = true; - /** - *道岔正/反操是否联动 - */ - private Boolean switchNRTurnChain = false; + /** + * 道岔正/反操是否联动 + */ + private Boolean switchNRTurnChain = false; - /** - *道岔单解/锁是否联动 - */ - private Boolean switchSingleLockChain = false; + /** + * 道岔单解/锁是否联动 + */ + private Boolean switchSingleLockChain = false; - /** - *道岔故障失表是否联动 - */ - private Boolean switchLossChain = false; + /** + * 道岔故障失表是否联动 + */ + private Boolean switchLossChain = false; - /** - *是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路 - */ - private MapConfig.ApproachLockCancel singleApproachLockCancelRoute = MapConfig.ApproachLockCancel.NOT; + /** + * 是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路 + */ + private MapConfig.ApproachLockCancel singleApproachLockCancelRoute = MapConfig.ApproachLockCancel.NOT; - /** - *列车控制模式/级别 - */ - private String runMode = RunLevel.CBTC.name(); + /** + * 列车控制模式/级别 + */ + private String runMode = RunLevel.CBTC.name(); - /** - *不停站头码车服务号列表 - */ - private String noParkingSM=""; - /** - *停站头码车服务号列表 - */ - private String parkingSM=""; + /** + * 不停站头码车服务号列表 + */ + private String noParkingSM = ""; + /** + * 停站头码车服务号列表 + */ + private String parkingSM = ""; - /** - *RM模式下ATP防护速度(单位km/h) - */ - private float rmAtpSpeed = 25f; + /** + * RM模式下ATP防护速度(单位km/h) + */ + private float rmAtpSpeed = 25f; - /** - *URM模式下ATP防护速度(单位km/h) - */ - private float urmAtpSpeed = 45f; + /** + * URM模式下ATP防护速度(单位km/h) + */ + private float urmAtpSpeed = 45f; - /** - * 初始加载设备时是否默认单锁正线道岔 - */ - private boolean initSingleLockSwitch = false; + /** + * 初始加载设备时是否默认单锁正线道岔 + */ + private boolean initSingleLockSwitch = false; - /** - * 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关 - */ - private boolean cancelAtsControlOfAllRoutesWhenCancelRoute; + /** + * 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关 + */ + private boolean cancelAtsControlOfAllRoutesWhenCancelRoute; - /** - * 在设置自排开或自动触发之前,信号机需处于人工控状态 - */ - private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger; + /** + * 在设置自排开或自动触发之前,信号机需处于人工控状态 + */ + private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger; - /** - * 扣车时是否允许提前发车 - */ - private boolean allowEarlyDepartureWhenHoldTrain; + /** + * 扣车时是否允许提前发车 + */ + private boolean allowEarlyDepartureWhenHoldTrain; - /** - * 取消进路时列车紧急制动 - */ - private boolean EBWhenCancelRoute; + /** + * 取消进路时列车紧急制动 + */ + private boolean EBWhenCancelRoute; - /** - * ATS自动调整运行 - */ - private boolean adjustOperationAutomatically = true; + /** + * ATS自动调整运行 + */ + private boolean adjustOperationAutomatically = true; - /** - * 在办理车队进路前是否要先排列进路 - */ - private boolean setRouteBeforeSetFlt = true; + /** + * 在办理车队进路前是否要先排列进路 + */ + private boolean setRouteBeforeSetFlt = true; - /** - * 在取消车队进路时同时取消进路 - */ - private boolean cancelRouteWhenCancelFlt; + /** + * 在取消车队进路时同时取消进路 + */ + private boolean cancelRouteWhenCancelFlt; - /** - * 办理引导前需要信号机接近锁闭 - */ - private boolean needApproachLockBeforeSetGuide = true; + /** + * 办理引导前需要信号机接近锁闭 + */ + private boolean needApproachLockBeforeSetGuide = true; // /** // * 站台指定列车跳停仅跳停一次 // */ // private boolean standSkipSetTrainOnlyOnce; - /** - * 封锁命令(状态)仅在后备模式下有效 - */ - private boolean blockadeCommandOnlyValidInStandbyMode; + /** + * 封锁命令(状态)仅在后备模式下有效 + */ + private boolean blockadeCommandOnlyValidInStandbyMode; // /** // * 道岔封锁命令需要初始化 // */ // private boolean switchBlockadeCommandNeedInit; - /** - * 计轴预复位前需要车站预复位 - */ - private boolean stationPreResetBeforeAxlePreReset; + /** + * 计轴预复位前需要车站预复位 + */ + private boolean stationPreResetBeforeAxlePreReset; - /** - * 道岔转动操作可以使失表故障恢复 - */ - private boolean switchTurnOperationCanRecoverSplitFault; + /** + * 道岔转动操作可以使失表故障恢复 + */ + private boolean switchTurnOperationCanRecoverSplitFault; - /** - * 扣车命令不区分控制模式 - */ - private boolean holdCommandIgnoreControlMode; + /** + * 扣车命令不区分控制模式 + */ + private boolean holdCommandIgnoreControlMode; - /** 取消联锁条件不满足的进路时需要延时解锁 */ - private boolean delayWhenCancelRouteWithAbnormalInterlock; + /** + * 取消联锁条件不满足的进路时需要延时解锁 + */ + private boolean delayWhenCancelRouteWithAbnormalInterlock; - /** 车次号的位数 */ - private int figuresOfTripNumber = 4; + /** + * 车次号的位数 + */ + private int figuresOfTripNumber = 4; - /** 服务号的位数 */ - private int figuresOfServiceNumber = 3; + /** + * 服务号的位数 + */ + private int figuresOfServiceNumber = 3; - /** 设置头码车时检查方向 */ - private boolean checkDirectionWhenSetHead; + /** + * 设置头码车时检查方向 + */ + private boolean checkDirectionWhenSetHead; - /** 转换轨进路只能通过故障解锁来取消 */ - private boolean transferRouteCanOnlyFaultUnlock; + /** + * 转换轨进路只能通过故障解锁来取消 + */ + private boolean transferRouteCanOnlyFaultUnlock; - /** 头码车抵达目的地后变为人工车 */ - private boolean setManualWhenHeadTrainArriveTarget; + /** + * 头码车抵达目的地后变为人工车 + */ + private boolean setManualWhenHeadTrainArriveTarget; - /** 进路默认开启冲突检测 */ - private boolean routeDefaultCheckConflict; + /** + * 进路默认开启冲突检测 + */ + private boolean routeDefaultCheckConflict; - /** 运行图中车次号是否唯一 */ - private boolean tripNumberIsUnique; + /** + * 运行图中车次号是否唯一 + */ + private boolean tripNumberIsUnique; - /** 站台折返策略不生效 */ - private boolean standTbStrategyIsInvalid; + /** + * 站台折返策略不生效 + */ + private boolean standTbStrategyIsInvalid; - /** 根据服务号更新车次计划 */ - private boolean updateTripPlanByServiceNumber; + /** + * 根据服务号更新车次计划 + */ + private boolean updateTripPlanByServiceNumber; - /** - * 大铁线路 - */ - private boolean railway; - /** - * 对信号机封锁操作,是否影响信号显示 - *

- * true-封锁信号机,会使信号机显示禁止色
- * false-封锁信号机,不会影响信号机显示。 - */ - private boolean signalBolckOptReflectSignal=true; - + /** + * 大铁线路 + */ + private boolean railway; + /** + * 对信号机封锁操作,是否影响信号显示 + *

+ * true-封锁信号机,会使信号机显示禁止色
false-封锁信号机,不会影响信号机显示。 + */ + private boolean signalBolckOptReflectSignal = true; - /** - * 区故解只能应用于故障锁闭区段 - */ - @JsonProperty(value = "SFUCanOnlyApplyForFaultLockSection") - private boolean SFUCanOnlyApplyForFaultLockSection; - /** - * 道岔故障时可以办理进路(由远及近锁闭,到故障处终止) - */ - private boolean routeCanSetWhenSwitchFault; + /** + * 区故解只能应用于故障锁闭区段 + */ + @JsonProperty(value = "SFUCanOnlyApplyForFaultLockSection") + private boolean SFUCanOnlyApplyForFaultLockSection; - /** - * 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态 - */ - private boolean manualTrainDefaultStop; + /** + * 道岔故障时可以办理进路(由远及近锁闭,到故障处终止) + */ + private boolean routeCanSetWhenSwitchFault; - public static RealLineConfigVO parseJsonStr(String configData) { - if (StringUtils.hasText(configData)) { - return JsonUtils.read(configData, RealLineConfigVO.class); - } - return new RealLineConfigVO(); + /** + * 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态 + */ + private boolean manualTrainDefaultStop; + + /** + * 办理引导进路时,如果进路首区段占用,引导信号15秒后关闭 + */ + private boolean guideDelayCloseWhenFirstSectionOccupied; + + public static RealLineConfigVO parseJsonStr(String configData) { + if (StringUtils.hasText(configData)) { + return JsonUtils.read(configData, RealLineConfigVO.class); } + return new RealLineConfigVO(); + } - public boolean isUp(boolean right) { + public boolean isUp(boolean right) { - return right == upRight; - } + return right == upRight; + } }