【引导进路检查】
This commit is contained in:
parent
0a0de5829b
commit
7b320c0a2e
@ -30,6 +30,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 进路排列检查
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
* @return
|
||||
@ -174,22 +175,35 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 排列引导进路
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
*/
|
||||
public void setGuide(Simulation simulation, Route route) {
|
||||
// 引导进路开始办理
|
||||
LocalDateTime systemTime = simulation.getSystemTime();
|
||||
route.startGuideSetting(systemTime);
|
||||
// 道岔征用
|
||||
for (SwitchElement switchElement : route.getSwitchList()) {
|
||||
switchElement.getASwitch().ciUse(switchElement.isNormal());
|
||||
// 进路检查
|
||||
Route.CheckFailMessage failMessage = routeSetCheck(simulation, route);
|
||||
if (failMessage == null) {
|
||||
if (route.isLock() && !route.isFleetMode()) {
|
||||
log.info("进路[{}]已经锁闭", route.debugStr());
|
||||
return;
|
||||
}
|
||||
// 引导进路开始办理
|
||||
LocalDateTime systemTime = simulation.getSystemTime();
|
||||
route.startGuideSetting(systemTime);
|
||||
// 道岔征用
|
||||
for (SwitchElement switchElement : route.getSwitchList()) {
|
||||
switchElement.getASwitch().ciUse(switchElement.isNormal());
|
||||
}
|
||||
simulation.getRepository().addSettingRoute(route);
|
||||
}
|
||||
if (Objects.nonNull(failMessage)) {
|
||||
log.info(String.format("进路[%s]排列检查失败,无法排列:%s", route.debugStr(), failMessage.debugStr()));
|
||||
}
|
||||
simulation.getRepository().addSettingRoute(route);
|
||||
}
|
||||
|
||||
/**
|
||||
* 排列进路
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
* @return
|
||||
@ -220,6 +234,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 排列进路过程控制
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
*/
|
||||
@ -295,6 +310,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 检查并锁闭主进路(不包含侧防和延续保护)
|
||||
*
|
||||
* @param route
|
||||
*/
|
||||
private void checkAndLockRouteMain(Route route) {
|
||||
@ -319,6 +335,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 解锁进路
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
*/
|
||||
@ -380,6 +397,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 延时解锁进路
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
*/
|
||||
@ -416,6 +434,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 道岔区段故障解锁
|
||||
*
|
||||
* @param simulation
|
||||
* @param aSwitch
|
||||
* @param route
|
||||
@ -460,6 +479,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 列车逐段解锁进路
|
||||
*
|
||||
* @param simulation
|
||||
* @param route
|
||||
*/
|
||||
@ -495,7 +515,7 @@ public class CiRouteService {
|
||||
if (!logic.isOccupied() && /*!logic.isInvalid() &&*/ logic.isRouteLockOn(right)) {
|
||||
logic.routeUnlocking(route);
|
||||
logic.overlapUnlocking();
|
||||
} else if(logic.isOccupied() /*|| logic.isInvalid()*/) {
|
||||
} else if (logic.isOccupied() /*|| logic.isInvalid()*/) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -523,7 +543,7 @@ public class CiRouteService {
|
||||
}
|
||||
if (relSwitch.isLinkedSwitch(aSwitch) || relSwitch.isBConnectTo(aSwitch)) {
|
||||
// if (!aSwitch.getA().isRouteLock()) { //当两条进路锁闭同一个道岔时,一条进路解锁,道岔的A区段可能仍旧被另一条进路锁闭着,导致无法解锁,故去掉此判断
|
||||
aSwitch.routeUnlock(route);
|
||||
aSwitch.routeUnlock(route);
|
||||
// aSwitch.overlapUnLock(); //应该不需要,暂时注掉
|
||||
// }
|
||||
}
|
||||
@ -564,6 +584,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 延续保护办理
|
||||
*
|
||||
* @param simulation
|
||||
* @param overlap
|
||||
*/
|
||||
@ -589,6 +610,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 延续保护办理过程
|
||||
*
|
||||
* @param simulation
|
||||
* @param overlap
|
||||
*/
|
||||
@ -666,6 +688,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 取消自动进路
|
||||
*
|
||||
* @param route
|
||||
*/
|
||||
public void cancelFleet(Route route) {
|
||||
@ -676,6 +699,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 设置联锁自动触发
|
||||
*
|
||||
* @param route
|
||||
*/
|
||||
public void setCIAutoTrigger(Route route) {
|
||||
@ -690,6 +714,7 @@ public class CiRouteService {
|
||||
|
||||
/**
|
||||
* 取消联锁自动触发
|
||||
*
|
||||
* @param route
|
||||
*/
|
||||
public void cancelCIAutoTrigger(Route route) {
|
||||
|
Loading…
Reference in New Issue
Block a user