修改:进路办理检查内容(自动进路)
新增:<进路联锁不包含站台扣车>联锁配置及相关逻辑
This commit is contained in:
parent
f70c7a51c6
commit
6c1c8d1b43
@ -500,14 +500,14 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
// 生成引导信号
|
||||
if (!CollectionUtils.isEmpty(groundRouteList)) {
|
||||
for (Route route : groundRouteList) {
|
||||
Route guide = this.buildGuideRouteFromGroundRoute(route, routeCodeGenerator);
|
||||
Route guide = this.buildGuideRouteFromGroundRoute(route, routeCodeGenerator, config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||
routeList.add(guide);
|
||||
}
|
||||
}
|
||||
return routeList;
|
||||
}
|
||||
|
||||
private Route buildGuideRouteFromGroundRoute(Route route, CodeGenerator routeCodeGenerator) {
|
||||
private Route buildGuideRouteFromGroundRoute(Route route, CodeGenerator routeCodeGenerator, boolean noStandHold) {
|
||||
Route clone = new Route(routeCodeGenerator.next(), route.getName());
|
||||
clone.setArs(false);
|
||||
clone.setGuide(true);
|
||||
@ -519,7 +519,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
clone.setSwitchList(route.getSwitchList());
|
||||
clone.setPsdList(route.getPsdList());
|
||||
clone.setEspList(route.getEspList());
|
||||
if (!noStandHold) {
|
||||
clone.setStandHoldList(route.getStandHoldList());
|
||||
}
|
||||
clone.setDestinationButtonSignal(route.getDestinationButtonSignal());
|
||||
return clone;
|
||||
}
|
||||
@ -609,7 +611,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
String code = routeCodeGenerator.next();
|
||||
String name = String.format("%s-%s_%s", start.getName(), endName, index);
|
||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||
routeOverlap, config.isRouteSignalAlwaysGreen());
|
||||
routeOverlap, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||
routeList.add(route);
|
||||
++index;
|
||||
}
|
||||
@ -617,7 +619,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
String code = routeCodeGenerator.next();
|
||||
String name = String.format("%s-%s", start.getName(), endName);
|
||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||
null, config.isRouteSignalAlwaysGreen());
|
||||
null, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||
routeList.add(route);
|
||||
} else {
|
||||
String code = routeCodeGenerator.next();
|
||||
@ -627,7 +629,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
overlap = overlapList.get(0);
|
||||
}
|
||||
Route route = this.buildRoute(code, name, start, end, clickEnd, sectionPath,
|
||||
overlap, config.isRouteSignalAlwaysGreen());
|
||||
overlap, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||
routeList.add(route);
|
||||
}
|
||||
}
|
||||
@ -1159,7 +1161,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
String code = routeCodeGenerator.next();
|
||||
Route tbRoute = new Route(code, name);
|
||||
// 拷贝进路其他属性
|
||||
this.copyToTurnBackRoute(route, tbRoute);
|
||||
this.copyToTurnBackRoute(route, tbRoute, config.isRouteInterlockDoNotIncludeStandHoldTrain());
|
||||
tbRoute.setTurnBack(true);
|
||||
// 如果生成进路按钮,折返进路按钮默认为终端信号机
|
||||
if (config.isRouteButton()) {
|
||||
@ -1172,7 +1174,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
return tbRouteList;
|
||||
}
|
||||
|
||||
private void copyToTurnBackRoute(Route route, Route tbRoute) {
|
||||
private void copyToTurnBackRoute(Route route, Route tbRoute, boolean noStandHold) {
|
||||
tbRoute.setInterlockStation(route.getInterlockStation());
|
||||
tbRoute.setStart(route.getStart());
|
||||
tbRoute.setDestination(route.getDestination());
|
||||
@ -1184,7 +1186,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
tbRoute.setFlt(route.isFlt());
|
||||
tbRoute.setArs(route.isArs());
|
||||
// 根据区段设置进路联锁站台相关元素
|
||||
if (!noStandHold) {
|
||||
tbRoute.setStandHoldList(route.getStandHoldList());
|
||||
}
|
||||
tbRoute.setPsdList(route.getPsdList());
|
||||
tbRoute.setEspList(route.getEspList());
|
||||
}
|
||||
@ -1264,11 +1268,12 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
* @param sectionPath
|
||||
* @param routeOverlap
|
||||
* @param alwaysGreen 进路始端信号是否总是开绿灯
|
||||
* @param noStandHold
|
||||
* @return
|
||||
*/
|
||||
private Route buildRoute(String code, String name,
|
||||
Signal start, Signal end, Signal endButton,
|
||||
SectionPath sectionPath, RouteOverlap routeOverlap, boolean alwaysGreen) {
|
||||
SectionPath sectionPath, RouteOverlap routeOverlap, boolean alwaysGreen, boolean noStandHold) {
|
||||
Route route = new Route(code, name);
|
||||
route.setInterlockStation(start.getInterlockStation());
|
||||
route.setStart(start);
|
||||
@ -1337,7 +1342,9 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!noStandHold) {
|
||||
route.setStandHoldList(standHoldList);
|
||||
}
|
||||
route.setPsdList(psdList);
|
||||
route.setEspList(espList);
|
||||
return route;
|
||||
|
@ -308,7 +308,7 @@ public class RouteService {
|
||||
log.info(String.format("进路[%s]排列检查失败,无法排列:%s", route.debugStr(), check.debugStr()));
|
||||
return check;
|
||||
}
|
||||
if (route.isLock()) {
|
||||
if (route.isLock() && !route.isFleetMode()) {
|
||||
log.info(String.format("进路[%s]已经锁闭", route.debugStr()));
|
||||
return null;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
@ -81,7 +82,9 @@ public class MapAutoSignalNewVO {
|
||||
vo.setCode(autoSignal.getCode());
|
||||
vo.setSignalCode(autoSignal.getSignal().getCode());
|
||||
vo.setSectionList(autoSignal.getSectionList().stream().map(Section::getCode).collect(Collectors.toList()));
|
||||
if (!CollectionUtils.isEmpty(autoSignal.getStandHoldList())) {
|
||||
vo.setHoldStandList(autoSignal.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
||||
}
|
||||
vo.setPsdList(autoSignal.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
||||
vo.setEspList(autoSignal.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
||||
vo.setConflictRouteList(autoSignal.getConflictRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
||||
|
@ -121,6 +121,9 @@ public class MapCiGenerateConfig {
|
||||
/** 上下行站台共享紧急关闭效果的车站 */
|
||||
private Set<String> sharingECStations = new HashSet<>();
|
||||
|
||||
/** 进路联锁不包含站台扣车 */
|
||||
private boolean routeInterlockDoNotIncludeStandHoldTrain;
|
||||
|
||||
// @ApiModelProperty(value = "是否分开生成ATP联锁和地面信号联锁")
|
||||
// private boolean apartGroundAndAtp;
|
||||
|
||||
|
@ -223,7 +223,9 @@ public class MapRouteNewVO {
|
||||
if (Objects.nonNull(route.getOverlap())) {
|
||||
vo.setOverlapCode(route.getOverlap().getCode());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(route.getStandHoldList())) {
|
||||
vo.setHoldStandList(route.getStandHoldList().stream().map(Stand::getCode).collect(Collectors.toList()));
|
||||
}
|
||||
vo.setPsdList(route.getPsdList().stream().map(PSD::getCode).collect(Collectors.toList()));
|
||||
vo.setEspList(route.getEspList().stream().map(ESP::getCode).collect(Collectors.toList()));
|
||||
vo.setConflictRouteList(route.getConflictingRouteList().stream().map(Route::getCode).collect(Collectors.toList()));
|
||||
|
Loading…
Reference in New Issue
Block a user