修改,按计划行车时,列车前方进路中道岔不进路锁闭bug

This commit is contained in:
joylink_zhangsai 2021-10-25 14:52:35 +08:00
parent b445b59290
commit 13506c2faa
5 changed files with 11 additions and 10 deletions

View File

@ -717,7 +717,10 @@ public class AtsTrainLoadService {
// 排列好进路
Route aheadRoute = routePath.selectDefaultRouteOfStart(route.getStart(), train.isCommunicable(), repository.getConfig());
if (aheadRoute != null) {
this.deviceStatusModifyTool.openRouteDirect(simulation, aheadRoute);
Route.CheckFailMessage message = ciApiService.routeSettingCheck(simulation, aheadRoute.getCode());
if (message == null) {
this.deviceStatusModifyTool.openRouteDirect(simulation, aheadRoute);
}
}
break;
}

View File

@ -1,7 +1,6 @@
package club.joylink.rtss.simulation.cbtc.CI.device;
import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.constant.SignalAspect;
import club.joylink.rtss.simulation.cbtc.data.map.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@ -145,7 +144,7 @@ public class CiService {
}
// 道岔位置一致检查
for (SwitchElement element : route.getSwitchList()) {
if (!element.isOnPosition()) {
if (!element.isOnPosition() || !element.getASwitch().isRouteLockBy(route)) {
// log.debug("进路{}连锁条件检查失败:道岔{}位置{}",
// route.debugStr(),
// element.getASwitch().debugStr(), element.getASwitch().getPos());

View File

@ -221,7 +221,7 @@ public class Switch extends DelayUnlockDevice {
}
}
private boolean isRouteLockBy(Route route) {
public boolean isRouteLockBy(Route route) {
return this.routeLock && this.route.equals(route);
}

View File

@ -63,8 +63,7 @@ public class VirtualRealitySignal extends ControllableVrDevice<SignalAspect> {
return;
}
}
// this.aspect = command;
this.aspect = SignalAspect.R;
this.aspect = command;
}
public enum Fault {

View File

@ -154,10 +154,10 @@ public class DeviceStatusModifyTool {
private void batchSetRouteSwitchPositionAndLock(Route route, List<SwitchElement> switchList, boolean routeLock) {
if (!CollectionUtils.isEmpty(switchList)) {
for (SwitchElement switchElement : switchList) {
if (switchElement.getASwitch().isOverlapLock() &&
switchElement.isOnPosition()) {
continue;
}
// if (switchElement.getASwitch().isOverlapLock() &&
// switchElement.isOnPosition()) {
// continue;
// }
// switchElement.getASwitch().ciUse(switchElement.isNormal());
this.setSingleSwitchPositionDirectly(switchElement.getASwitch(), switchElement.isNormal());
if (routeLock) {