【筛选实训设备修改】
This commit is contained in:
parent
0ab197318f
commit
9426b1165b
@ -20,7 +20,7 @@ public enum MapDeviceRule {
|
||||
@Override
|
||||
public List<Station> filterMapDeviceList(Simulation simulation) {
|
||||
List<Station> stationList = simulation.getBuildParams().getMap().getGraphDataNew().getStationList()
|
||||
.stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation())
|
||||
.stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation() && !s.isDepot())
|
||||
.sorted(Comparator.comparing(MapStationNewVO::getSn))
|
||||
.map(MapStationNewVO::getCode)
|
||||
.map(code -> simulation.getRepository().getByCode(code, Station.class))
|
||||
@ -56,11 +56,15 @@ public enum MapDeviceRule {
|
||||
ROUTE_LIST("进路列表") {
|
||||
@Override
|
||||
public List<Route> filterMapDeviceList(Simulation simulation) {
|
||||
boolean routeLikeHa1 = simulation.getRepository().getConfig().isRouteLikeHa1();
|
||||
boolean railway = simulation.getRepository().getConfig().isRailway();
|
||||
List<Route> routeList = simulation.getRepository().getRouteList().stream().filter(route -> {
|
||||
if (route.getStart() == null || route.getStart().isVirtual()
|
||||
|| (route.getStart().getStation()!= null && route.getStart().getStation().isDepot())) {
|
||||
if (route.getStart() == null || route.getStart().isVirtual()) {
|
||||
return false;
|
||||
}
|
||||
if (route.getStart().getStation()!= null && route.getStart().getStation().isDepot()) {
|
||||
return false;
|
||||
}
|
||||
if (route.getStart().getDeviceStation()!= null && route.getStart().getDeviceStation().isDepot()) {
|
||||
return false;
|
||||
}
|
||||
if (route.isGuide()) { // 引导进路跳过
|
||||
@ -138,7 +142,8 @@ public enum MapDeviceRule {
|
||||
SECTION_AXLE_COUNTER_LIST("道岔计轴区段列表") {
|
||||
@Override
|
||||
public List<Section> filterMapDeviceList(Simulation simulation) {
|
||||
List<Section> sectionList = querySectionListByFunction(simulation, Section::isSwitchAxleCounterSection);
|
||||
List<Section> sectionList = querySectionListByFunction(simulation,
|
||||
(section) -> section.isAxleCounter() && !section.isSwitchAxleCounterSection());
|
||||
return generateRandomElement(sectionList, NUMBER);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user