Merge remote-tracking branch 'origin/test' into simulation-new-logic
This commit is contained in:
commit
d71ca4f07c
@ -157,10 +157,7 @@ public class AtsRouteService {
|
||||
Signal signal = simulation.getRepository().getByCode(signalCode, Signal.class);
|
||||
List<Route> routeList = signal.getRouteList();
|
||||
if (!CollectionUtils.isEmpty(routeList)) {
|
||||
for (Route route : routeList) {
|
||||
if (!route.isArs()) {
|
||||
continue;
|
||||
}
|
||||
routeList.stream().filter(Route::isArs).forEach(route -> {
|
||||
if (route.isFleetMode()) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Conflict,
|
||||
String.format("进路[%s(%s)]自动通过已开启,不能设置自动追踪", route.getName(), route.getCode()));
|
||||
@ -171,9 +168,11 @@ public class AtsRouteService {
|
||||
if (simulation.getRepository().getConfig().isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger()) {
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(signal.isHumanControl(), String.format("信号机[%s]需处于人工控", signal.getCode()));
|
||||
}
|
||||
});
|
||||
for (Route route : routeList) {
|
||||
route.setAtsControl(false);
|
||||
route.setCiControl(true);
|
||||
break;
|
||||
if (route.isArs())
|
||||
route.setCiControl(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -303,6 +303,7 @@ public class AtsStationService {
|
||||
List<Route> routeList = repository.getRouteList();
|
||||
for (Route route : routeList) {
|
||||
if (Objects.equals(route.getInterlockStation(), station)) {
|
||||
route.setAtsControl(false);
|
||||
if (!route.isArs() || route.isFleetMode() || route.isCiControl()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -467,12 +467,31 @@ public class Route extends MapNamedElement {
|
||||
public boolean isCiTrigger() {
|
||||
List<SectionPath> approachPathList = this.start.getApproachPathList();
|
||||
for (SectionPath sectionPath : approachPathList) {
|
||||
//检查区段占用
|
||||
List<Section> sectionList = sectionPath.getSectionList();
|
||||
boolean sectionOccupied = false;
|
||||
for (Section section : sectionList) {
|
||||
if (section.isOccupiedOn(this.getStart().isRight())) {
|
||||
return true;
|
||||
sectionOccupied = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!sectionOccupied)
|
||||
continue;
|
||||
//检查道岔位置
|
||||
if (CollectionUtils.isEmpty(sectionPath.getSwitchList())) {
|
||||
boolean switchOnPosition = true;
|
||||
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||
if (!switchElement.isOnPosition()) {
|
||||
switchOnPosition = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!switchOnPosition)
|
||||
continue;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user