Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/rtss-server into test1
This commit is contained in:
commit
cfac9c6d9f
@ -1,6 +1,7 @@
|
|||||||
package club.joylink.rtss.simulation.cbtc.CI.service;
|
package club.joylink.rtss.simulation.cbtc.CI.service;
|
||||||
|
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationModule;
|
import club.joylink.rtss.simulation.cbtc.constant.SimulationModule;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.support.TrainStopMessage;
|
import club.joylink.rtss.simulation.cbtc.data.support.TrainStopMessage;
|
||||||
@ -355,7 +356,7 @@ public class RouteService {
|
|||||||
if (Objects.isNull(route.getSettingStartTime())) {//旧数据兼容逻辑
|
if (Objects.isNull(route.getSettingStartTime())) {//旧数据兼容逻辑
|
||||||
route.setSettingStartTime(simulation.getSystemTime());
|
route.setSettingStartTime(simulation.getSystemTime());
|
||||||
}
|
}
|
||||||
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(10))) {
|
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(SimulationConstants.ROUTE_SETTING_TIMEOUT))) {
|
||||||
route.settingFailed();
|
route.settingFailed();
|
||||||
simulation.getRepository().removeSettingRoute(route);
|
simulation.getRepository().removeSettingRoute(route);
|
||||||
route.setLock(false);
|
route.setLock(false);
|
||||||
@ -390,7 +391,6 @@ public class RouteService {
|
|||||||
log.debug(section.debugStr() + "因<预先锁闭>锁闭");
|
log.debug(section.debugStr() + "因<预先锁闭>锁闭");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!route.isRequisition()) {
|
|
||||||
// 征用设备
|
// 征用设备
|
||||||
// 道岔位置转换
|
// 道岔位置转换
|
||||||
List<SwitchElement> switchList = route.getSwitchList();
|
List<SwitchElement> switchList = route.getSwitchList();
|
||||||
@ -406,11 +406,9 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
route.updateRequisition(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 设备已征用,检查进路条件
|
// 设备已征用,检查进路条件
|
||||||
boolean onPosition = this.checkSwitchPosition(simulation, route);
|
boolean onPosition = this.checkSwitchPosition(simulation, route) &&
|
||||||
|
this.isFlsSwitchOnPosition(route.getFlsList());
|
||||||
if (!onPosition) { // 还未转换到位置
|
if (!onPosition) { // 还未转换到位置
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -479,7 +477,7 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
MapConfig config = simulation.getRepository().getConfig();
|
MapConfig config = simulation.getRepository().getConfig();
|
||||||
if (!config.isRouteSettingNoFail()) {
|
if (!config.isRouteSettingNoFail()) {
|
||||||
if (simulation.getSystemTime().isAfter(overlap.getSettingStartTime().plusSeconds(10))) {
|
if (simulation.getSystemTime().isAfter(overlap.getSettingStartTime().plusSeconds(SimulationConstants.ROUTE_SETTING_TIMEOUT))) {
|
||||||
overlap.settingFailed();
|
overlap.settingFailed();
|
||||||
log.info(String.format("进路延续保护[%s]办理失败", overlap.debugStr()));
|
log.info(String.format("进路延续保护[%s]办理失败", overlap.debugStr()));
|
||||||
return;
|
return;
|
||||||
@ -1234,11 +1232,18 @@ public class RouteService {
|
|||||||
boolean interlocked = this.isInterlocked(route);
|
boolean interlocked = this.isInterlocked(route);
|
||||||
if (!interlocked) {
|
if (!interlocked) {
|
||||||
// 进路信号开放,联锁逻辑不满足,需关闭信号
|
// 进路信号开放,联锁逻辑不满足,需关闭信号
|
||||||
|
if (route.isOpen()) {
|
||||||
this.routeClose(simulation, route);
|
this.routeClose(simulation, route);
|
||||||
log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯",
|
log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯",
|
||||||
route.debugStr(), route.getStart().getName(), route.getStart().getCode()));
|
route.debugStr(), route.getStart().getName(), route.getStart().getCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (route.isOpen()) {
|
||||||
|
if (this.checkCanOverlapSet(simulation, route) && !route.getOverlap().isLock()) {
|
||||||
|
this.checkAndSetLockedRouteOverlap(simulation, route);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {
|
public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) {
|
||||||
RouteOverlap overlap = route.getOverlap();
|
RouteOverlap overlap = route.getOverlap();
|
||||||
|
@ -97,6 +97,11 @@ public interface SimulationConstants {
|
|||||||
*/
|
*/
|
||||||
int ATO_TRAIN_GET_SIGNAL_TO_START_DELAY = 6 * 1000;
|
int ATO_TRAIN_GET_SIGNAL_TO_START_DELAY = 6 * 1000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进路办理超时失败时间,单位秒
|
||||||
|
*/
|
||||||
|
int ROUTE_SETTING_TIMEOUT = 20;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取仿真运行计划日期(运营日)
|
* 获取仿真运行计划日期(运营日)
|
||||||
* @return
|
* @return
|
||||||
|
Loading…
Reference in New Issue
Block a user