列车越过进路始端信号机后,信号机即刻降级(关闭级);进路延时解锁的同时进路即设置为人工模式;延续保护中的道岔设为延续保护锁闭;进路增加办理成功状态

This commit is contained in:
joylink_zhangsai 2023-10-26 15:35:24 +08:00
parent e7c6d428ad
commit 18cfe99905
5 changed files with 31 additions and 6 deletions

View File

@ -15,7 +15,6 @@ import club.joylink.rtss.simulation.cbtc.data.map.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Objects;
@ -190,6 +189,7 @@ public class CiLogic {
routeService.routeSettingProcess(simulation, route);
}
if (route.isNormalUnlock()) {
ciService.interlockCheck(simulation, route); //南铁院叶老师提出列车越过始端信号机后灯座应该是红色
routeService.trainUnlockRoute(simulation, route);
}
if (route.isLock()) {

View File

@ -244,7 +244,7 @@ public class CiRouteService {
if (!config.isRouteSettingNoFail()) {
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(SimulationConstants.ROUTE_SETTING_TIMEOUT))) {
log.info("进路[{}]办理超时取消办理2", route.debugStr());
route.settingOver();
route.settingOver(false);
return;
}
}
@ -277,12 +277,12 @@ public class CiRouteService {
if (config.isRailway()) {
if (route.isGuideSetting() && route.getStart().isGuideAspect()
|| !route.getStart().isDefaultAspect()) {
route.settingOver();
route.settingOver(true);
}
} else if ((route.getSettedAspect().equals(route.getStart().getAspect())) ||
(route.isGuideSetting() && route.getStart().isGuideAspect())) {
log.debug("进路[{}]信号开放,办理结束", route.debugStr());
route.settingOver();
route.settingOver(true);
}
} else {
//由远及近办理进路
@ -296,7 +296,7 @@ public class CiRouteService {
}
//最近的一条进路已经锁闭
if (multiRouteAspects.get(0).getRoute().isLock()) {
route.settingOver();
route.settingOver(true);
}
}
}
@ -416,6 +416,7 @@ public class CiRouteService {
public void delayUnlockStart(Simulation simulation, Route route, DelayUnlockDevice device) {
device.delayUnlockStart(route,simulation.getRepository().getConfig());
route.setDelayUnlockDevice(device);
route.setAtsControl(false); //南铁院叶老师延时解锁开始的同时信号机应该红名南京二号线
this.signalControlService.tryControlSignalAspectAccordingLevel(simulation, route.getStart(), route.getStart().getDefaultAspect());
}
@ -658,6 +659,7 @@ public class CiRouteService {
if (!switchElement.getASwitch().ciUse(switchElement.isNormal())) {
return;
}
switchElement.getASwitch().overlapLock();
}
// 延续保护位置转动
boolean onPos = this.switchControlService.ensureSwitchPosCurrent(simulation, sectionPath.getSwitchList(), false);

View File

@ -253,6 +253,11 @@ public class Route extends MapNamedElement {
*/
private String tripNumber;
/**
* 办理成功目前仅用于南京二显示成功信息
*/
private Boolean setSuccess;
@Override
public void reset() {
this.atsControl = true;
@ -268,6 +273,7 @@ public class Route extends MapNamedElement {
this.train = null;
this.checkConflict = false;
this.settedAspect = null;
this.setSuccess = null;
}
/**
@ -595,6 +601,7 @@ public class Route extends MapNamedElement {
this.setSetting(true);
this.settingStartTime = systemTime;
this.setGuideSetting(false);
this.setSuccess = null;
}
public void startGuideSetting(LocalDateTime systemTime) {
@ -602,13 +609,15 @@ public class Route extends MapNamedElement {
this.setSetting(true);
this.settingStartTime = systemTime;
this.setGuideSetting(true);
this.setSuccess = null;
}
public void settingOver() {
public void settingOver(boolean success) {
this.setSetting(false);
if (this.overlap != null) {
this.overlap.settingOver();
}
this.setSuccess = success;
}
public void setLock(boolean lock) {

View File

@ -68,6 +68,10 @@ public class RouteStatus extends DeviceStatus {
@JsonDeserialize(using = Boolean2NumDeserializer.class)
private boolean checkConflict;
@JsonSerialize(using = Boolean2NumSerializer.class)
@JsonDeserialize(using = Boolean2NumDeserializer.class)
private Boolean setSuccess;
public RouteStatus(Route route) {
super(route.getCode(), route.getDeviceType());
this.atsControl = route.isAtsControl();
@ -80,6 +84,7 @@ public class RouteStatus extends DeviceStatus {
this.canceling = route.isDelayUnlocking();
this.normalUnlock = route.isNormalUnlock();
this.checkConflict = route.isCheckConflict();
this.setSuccess = route.getSetSuccess();
}
@Override
@ -95,6 +100,7 @@ public class RouteStatus extends DeviceStatus {
statusVO.setCanceling(canceling);
statusVO.setNormalUnlock(normalUnlock);
statusVO.setCheckConflict(checkConflict);
statusVO.setSetSuccess(setSuccess);
return statusVO;
}
@ -153,6 +159,11 @@ public class RouteStatus extends DeviceStatus {
status.setCheckConflict(this.checkConflict);
change = true;
}
if (!Objects.equals(this.setSuccess, route.getSetSuccess())) {
this.setSuccess = route.getSetSuccess();
status.setSetSuccess(this.setSuccess);
change = true;
}
// if (!Objects.equals(this.conflict, route.isConflict())) {
// this.conflict = route.isConflict();
// this.conflictDesc = route.getConflictDesc();

View File

@ -53,6 +53,9 @@ public class RouteStatusVO extends DeviceStatusVO {
@JsonSerialize(using = Boolean2NumSerializer.class)
private Boolean checkConflict;
@JsonSerialize(using = Boolean2NumSerializer.class)
private Boolean setSuccess;
public RouteStatusVO(Route route) {
super(route.getCode(), route.getDeviceType());
}