[修改]人解进路功能增加关闭引导信号功能(成都三)
All checks were successful
CI / Docker-Build (push) Successful in 2m14s

[新增]首区段占用时,办理引导进路延时15秒后关闭引导信号
This commit is contained in:
thesai 2024-10-12 17:30:21 +08:00
parent 3c9aeb82f6
commit 508b8fa086
3 changed files with 572 additions and 501 deletions

View File

@ -246,11 +246,11 @@ public class CiApiServiceImpl2 implements CiApiService {
@Override @Override
public void humanCancel(Simulation simulation, String routeCode) { public void humanCancel(Simulation simulation, String routeCode) {
Route route = simulation.getRepository().getByCode(routeCode, Route.class); Route route = simulation.getRepository().getByCode(routeCode, Route.class);
// if (simulation.getRepository().getConfig().isRailway()) { if (route.getStart().isGuideAspect()) { // 根据成都三引导解锁逻辑修改
// BusinessExceptionAssertEnum.OPERATION_FAIL.assertTrue(route.isApproachLock(), signalService.closeRoute(simulation, route.getStart());
// "进路未接近锁闭,不能人解"); } else {
// } this.routeService.delayUnlockStart(simulation, route, route.getStart());
this.routeService.delayUnlockStart(simulation, route, route.getStart()); }
} }
@Override @Override
@ -504,6 +504,10 @@ public class CiApiServiceImpl2 implements CiApiService {
signal.guideDelayStart(); signal.guideDelayStart();
} }
} }
if (repository.getConfig().isGuideDelayCloseWhenFirstSectionOccupied()
&& signal.isGuideAspect()) {
signal.guideDelayStart();
}
// if (signal.getGuideRemain() > 0) { // if (signal.getGuideRemain() > 0) {
// signal.setGuideRemain(0); // signal.setGuideRemain(0);
// } else { // } else {

View File

@ -1,20 +1,22 @@
package club.joylink.rtss.simulation.cbtc.data.map; 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.constant.RunLevel;
import club.joylink.rtss.simulation.cbtc.member.SimulationMember; import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
import club.joylink.rtss.vo.map.MapFunctionConfig; import club.joylink.rtss.vo.map.MapFunctionConfig;
import club.joylink.rtss.vo.map.RealLineConfigVO; 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.Objects;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import lombok.Getter;
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.*; 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 @Setter
public class MapConfig { 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是否自动处理人工设置的站前折返自动更新车次 * ATS是否自动处理人工设置的站前折返自动更新车次
*/ */
private boolean atsAutoHandleManualFrontTurnBack; private boolean atsAutoHandleManualFrontTurnBack;
/** /**
* CTC列车进路延续保护仅折返站处锁闭 * CTC列车进路延续保护仅折返站处锁闭
*/ */
private boolean ctcOverlapOnlyTurnBackStationLock; private boolean ctcOverlapOnlyTurnBackStationLock;
/** /**
* 引导办理是否需要先排列进路 * 引导办理是否需要先排列进路
*/ */
private boolean guideNeedRouteSettingFirst; private boolean guideNeedRouteSettingFirst;
/** /**
* 进路是否分为ATP信号地面信号引导信号 * 进路是否分为ATP信号地面信号引导信号
*/ */
private boolean routeLikeHa1; 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 * 不停站头码车服务号列表:010-999
*/ */
private String noParkingSM = ""; private String noParkingSM = "";
/** /**
* 停站头码车服务号列表:010-999 * 停站头码车服务号列表:010-999
*/ */
private String parkingSM = ""; private String parkingSM = "";
/** /**
* RM模式下ATP防护速度单位m/s * RM模式下ATP防护速度单位m/s
*/ */
private float rmAtpSpeed; private float rmAtpSpeed;
/** /**
* URM下ATP防护速度单位m/s * URM下ATP防护速度单位m/s
*/ */
private float urmAtpSpeed; 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自动调整运行 * ATS自动调整运行
*/ */
private boolean adjustOperationAutomatically; 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<String> sharingECStations; * 共享紧急关闭效果的车站
*/
private Set<String> 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; private boolean railway;
/** /**
* 对信号机封锁操作是否影响信号显示 * 对信号机封锁操作是否影响信号显示
* <p> * <p>
* true-封锁信号机会使信号机显示禁止色<br> * true-封锁信号机会使信号机显示禁止色<br> false-封锁信号机不会影响信号机显示
* false-封锁信号机不会影响信号机显示 */
*/ private boolean signalBolckOptReflectSignal;
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下的列车默认是停车等待命令状态 * 人工驾驶模式CM/RM/NRM下的列车默认是停车等待命令状态
*/ */
private boolean manualTrainDefaultStop; private boolean manualTrainDefaultStop;
private Set<SimulationMember.Type> needConfirmConnectMembers = /**
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet()); * 办理引导进路时如果进路首区段占用引导信号15秒后关闭
*/
private boolean guideDelayCloseWhenFirstSectionOccupied;
public MapConfig() { private Set<SimulationMember.Type> needConfirmConnectMembers =
this.lockFirst = false; Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER)
this.runMode = RunLevel.CBTC; .collect(Collectors.toSet());
}
public void copyConfigBy(RealLineConfigVO configVO) { public MapConfig() {
if (Objects.nonNull(configVO)) { this.lockFirst = false;
setUpRight(configVO.getUpRight()); this.runMode = RunLevel.CBTC;
this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable()); }
setLockFirst(configVO.getLockFirst());
setRouteSettingNoFail(configVO.isRouteSettingNoFail()); public void copyConfigBy(RealLineConfigVO configVO) {
setSignalOpenAfterParking(configVO.isSignalOpenAfterParking()); if (Objects.nonNull(configVO)) {
this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight()); setUpRight(configVO.getUpRight());
this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack()); this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable());
setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock()); setLockFirst(configVO.getLockFirst());
this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst()); setRouteSettingNoFail(configVO.isRouteSettingNoFail());
setSwitchSingleHandle(configVO.getSwitchSingleHandle()); setSignalOpenAfterParking(configVO.isSignalOpenAfterParking());
setSwitchNRTurnChain(configVO.getSwitchNRTurnChain()); this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight());
setSwitchSingleLockChain(configVO.getSwitchSingleLockChain()); this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack());
setSwitchLossChain(configVO.getSwitchLossChain()); setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock());
setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute()); this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst());
setRunMode(RunLevel.valueOf(configVO.getRunMode())); setSwitchSingleHandle(configVO.getSwitchSingleHandle());
setInitSingleLockSwitch(configVO.isInitSingleLockSwitch()); setSwitchNRTurnChain(configVO.getSwitchNRTurnChain());
setNoParkingSM(configVO.getNoParkingSM()); setSwitchSingleLockChain(configVO.getSwitchSingleLockChain());
setParkingSM(configVO.getParkingSM()); setSwitchLossChain(configVO.getSwitchLossChain());
setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f); setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute());
setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f); setRunMode(RunLevel.valueOf(configVO.getRunMode()));
setCancelAtsControlOfAllRoutesWhenCancelRoute(configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute()); setInitSingleLockSwitch(configVO.isInitSingleLockSwitch());
setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger(configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger()); setNoParkingSM(configVO.getNoParkingSM());
setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain()); setParkingSM(configVO.getParkingSM());
setEBWhenCancelRoute(configVO.isEBWhenCancelRoute()); setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f);
setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically()); setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f);
setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt()); setCancelAtsControlOfAllRoutesWhenCancelRoute(
setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt()); configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute());
setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide()); setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger(
configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger());
setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain());
setEBWhenCancelRoute(configVO.isEBWhenCancelRoute());
setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically());
setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt());
setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt());
setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide());
// setStandSkipSetTrainOnlyOnce(configVO.isStandSkipSetTrainOnlyOnce()); // setStandSkipSetTrainOnlyOnce(configVO.isStandSkipSetTrainOnlyOnce());
setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode()); setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode());
// setSomeCommandNeedInit(configVO.isSwitchBlockadeCommandNeedInit()); // setSomeCommandNeedInit(configVO.isSwitchBlockadeCommandNeedInit());
setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset()); setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset());
setSwitchTurnOperationCanRecoverSplitFault(configVO.isSwitchTurnOperationCanRecoverSplitFault()); setSwitchTurnOperationCanRecoverSplitFault(
setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode()); configVO.isSwitchTurnOperationCanRecoverSplitFault());
setDelayWhenCancelRouteWithAbnormalInterlock(configVO.isDelayWhenCancelRouteWithAbnormalInterlock()); setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode());
setFiguresOfTripNumber(configVO.getFiguresOfTripNumber()); setDelayWhenCancelRouteWithAbnormalInterlock(
setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber()); configVO.isDelayWhenCancelRouteWithAbnormalInterlock());
setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead()); setFiguresOfTripNumber(configVO.getFiguresOfTripNumber());
setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock()); setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber());
setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget()); setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead());
setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict()); setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock());
setTripNumberIsUnique(configVO.isTripNumberIsUnique()); setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget());
setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid()); setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict());
setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber()); setTripNumberIsUnique(configVO.isTripNumberIsUnique());
setRailway(configVO.isRailway()); setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid());
setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal()); setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber());
setSFUCanOnlyApplyForFaultLockSection(configVO.isSFUCanOnlyApplyForFaultLockSection()); setRailway(configVO.isRailway());
setRouteCanSetWhenSwitchFault(configVO.isRouteCanSetWhenSwitchFault()); setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal());
setManualTrainDefaultStop(configVO.isManualTrainDefaultStop()); 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) { public boolean isParkingServiceNumber(String serviceNumber) {
if (mapFunctionConfig == null) if (StringUtils.hasText(parkingSM)) {
return; if (parkingSM.contains("-")) {
this.hasCTC = mapFunctionConfig.isHasCTC(); String[] split = parkingSM.split("-");
this.hasTDCS = mapFunctionConfig.isHasTDCS(); if (split.length == 2) {
} return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0])
&& Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]);
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; }
} }
return false;
}
public boolean isParkingServiceNumber(String serviceNumber) { /**
if (StringUtils.hasText(parkingSM)) { * 是否向右根据上/下行
if (parkingSM.contains("-")) { *
String[] split = parkingSM.split("-"); * @param up 是否上行
if (split.length == 2) { * @return
return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]); */
} public boolean isRight(boolean up) {
} if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) {
} return true;
return false; } 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) { NOT,
if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) {
return true;
} else {
return false;
}
}
/** /**
* 是否是上行根据左/右行 * 延时取消
*/ */
public boolean isUp(boolean right) { DELAY,
return this.upRight == right; /**
} * 直接取消
*/
public boolean isSharingECStation(String stationCode) { DIRECT,
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,;
}
} }

View File

@ -10,251 +10,275 @@ import lombok.Setter;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
*地图线路公共配置项 * 地图线路公共配置项
*/ */
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
public class RealLineConfigVO { 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是否自动处理人工设置的站前折返自动更新车次 * ATS是否自动处理人工设置的站前折返自动更新车次
*/ */
private boolean atsAutoHandleManualFrontTurnBack = false; private boolean atsAutoHandleManualFrontTurnBack = false;
/** /**
*CTC列车进路延续保护仅折返站处锁闭 * CTC列车进路延续保护仅折返站处锁闭
*/ */
private boolean ctcOverlapOnlyTurnBackStationLock = false; 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 noParkingSM = "";
/** /**
*停站头码车服务号列表 * 停站头码车服务号列表
*/ */
private String parkingSM=""; private String parkingSM = "";
/** /**
*RM模式下ATP防护速度单位km/h * RM模式下ATP防护速度单位km/h
*/ */
private float rmAtpSpeed = 25f; private float rmAtpSpeed = 25f;
/** /**
*URM模式下ATP防护速度单位km/h * URM模式下ATP防护速度单位km/h
*/ */
private float urmAtpSpeed = 45f; 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自动调整运行 * ATS自动调整运行
*/ */
private boolean adjustOperationAutomatically = true; 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 standSkipSetTrainOnlyOnce;
/** /**
* 封锁命令状态仅在后备模式下有效 * 封锁命令状态仅在后备模式下有效
*/ */
private boolean blockadeCommandOnlyValidInStandbyMode; private boolean blockadeCommandOnlyValidInStandbyMode;
// /** // /**
// * 道岔封锁命令需要初始化 // * 道岔封锁命令需要初始化
// */ // */
// private boolean switchBlockadeCommandNeedInit; // 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; private boolean railway;
/** /**
* 对信号机封锁操作是否影响信号显示 * 对信号机封锁操作是否影响信号显示
* <p> * <p>
* true-封锁信号机会使信号机显示禁止色<br> * true-封锁信号机会使信号机显示禁止色<br> false-封锁信号机不会影响信号机显示
* false-封锁信号机不会影响信号机显示 */
*/ private boolean signalBolckOptReflectSignal = true;
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)) { * 人工驾驶模式CM/RM/NRM下的列车默认是停车等待命令状态
return JsonUtils.read(configData, RealLineConfigVO.class); */
} private boolean manualTrainDefaultStop;
return new RealLineConfigVO();
/**
* 办理引导进路时如果进路首区段占用引导信号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;
} }
} }