添加配置<当进路的区段占用时不排列进路>
This commit is contained in:
parent
9911d0e109
commit
ba2d75c0c0
@ -20,6 +20,7 @@ import org.springframework.util.CollectionUtils;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@ -35,6 +36,14 @@ public class AtsRouteSettingService {
|
|||||||
//根据一定规则清除掉冲突进路
|
//根据一定规则清除掉冲突进路
|
||||||
this.filterConflictTrainRouteByPlanTime(simulation, waitSetList);
|
this.filterConflictTrainRouteByPlanTime(simulation, waitSetList);
|
||||||
|
|
||||||
|
//如果进路区段有占用时不排列进路,筛选出没有区段占用的进路
|
||||||
|
if (simulation.getRepository().getConfig().isDoNotSetRouteWhenSectionOccupied()) {
|
||||||
|
waitSetList = waitSetList.stream().filter(trainRoute -> {
|
||||||
|
Route route = trainRoute.getRoute();
|
||||||
|
return route.getSectionList().stream().noneMatch(section -> section.isCtOccupied() || section.isNctOccupied());
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
// 执行进路排列
|
// 执行进路排列
|
||||||
for (TrainRoute trainRoute : waitSetList) {
|
for (TrainRoute trainRoute : waitSetList) {
|
||||||
Route route = trainRoute.getRoute();
|
Route route = trainRoute.getRoute();
|
||||||
|
@ -131,6 +131,11 @@ public class MapConfig {
|
|||||||
*/
|
*/
|
||||||
private float urmAtpSpeed;
|
private float urmAtpSpeed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当进路的区段占用时不排列进路
|
||||||
|
*/
|
||||||
|
private boolean doNotSetRouteWhenSectionOccupied;
|
||||||
|
|
||||||
private Set<SimulationMember.Type> needConfirmConnectMembers =
|
private Set<SimulationMember.Type> needConfirmConnectMembers =
|
||||||
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet());
|
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet());
|
||||||
|
|
||||||
@ -158,6 +163,7 @@ public class MapConfig {
|
|||||||
setParkingSM(configVO.getParkingSM());
|
setParkingSM(configVO.getParkingSM());
|
||||||
setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f);
|
setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f);
|
||||||
setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f);
|
setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f);
|
||||||
|
setDoNotSetRouteWhenSectionOccupied(configVO.isDoNotSetRouteWhenSectionOccupied());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,6 +70,11 @@ public class RealLineConfigVO {
|
|||||||
*/
|
*/
|
||||||
private boolean initSingleLockSwitch = false;
|
private boolean initSingleLockSwitch = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当进路的区段占用时不排列进路
|
||||||
|
*/
|
||||||
|
private boolean doNotSetRouteWhenSectionOccupied = false;
|
||||||
|
|
||||||
public static RealLineConfigVO parseJsonStr(String configData) {
|
public static RealLineConfigVO parseJsonStr(String configData) {
|
||||||
if (StringUtils.hasText(configData)) {
|
if (StringUtils.hasText(configData)) {
|
||||||
return JsonUtils.read(configData, RealLineConfigVO.class);
|
return JsonUtils.read(configData, RealLineConfigVO.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user