车辆段联锁生成-出段/进段信号机
This commit is contained in:
parent
6872f9b7bf
commit
7f6d9c863d
@ -147,10 +147,12 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
generatedRouteList.addAll(this.generateRouteDepot(signal, routeCodeGenerator, generateConfig, errorList));
|
||||
} else if (signal.getType().equals(Signal.SignalType.SHUNTING)) {
|
||||
generatedRouteList.addAll(this.generateRouteDepot(signal, routeCodeGenerator, generateConfig, errorList));
|
||||
} else if (signal.getType().equals(Signal.SignalType.INBOUND)) {
|
||||
generatedRouteList.addAll(this.generateRouteDepot(signal, routeCodeGenerator, generateConfig, errorList));
|
||||
}
|
||||
}
|
||||
log.info(String.format("生成一般进路[%s]条", generatedRouteList.size()));
|
||||
// // 进路敌对关系构建
|
||||
// 进路敌对关系构建
|
||||
this.buildRouteConflict(generatedRouteList);
|
||||
|
||||
if (!CollectionUtils.isEmpty(errorList)) {
|
||||
@ -748,7 +750,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
Signal clickEnd;
|
||||
|
||||
SignalAspect signalAspect;
|
||||
if (startSignalType.equals(endSignalType) && Signal.SignalType.SHUNTING2.equals(startSignalType)) {
|
||||
if ((Signal.SignalType.SHUNTING2.equals(endSignalType) && Signal.SignalType.SHUNTING2.equals(startSignalType))
|
||||
|| (Signal.SignalType.SHUNTING2.equals(endSignalType) && Signal.SignalType.INBOUND.equals(startSignalType))
|
||||
|| (Signal.SignalType.OUTBOUND.equals(endSignalType) && Signal.SignalType.SHUNTING2.equals(startSignalType))) {
|
||||
// 列车进路
|
||||
signalAspect = SignalAspect.Y;
|
||||
if (Objects.nonNull(endOpSignal) && endOpSignalType.equals(startSignalType)) {
|
||||
@ -1931,15 +1935,17 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
boolean right = startSignal.isRight();
|
||||
if (!CollectionUtils.isEmpty(tempPath.getSectionList())) {
|
||||
Signal signal = tempPath.getLastSection().getSignalOf(right);
|
||||
if (startSignal.getType().equals(Signal.SignalType.SHUNTING2)) {
|
||||
// 同向类型相同信号机, // 列车兼调车信号机 -> 列车兼调车信号机
|
||||
if (Objects.nonNull(signal) && signal.getType().equals(startSignal.getType())) {
|
||||
if (startSignal.getType().equals(Signal.SignalType.INBOUND)
|
||||
|| startSignal.getType().equals(Signal.SignalType.SHUNTING2)) {
|
||||
// 进段信号机 -> 列车兼调车信号机, 列车兼调车信号机 -> 列车兼调车信号机, 列车兼调车信号机 -> 出段信号机
|
||||
if (Objects.nonNull(signal) && (signal.getType().equals(Signal.SignalType.SHUNTING2)
|
||||
|| signal.getType().equals(Signal.SignalType.OUTBOUND))) {
|
||||
routePathList.add(tempPath);
|
||||
return;
|
||||
}
|
||||
if (Objects.isNull(section)) {
|
||||
Signal lastSignal = tempPath.getLastSection().getSignalOf(!right);
|
||||
if (Objects.nonNull(lastSignal) && lastSignal.getType().equals(startSignal.getType())) {
|
||||
if (Objects.nonNull(lastSignal) && lastSignal.getType().equals(Signal.SignalType.SHUNTING2)) {
|
||||
routePathList.add(tempPath);
|
||||
}
|
||||
return;
|
||||
@ -1964,6 +1970,11 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
routePathList.add(tempPath);
|
||||
return;
|
||||
}
|
||||
// 调车信号机 -> 出段信号机
|
||||
if (signal.getType().equals(Signal.SignalType.OUTBOUND)) {
|
||||
routePathList.add(tempPath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Objects.isNull(section)) {
|
||||
// 尽头有反向信号机
|
||||
|
@ -662,6 +662,14 @@ public class Signal extends DelayUnlockDevice {
|
||||
* 列车兼调车信号机
|
||||
*/
|
||||
SHUNTING2,
|
||||
/**
|
||||
* 进段信号机
|
||||
*/
|
||||
INBOUND,
|
||||
/**
|
||||
* 出段信号机
|
||||
*/
|
||||
OUTBOUND,
|
||||
}
|
||||
|
||||
public enum SignalFault implements DeviceFault {
|
||||
|
Loading…
Reference in New Issue
Block a user