列车越过进路始端信号机后,信号机即刻降级(关闭级);进路延时解锁的同时进路即设置为人工模式;延续保护中的道岔设为延续保护锁闭;进路增加办理成功状态
This commit is contained in:
parent
e7c6d428ad
commit
18cfe99905
@ -15,7 +15,6 @@ import club.joylink.rtss.simulation.cbtc.data.map.*;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -190,6 +189,7 @@ public class CiLogic {
|
|||||||
routeService.routeSettingProcess(simulation, route);
|
routeService.routeSettingProcess(simulation, route);
|
||||||
}
|
}
|
||||||
if (route.isNormalUnlock()) {
|
if (route.isNormalUnlock()) {
|
||||||
|
ciService.interlockCheck(simulation, route); //南铁院叶老师提出列车越过始端信号机后灯座应该是红色
|
||||||
routeService.trainUnlockRoute(simulation, route);
|
routeService.trainUnlockRoute(simulation, route);
|
||||||
}
|
}
|
||||||
if (route.isLock()) {
|
if (route.isLock()) {
|
||||||
|
@ -244,7 +244,7 @@ public class CiRouteService {
|
|||||||
if (!config.isRouteSettingNoFail()) {
|
if (!config.isRouteSettingNoFail()) {
|
||||||
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(SimulationConstants.ROUTE_SETTING_TIMEOUT))) {
|
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(SimulationConstants.ROUTE_SETTING_TIMEOUT))) {
|
||||||
log.info("进路[{}]办理超时,取消办理2", route.debugStr());
|
log.info("进路[{}]办理超时,取消办理2", route.debugStr());
|
||||||
route.settingOver();
|
route.settingOver(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,12 +277,12 @@ public class CiRouteService {
|
|||||||
if (config.isRailway()) {
|
if (config.isRailway()) {
|
||||||
if (route.isGuideSetting() && route.getStart().isGuideAspect()
|
if (route.isGuideSetting() && route.getStart().isGuideAspect()
|
||||||
|| !route.getStart().isDefaultAspect()) {
|
|| !route.getStart().isDefaultAspect()) {
|
||||||
route.settingOver();
|
route.settingOver(true);
|
||||||
}
|
}
|
||||||
} else if ((route.getSettedAspect().equals(route.getStart().getAspect())) ||
|
} else if ((route.getSettedAspect().equals(route.getStart().getAspect())) ||
|
||||||
(route.isGuideSetting() && route.getStart().isGuideAspect())) {
|
(route.isGuideSetting() && route.getStart().isGuideAspect())) {
|
||||||
log.debug("进路[{}]信号开放,办理结束", route.debugStr());
|
log.debug("进路[{}]信号开放,办理结束", route.debugStr());
|
||||||
route.settingOver();
|
route.settingOver(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//由远及近办理进路
|
//由远及近办理进路
|
||||||
@ -296,7 +296,7 @@ public class CiRouteService {
|
|||||||
}
|
}
|
||||||
//最近的一条进路已经锁闭
|
//最近的一条进路已经锁闭
|
||||||
if (multiRouteAspects.get(0).getRoute().isLock()) {
|
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) {
|
public void delayUnlockStart(Simulation simulation, Route route, DelayUnlockDevice device) {
|
||||||
device.delayUnlockStart(route,simulation.getRepository().getConfig());
|
device.delayUnlockStart(route,simulation.getRepository().getConfig());
|
||||||
route.setDelayUnlockDevice(device);
|
route.setDelayUnlockDevice(device);
|
||||||
|
route.setAtsControl(false); //南铁院叶老师:延时解锁开始的同时信号机应该红名(南京二号线)
|
||||||
this.signalControlService.tryControlSignalAspectAccordingLevel(simulation, route.getStart(), route.getStart().getDefaultAspect());
|
this.signalControlService.tryControlSignalAspectAccordingLevel(simulation, route.getStart(), route.getStart().getDefaultAspect());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,6 +659,7 @@ public class CiRouteService {
|
|||||||
if (!switchElement.getASwitch().ciUse(switchElement.isNormal())) {
|
if (!switchElement.getASwitch().ciUse(switchElement.isNormal())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
switchElement.getASwitch().overlapLock();
|
||||||
}
|
}
|
||||||
// 延续保护位置转动
|
// 延续保护位置转动
|
||||||
boolean onPos = this.switchControlService.ensureSwitchPosCurrent(simulation, sectionPath.getSwitchList(), false);
|
boolean onPos = this.switchControlService.ensureSwitchPosCurrent(simulation, sectionPath.getSwitchList(), false);
|
||||||
|
@ -253,6 +253,11 @@ public class Route extends MapNamedElement {
|
|||||||
*/
|
*/
|
||||||
private String tripNumber;
|
private String tripNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办理成功。目前仅用于南京二显示成功信息
|
||||||
|
*/
|
||||||
|
private Boolean setSuccess;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
this.atsControl = true;
|
this.atsControl = true;
|
||||||
@ -268,6 +273,7 @@ public class Route extends MapNamedElement {
|
|||||||
this.train = null;
|
this.train = null;
|
||||||
this.checkConflict = false;
|
this.checkConflict = false;
|
||||||
this.settedAspect = null;
|
this.settedAspect = null;
|
||||||
|
this.setSuccess = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -595,6 +601,7 @@ public class Route extends MapNamedElement {
|
|||||||
this.setSetting(true);
|
this.setSetting(true);
|
||||||
this.settingStartTime = systemTime;
|
this.settingStartTime = systemTime;
|
||||||
this.setGuideSetting(false);
|
this.setGuideSetting(false);
|
||||||
|
this.setSuccess = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startGuideSetting(LocalDateTime systemTime) {
|
public void startGuideSetting(LocalDateTime systemTime) {
|
||||||
@ -602,13 +609,15 @@ public class Route extends MapNamedElement {
|
|||||||
this.setSetting(true);
|
this.setSetting(true);
|
||||||
this.settingStartTime = systemTime;
|
this.settingStartTime = systemTime;
|
||||||
this.setGuideSetting(true);
|
this.setGuideSetting(true);
|
||||||
|
this.setSuccess = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void settingOver() {
|
public void settingOver(boolean success) {
|
||||||
this.setSetting(false);
|
this.setSetting(false);
|
||||||
if (this.overlap != null) {
|
if (this.overlap != null) {
|
||||||
this.overlap.settingOver();
|
this.overlap.settingOver();
|
||||||
}
|
}
|
||||||
|
this.setSuccess = success;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLock(boolean lock) {
|
public void setLock(boolean lock) {
|
||||||
|
@ -68,6 +68,10 @@ public class RouteStatus extends DeviceStatus {
|
|||||||
@JsonDeserialize(using = Boolean2NumDeserializer.class)
|
@JsonDeserialize(using = Boolean2NumDeserializer.class)
|
||||||
private boolean checkConflict;
|
private boolean checkConflict;
|
||||||
|
|
||||||
|
@JsonSerialize(using = Boolean2NumSerializer.class)
|
||||||
|
@JsonDeserialize(using = Boolean2NumDeserializer.class)
|
||||||
|
private Boolean setSuccess;
|
||||||
|
|
||||||
public RouteStatus(Route route) {
|
public RouteStatus(Route route) {
|
||||||
super(route.getCode(), route.getDeviceType());
|
super(route.getCode(), route.getDeviceType());
|
||||||
this.atsControl = route.isAtsControl();
|
this.atsControl = route.isAtsControl();
|
||||||
@ -80,6 +84,7 @@ public class RouteStatus extends DeviceStatus {
|
|||||||
this.canceling = route.isDelayUnlocking();
|
this.canceling = route.isDelayUnlocking();
|
||||||
this.normalUnlock = route.isNormalUnlock();
|
this.normalUnlock = route.isNormalUnlock();
|
||||||
this.checkConflict = route.isCheckConflict();
|
this.checkConflict = route.isCheckConflict();
|
||||||
|
this.setSuccess = route.getSetSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -95,6 +100,7 @@ public class RouteStatus extends DeviceStatus {
|
|||||||
statusVO.setCanceling(canceling);
|
statusVO.setCanceling(canceling);
|
||||||
statusVO.setNormalUnlock(normalUnlock);
|
statusVO.setNormalUnlock(normalUnlock);
|
||||||
statusVO.setCheckConflict(checkConflict);
|
statusVO.setCheckConflict(checkConflict);
|
||||||
|
statusVO.setSetSuccess(setSuccess);
|
||||||
return statusVO;
|
return statusVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +159,11 @@ public class RouteStatus extends DeviceStatus {
|
|||||||
status.setCheckConflict(this.checkConflict);
|
status.setCheckConflict(this.checkConflict);
|
||||||
change = true;
|
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())) {
|
// if (!Objects.equals(this.conflict, route.isConflict())) {
|
||||||
// this.conflict = route.isConflict();
|
// this.conflict = route.isConflict();
|
||||||
// this.conflictDesc = route.getConflictDesc();
|
// this.conflictDesc = route.getConflictDesc();
|
||||||
|
@ -53,6 +53,9 @@ public class RouteStatusVO extends DeviceStatusVO {
|
|||||||
@JsonSerialize(using = Boolean2NumSerializer.class)
|
@JsonSerialize(using = Boolean2NumSerializer.class)
|
||||||
private Boolean checkConflict;
|
private Boolean checkConflict;
|
||||||
|
|
||||||
|
@JsonSerialize(using = Boolean2NumSerializer.class)
|
||||||
|
private Boolean setSuccess;
|
||||||
|
|
||||||
public RouteStatusVO(Route route) {
|
public RouteStatusVO(Route route) {
|
||||||
super(route.getCode(), route.getDeviceType());
|
super(route.getCode(), route.getDeviceType());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user