Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
thesai | 508b8fa086 | |
tiger_zhou | 3c9aeb82f6 | |
thesai | 81074bbb2a | |
thesai | 82682452a1 |
|
@ -46,7 +46,14 @@ public class SortDiagramStation {
|
||||||
|
|
||||||
|
|
||||||
private Station findNotDepotStation(boolean isRight, int index) {
|
private Station findNotDepotStation(boolean isRight, int index) {
|
||||||
Station station = stationList.get(index);
|
Station station = null;
|
||||||
|
if (index >= stationList.size()) {
|
||||||
|
station = stationList.get(stationList.size() - 1);
|
||||||
|
} else if (index <= 0) {
|
||||||
|
station = stationList.get(0);
|
||||||
|
} else {
|
||||||
|
station = stationList.get(index);
|
||||||
|
}
|
||||||
while (station.isDepot()) {
|
while (station.isDepot()) {
|
||||||
index += isRight ? -1 : 1;
|
index += isRight ? -1 : 1;
|
||||||
station = stationList.get(index);
|
station = stationList.get(index);
|
||||||
|
|
|
@ -32,6 +32,7 @@ public abstract class AtsRouteSelectService {
|
||||||
* 查询需要触发的进路
|
* 查询需要触发的进路
|
||||||
*
|
*
|
||||||
* @param simulation
|
* @param simulation
|
||||||
|
* @param targetList 运行计划中的计划区段(包含站后折返轨)
|
||||||
* @param turnBackSection 站后折返的折返轨
|
* @param turnBackSection 站后折返的折返轨
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -63,13 +64,18 @@ public abstract class AtsRouteSelectService {
|
||||||
MapConfig config = repository.getConfig();
|
MapConfig config = repository.getConfig();
|
||||||
if (!config.isSignalOpenAfterParking() || (headSection.equals(planSection)
|
if (!config.isSignalOpenAfterParking() || (headSection.equals(planSection)
|
||||||
&& trainInfo.isParking())) { //不需要停站就可以开放信号机或者已经在计划区段停站(可以继续向前办理进路)
|
&& trainInfo.isParking())) { //不需要停站就可以开放信号机或者已经在计划区段停站(可以继续向前办理进路)
|
||||||
if (nextPlanSection != null) { //计划区段路径未跑完
|
//根据车站折返策略处理
|
||||||
|
Station station = planSection.getStation();
|
||||||
|
if (station.getTbStrategyId() != null && Objects.equals(turnBackSection,
|
||||||
|
nextPlanSection)) { //有折返策略时按折返策略
|
||||||
|
return queryTriggerRoutes4TurnBack(simulation, planSection, turnBackSection, trainInfo);
|
||||||
|
} else if (nextPlanSection != null) { //无折返策略按计划
|
||||||
routePaths = repository.queryRoutePaths(planSection, nextPlanSection);
|
routePaths = repository.queryRoutePaths(planSection, nextPlanSection);
|
||||||
if (!CollectionUtils.isEmpty(routePaths)) {
|
if (!CollectionUtils.isEmpty(routePaths)) {
|
||||||
return this.queryTriggerRoutesOfRoutePath(repository, trainInfo, routePaths,
|
return this.queryTriggerRoutesOfRoutePath(repository, trainInfo, routePaths,
|
||||||
nextPlanSection).getRoute();
|
nextPlanSection).getRoute();
|
||||||
}
|
}
|
||||||
} else if (turnBackSection != null) { //站后折返
|
} else if (turnBackSection != null) {
|
||||||
return queryTriggerRoutes4TurnBack(simulation, planSection, turnBackSection, trainInfo);
|
return queryTriggerRoutes4TurnBack(simulation, planSection, turnBackSection, trainInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,23 +5,26 @@ import club.joylink.rtss.simulation.cbtc.ATS.service.AtsStandService;
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.service.AtsTrainService;
|
import club.joylink.rtss.simulation.cbtc.ATS.service.AtsTrainService;
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
import club.joylink.rtss.simulation.cbtc.data.map.MapConfig;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Section;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.plan.StationPlan;
|
import club.joylink.rtss.simulation.cbtc.data.plan.StationPlan;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.plan.TripPlan;
|
import club.joylink.rtss.simulation.cbtc.data.plan.TripPlan;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
|
import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.vo.TrainInfo;
|
import club.joylink.rtss.simulation.cbtc.data.vo.TrainInfo;
|
||||||
import club.joylink.rtss.simulation.cbtc.onboard.ATP.OnboardAtpApiService;
|
import club.joylink.rtss.simulation.cbtc.onboard.ATP.OnboardAtpApiService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划车阶段处理服务
|
* 计划车阶段处理服务
|
||||||
|
@ -29,44 +32,47 @@ import java.util.Objects;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class AtsPlanTrainStageService implements AtsStageService {
|
public class AtsPlanTrainStageService implements AtsStageService {
|
||||||
@Autowired
|
|
||||||
private AtsRealRunRecordService realRunRecordService;
|
|
||||||
@Autowired
|
|
||||||
private AtsStandService atsStandService;
|
|
||||||
@Autowired
|
|
||||||
private OnboardAtpApiService onboardAtpApiService;
|
|
||||||
@Autowired
|
|
||||||
private AtsTrainService atsTrainService;
|
|
||||||
|
|
||||||
@Override
|
@Autowired
|
||||||
public void handleTransferTrackParking(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
private AtsRealRunRecordService realRunRecordService;
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
@Autowired
|
||||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
private AtsStandService atsStandService;
|
||||||
|
@Autowired
|
||||||
|
private OnboardAtpApiService onboardAtpApiService;
|
||||||
|
@Autowired
|
||||||
|
private AtsTrainService atsTrainService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleTransferTrackParking(Simulation simulation, TrainInfo trainInfo,
|
||||||
|
Section parkSection) {
|
||||||
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
|
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(),
|
||||||
|
trainInfo.getTripNumber());
|
||||||
// List<RoutePath> routePathList = repository.queryRoutePathsByEnd(parkSection);
|
// List<RoutePath> routePathList = repository.queryRoutePathsByEnd(parkSection);
|
||||||
// if (routePathList.get(0).isRight() == trainInfo.getRight()) { //准备回库
|
// if (routePathList.get(0).isRight() == trainInfo.getRight()) { //准备回库
|
||||||
// if (!parkSection.isTurnBackTrack()) { //针对上饶沙盘
|
// if (!parkSection.isTurnBackTrack()) { //针对上饶沙盘
|
||||||
// trainInfo.finishPlanPrepareInbound();
|
// trainInfo.finishPlanPrepareInbound();
|
||||||
// }
|
// }
|
||||||
// } else 没看懂为啥有这部分逻辑,先注掉
|
// } else 没看懂为啥有这部分逻辑,先注掉
|
||||||
if (tripPlan.getEndSection().equals(parkSection) ||
|
if (tripPlan.getEndSection().equals(parkSection) ||
|
||||||
tripPlan.getEndSection().getStation().equals(parkSection.getStation())) {
|
tripPlan.getEndSection().getStation().equals(parkSection.getStation())) {
|
||||||
// 列车到达计划终点,准备回库
|
// 列车到达计划终点,准备回库
|
||||||
if (simulation.getRepository().getConfig().isHandleDepot()) {
|
if (simulation.getRepository().getConfig().isHandleDepot()) {
|
||||||
trainInfo.finishPlanPrepareEnterDepot();
|
trainInfo.finishPlanPrepareEnterDepot();
|
||||||
} else {
|
} else {
|
||||||
if (!parkSection.isTurnBackTrack()) { //针对上饶沙盘
|
if (!parkSection.isTurnBackTrack()) { //针对上饶沙盘
|
||||||
trainInfo.finishPlanPrepareInbound();
|
trainInfo.finishPlanPrepareInbound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//转人工车
|
//转人工车
|
||||||
atsTrainService.setManualTrain(simulation, trainInfo.getGroupNumber());
|
atsTrainService.setManualTrain(simulation, trainInfo.getGroupNumber());
|
||||||
} else if (tripPlan.getStartSection().equals(parkSection)) {
|
} else if (tripPlan.getStartSection().equals(parkSection)) {
|
||||||
// 出库列车
|
// 出库列车
|
||||||
if (trainInfo.getPlanStandTrack() != null) {
|
if (trainInfo.getPlanStandTrack() != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LocalDateTime systemTime = simulation.getSystemTime();
|
LocalDateTime systemTime = simulation.getSystemTime();
|
||||||
if (systemTime.toLocalTime().isAfter(tripPlan.getStartTime())) {
|
if (systemTime.toLocalTime().isAfter(tripPlan.getStartTime())) {
|
||||||
// Integer intervalTime = repository.getIntervalTime();
|
// Integer intervalTime = repository.getIntervalTime();
|
||||||
// LocalDateTime lastDepartTime = repository.getLastDepartTime();
|
// LocalDateTime lastDepartTime = repository.getLastDepartTime();
|
||||||
// if (intervalTime != null && lastDepartTime != null) {
|
// if (intervalTime != null && lastDepartTime != null) {
|
||||||
|
@ -74,261 +80,289 @@ public class AtsPlanTrainStageService implements AtsStageService {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
StationPlan nextPlan = tripPlan.getSecondStationPlan();
|
StationPlan nextPlan = tripPlan.getSecondStationPlan();
|
||||||
this.updateNextPlan(simulation, trainInfo, tripPlan, nextPlan);
|
this.updateNextPlan(simulation, trainInfo, tripPlan, nextPlan);
|
||||||
// repository.setLastDepartTime(systemTime);
|
// repository.setLastDepartTime(systemTime);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleNormalStandParking(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
public void handleNormalStandParking(Simulation simulation, TrainInfo trainInfo,
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
Section parkSection) {
|
||||||
MapConfig config = repository.getConfig();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
List<Stand> standList = parkSection.getStandList();
|
MapConfig config = repository.getConfig();
|
||||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
List<Stand> standList = parkSection.getStandList();
|
||||||
TripPlan nextTripPlan = null;
|
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(),
|
||||||
StationPlan stationPlan = tripPlan.queryStationPlan(parkSection);
|
trainInfo.getTripNumber());
|
||||||
if (config.isStandTbStrategyIsInvalid()) {
|
TripPlan nextTripPlan = null;
|
||||||
if (stationPlan != null && tripPlan.isLastPlan(stationPlan) && tripPlan.isFrontTurnBack()) { // 到达终点站了,判断站前折返还是站后折返
|
StationPlan stationPlan = tripPlan.queryStationPlan(parkSection);
|
||||||
// 站前折返,查询下一车次计划
|
if (config.isStandTbStrategyIsInvalid()) {
|
||||||
|
if (stationPlan != null && tripPlan.isLastPlan(stationPlan)
|
||||||
|
&& tripPlan.isFrontTurnBack()) { // 到达终点站了,判断站前折返还是站后折返
|
||||||
|
// 站前折返,查询下一车次计划
|
||||||
|
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
|
} else if (stationPlan == null && tripPlan.isLastPlanStation(parkSection.getStation())) {
|
||||||
|
if (config.isAtsAutoHandleManualFrontTurnBack()) {
|
||||||
|
// 人工站前折返
|
||||||
|
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (nextTripPlan != null) { // 站前折返,更新计划
|
||||||
|
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertEquals(
|
||||||
|
nextTripPlan.getFirstStationPlan().getSection(), parkSection,
|
||||||
|
String.format("下一车次计划[%s]第一站台轨和停靠站台轨不相同:[%s]",
|
||||||
|
nextTripPlan.getStNumber(), parkSection.getName()));
|
||||||
|
this.updateNextPlan(simulation, trainInfo, nextTripPlan,
|
||||||
|
nextTripPlan.getFirstStationPlan());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!CollectionUtils.isEmpty(standList)) {
|
||||||
|
Stand stand = standList.get(0);
|
||||||
|
switch (stand.getTypeStrategy()) {
|
||||||
|
case NONE:
|
||||||
|
return;
|
||||||
|
case AUTO:
|
||||||
|
if (stationPlan != null && tripPlan.isLastPlan(stationPlan)) { // 当前计划终点站
|
||||||
|
if (Objects.equals(stand.isRight(), trainInfo.getRight())) {
|
||||||
|
onboardAtpApiService.startTurnBack(simulation, trainInfo.getGroupNumber(),
|
||||||
|
parkSection.getCode());
|
||||||
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
} else if (stationPlan == null && tripPlan.isLastPlanStation(parkSection.getStation())) {
|
if (nextTripPlan != null) { // 站前折返,更新计划
|
||||||
if (config.isAtsAutoHandleManualFrontTurnBack()) {
|
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
||||||
// 人工站前折返
|
this.updateNextPlan(simulation, trainInfo, nextTripPlan,
|
||||||
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
nextTripPlan.getSecondStationPlan());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (stationPlan != null && tripPlan.isLastPlan(stationPlan)
|
||||||
|
&& tripPlan.isFrontTurnBack()) { // 到达终点站了,判断站前折返还是站后折返
|
||||||
|
// 站前折返,查询下一车次计划
|
||||||
|
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
|
} else if (stationPlan == null && tripPlan.isLastPlanStation(
|
||||||
|
parkSection.getStation())) {
|
||||||
|
if (config.isAtsAutoHandleManualFrontTurnBack()) {
|
||||||
|
// 人工站前折返
|
||||||
|
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nextTripPlan != null) { // 站前折返,更新计划
|
if (nextTripPlan != null) { // 站前折返,更新计划
|
||||||
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
||||||
BusinessExceptionAssertEnum.DATA_ERROR.assertEquals(nextTripPlan.getFirstStationPlan().getSection(), parkSection,
|
BusinessExceptionAssertEnum.DATA_ERROR.assertEquals(
|
||||||
String.format("下一车次计划[%s]第一站台轨和停靠站台轨不相同:[%s]", nextTripPlan.getStNumber(), parkSection.getName()));
|
nextTripPlan.getFirstStationPlan().getSection(), parkSection,
|
||||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getFirstStationPlan());
|
String.format("下一车次计划[%s]第一站台轨和停靠站台轨不相同:[%s]",
|
||||||
}
|
nextTripPlan.getStNumber(), parkSection.getName()));
|
||||||
} else {
|
this.updateNextPlan(simulation, trainInfo, nextTripPlan,
|
||||||
if (!CollectionUtils.isEmpty(standList)) {
|
nextTripPlan.getFirstStationPlan());
|
||||||
Stand stand = standList.get(0);
|
|
||||||
switch (stand.getTypeStrategy()) {
|
|
||||||
case NONE:
|
|
||||||
return;
|
|
||||||
case AUTO:
|
|
||||||
if (stationPlan != null && tripPlan.isLastPlan(stationPlan)) { // 当前计划终点站
|
|
||||||
if (Objects.equals(stand.isRight(), trainInfo.getRight())) {
|
|
||||||
onboardAtpApiService.startTurnBack(simulation, trainInfo.getGroupNumber(), parkSection.getCode());
|
|
||||||
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
|
||||||
if (nextTripPlan != null) { // 站前折返,更新计划
|
|
||||||
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
|
||||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getSecondStationPlan());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (stationPlan != null && tripPlan.isLastPlan(stationPlan) && tripPlan.isFrontTurnBack()) { // 到达终点站了,判断站前折返还是站后折返
|
|
||||||
// 站前折返,查询下一车次计划
|
|
||||||
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
|
||||||
} else if (stationPlan == null && tripPlan.isLastPlanStation(parkSection.getStation())) {
|
|
||||||
if (config.isAtsAutoHandleManualFrontTurnBack()) {
|
|
||||||
// 人工站前折返
|
|
||||||
nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (nextTripPlan != null) { // 站前折返,更新计划
|
|
||||||
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
|
||||||
BusinessExceptionAssertEnum.DATA_ERROR.assertEquals(nextTripPlan.getFirstStationPlan().getSection(), parkSection,
|
|
||||||
String.format("下一车次计划[%s]第一站台轨和停靠站台轨不相同:[%s]", nextTripPlan.getStNumber(), parkSection.getName()));
|
|
||||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getFirstStationPlan());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
public void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo,
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
Section parkSection) {
|
||||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
StationPlan stationPlan = tripPlan.queryStationPlan(parkSection);
|
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(),
|
||||||
if (stationPlan == null) {
|
trainInfo.getTripNumber());
|
||||||
// 非计划中的停靠站台轨,暂不处理
|
StationPlan stationPlan = tripPlan.queryStationPlan(parkSection);
|
||||||
return;
|
if (stationPlan == null) {
|
||||||
} else {
|
// 非计划中的停靠站台轨,暂不处理
|
||||||
// 计划站台轨停车
|
return;
|
||||||
if (trainInfo.isTurnBack()) {//准备折返
|
} else {
|
||||||
return;
|
// 计划站台轨停车
|
||||||
}
|
if (trainInfo.isTurnBack()) {//准备折返
|
||||||
if (!parkSection.isSamePhysical(trainInfo.getPlanStandTrack())) {
|
return;
|
||||||
// 已经更新过计划
|
}
|
||||||
return;
|
if (!parkSection.isSamePhysical(trainInfo.getPlanStandTrack())) {
|
||||||
}
|
// 已经更新过计划
|
||||||
if (tripPlan.isLastPlan(stationPlan)) {
|
return;
|
||||||
if (tripPlan.isBackup() && parkSection.equals(tripPlan.getEndSection())) {
|
}
|
||||||
return;
|
if (tripPlan.isLastPlan(stationPlan)) {
|
||||||
}
|
if (tripPlan.isBackup() && parkSection.equals(tripPlan.getEndSection())) {
|
||||||
// 到达终点站,准备折返
|
return;
|
||||||
log.debug(String.format("列车[%s]折返初始化", trainInfo.getGroupNumber()));
|
|
||||||
List<RoutePath> routePaths = repository.getRoutePaths(parkSection, tripPlan.getEndSection());
|
|
||||||
Signal signal = parkSection.getSignalOf(routePaths.get(0).isRight());
|
|
||||||
if (signal.isMainAspect() || signal.isGuideAspect()) {
|
|
||||||
Route lockedRoute = signal.getLockedRoute();
|
|
||||||
if (lockedRoute != null && lockedRoute.getLastRouteSection().isTurnBackTrack()) {
|
|
||||||
trainInfo.turnBackInit(lockedRoute.getLastRouteSection());
|
|
||||||
this.onboardAtpApiService.startTurnBack(simulation, trainInfo.getGroupNumber(),
|
|
||||||
lockedRoute.getLastRouteSection().getCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
StationPlan nextStationPlan = tripPlan.queryNextStationPlan(parkSection);
|
|
||||||
this.updateNextPlan(simulation, trainInfo, tripPlan, nextStationPlan);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// 到达终点站,准备折返
|
||||||
|
log.debug(String.format("列车[%s]折返初始化", trainInfo.getGroupNumber()));
|
||||||
|
List<RoutePath> routePaths = repository.getRoutePaths(parkSection,
|
||||||
|
tripPlan.getEndSection());
|
||||||
|
Signal signal = parkSection.getSignalOf(routePaths.get(0).isRight());
|
||||||
|
if (signal.isMainAspect() || signal.isGuideAspect()) {
|
||||||
|
Route lockedRoute = signal.getLockedRoute();
|
||||||
|
if (lockedRoute != null && lockedRoute.getLastRouteSection().isTurnBackTrack()) {
|
||||||
|
trainInfo.turnBackInit(lockedRoute.getLastRouteSection());
|
||||||
|
this.onboardAtpApiService.startTurnBack(simulation, trainInfo.getGroupNumber(),
|
||||||
|
lockedRoute.getLastRouteSection().getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
StationPlan nextStationPlan = tripPlan.queryNextStationPlan(parkSection);
|
||||||
|
this.updateNextPlan(simulation, trainInfo, tripPlan, nextStationPlan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void updateTripPlan(Simulation simulation, TrainInfo trainInfo, TripPlan nextTripPlan) {
|
void updateTripPlan(Simulation simulation, TrainInfo trainInfo, TripPlan nextTripPlan) {
|
||||||
trainInfo.applyNewTripPlan(nextTripPlan);
|
trainInfo.applyNewTripPlan(nextTripPlan);
|
||||||
this.onboardAtpApiService.updateTripPlan(simulation, trainInfo.getGroupNumber(), nextTripPlan);
|
this.onboardAtpApiService.updateTripPlan(simulation, trainInfo.getGroupNumber(), nextTripPlan);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateNextPlan(Simulation simulation, TrainInfo trainInfo, TripPlan tripPlan,
|
||||||
|
StationPlan nextStationPlan) {
|
||||||
|
if (nextStationPlan == null) {
|
||||||
|
log.warn(String.format("列车[%s]下一计划到站为null", trainInfo.debugStr()));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
trainInfo.updatePlanInfo(nextStationPlan);
|
||||||
public void updateNextPlan(Simulation simulation, TrainInfo trainInfo, TripPlan tripPlan, StationPlan nextStationPlan) {
|
Section nextPlanSection = nextStationPlan.getSection();
|
||||||
if (nextStationPlan == null) {
|
trainInfo.updateEstimatedArriveInfo(nextPlanSection, nextStationPlan.getArriveTime());
|
||||||
log.warn(String.format("列车[%s]下一计划到站为null", trainInfo.debugStr()));
|
int runTime = this.calculateRunTime(simulation, trainInfo, tripPlan, nextStationPlan);
|
||||||
return;
|
boolean park = nextStationPlan.isPark();
|
||||||
}
|
if (tripPlan.isLastPlan(nextStationPlan)) {
|
||||||
trainInfo.updatePlanInfo(nextStationPlan);
|
park = true;
|
||||||
Section nextPlanSection = nextStationPlan.getSection();
|
|
||||||
trainInfo.updateEstimatedArriveInfo(nextPlanSection, nextStationPlan.getArriveTime());
|
|
||||||
int runTime = this.calculateRunTime(simulation, trainInfo, tripPlan, nextStationPlan);
|
|
||||||
boolean park = nextStationPlan.isPark();
|
|
||||||
if (tripPlan.isLastPlan(nextStationPlan)) {
|
|
||||||
park = true;
|
|
||||||
}
|
|
||||||
boolean jump = this.atsStandService.isJump(nextPlanSection, trainInfo.getGroupNumber());
|
|
||||||
if (tripPlan.isLastPlan(nextStationPlan) && jump) {
|
|
||||||
jump = false;
|
|
||||||
}
|
|
||||||
this.onboardAtpApiService.updateNextArriveInfo(simulation, trainInfo.getGroupNumber(),
|
|
||||||
nextPlanSection, park, runTime, jump);
|
|
||||||
}
|
}
|
||||||
|
boolean jump = this.atsStandService.isJump(nextPlanSection, trainInfo.getGroupNumber());
|
||||||
private int calculateRunTime(Simulation simulation, TrainInfo trainInfo,
|
if (tripPlan.isLastPlan(nextStationPlan) && jump) {
|
||||||
TripPlan tripPlan, StationPlan nextStationPlan) {
|
jump = false;
|
||||||
MapConfig config = simulation.getRepository().getConfig();
|
|
||||||
LocalDateTime systemTime = simulation.getSystemTime();
|
|
||||||
Section start;
|
|
||||||
Section end = nextStationPlan.getSection();
|
|
||||||
LocalTime startTime;
|
|
||||||
LocalTime endTime = nextStationPlan.getArriveTime();
|
|
||||||
List<StationPlan> planList = tripPlan.getPlanList();
|
|
||||||
boolean turnBack = true;
|
|
||||||
boolean outbound = false;
|
|
||||||
startTime = tripPlan.getStartTime();
|
|
||||||
start = tripPlan.getStartSection();
|
|
||||||
for (StationPlan stationPlan : planList) {
|
|
||||||
if (stationPlan.equals(nextStationPlan)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
turnBack = false;
|
|
||||||
if (stationPlan.getSection().isTransferTrack()) {
|
|
||||||
outbound = true;
|
|
||||||
} else {
|
|
||||||
outbound = false;
|
|
||||||
}
|
|
||||||
startTime = stationPlan.getLeaveTime();
|
|
||||||
start = stationPlan.getSection();
|
|
||||||
}
|
|
||||||
int planRunTime = (int) ChronoUnit.SECONDS.between(startTime, endTime);
|
|
||||||
int adjustRunTime = planRunTime;
|
|
||||||
if (!turnBack && !outbound && config.isAdjustOperationAutomatically() && trainInfo.isAtsAutoAdjust()) {
|
|
||||||
startTime = systemTime.toLocalTime();
|
|
||||||
adjustRunTime = (int) ChronoUnit.SECONDS.between(startTime, endTime);
|
|
||||||
}
|
|
||||||
int runTime = Math.min(adjustRunTime, planRunTime + 30);
|
|
||||||
if (runTime <= 0) {
|
|
||||||
runTime = 1;
|
|
||||||
}
|
|
||||||
log.debug(String.format("列车[%s]站间[%s->%s]运行时间为:[%s]", trainInfo.getGroupNumber(),
|
|
||||||
start.debugStr(), end.debugStr(), runTime));
|
|
||||||
return runTime;
|
|
||||||
}
|
}
|
||||||
|
this.onboardAtpApiService.updateNextArriveInfo(simulation, trainInfo.getGroupNumber(),
|
||||||
|
nextPlanSection, park, runTime, jump);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
private int calculateRunTime(Simulation simulation, TrainInfo trainInfo,
|
||||||
public void handleTurnBackTrackParking(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
TripPlan tripPlan, StationPlan nextStationPlan) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
MapConfig config = simulation.getRepository().getConfig();
|
||||||
LocalDateTime systemTime = simulation.getSystemTime();
|
LocalDateTime systemTime = simulation.getSystemTime();
|
||||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
Section start;
|
||||||
if (tripPlan.getEndSection().equals(parkSection)
|
Section end = nextStationPlan.getSection();
|
||||||
/*|| tripPlan.getEndSection().getStation().equals(parkSection.getStation())*/) {
|
LocalTime startTime;
|
||||||
// 计划终端折返轨或和计划终端折返轨同站的折返轨,根据车次类型处理
|
LocalTime endTime = nextStationPlan.getArriveTime();
|
||||||
TripPlan nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
List<StationPlan> planList = tripPlan.getPlanList();
|
||||||
if (nextTripPlan == null) {
|
boolean turnBack = true;
|
||||||
return;
|
boolean outbound = false;
|
||||||
}
|
startTime = tripPlan.getStartTime();
|
||||||
if (tripPlan.isBackup()) {
|
start = tripPlan.getStartSection();
|
||||||
// 备用车
|
for (StationPlan stationPlan : planList) {
|
||||||
if (systemTime.toLocalTime().plusMinutes(5).isAfter(nextTripPlan.getStartTime())) {
|
if (stationPlan.equals(nextStationPlan)) {
|
||||||
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
break;
|
||||||
BusinessExceptionAssertEnum.DATA_ERROR.assertNotEquals(parkSection, nextTripPlan.getFirstStationPlan().getSection());
|
}
|
||||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getFirstStationPlan());
|
turnBack = false;
|
||||||
return;
|
if (stationPlan.getSection().isTransferTrack()) {
|
||||||
}
|
outbound = true;
|
||||||
} else if (tripPlan.isTurnBack()) {
|
} else {
|
||||||
// 折返计划
|
outbound = false;
|
||||||
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
}
|
||||||
BusinessExceptionAssertEnum.DATA_ERROR.assertNotEquals(parkSection, nextTripPlan.getFirstStationPlan().getSection());
|
startTime = stationPlan.getLeaveTime();
|
||||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getFirstStationPlan());
|
start = stationPlan.getSection();
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 非终端折返轨,更新列车下一计划到达
|
|
||||||
if (trainInfo.getPlanStandTrack() != null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 查询停靠区段能到达的相邻的站台轨,取计划中包含的,再进行筛选,选出下一车站计划
|
|
||||||
List<RoutePath> routePathList = repository.queryRoutePathsByStart(parkSection);
|
|
||||||
List<StationPlan> sameDirectionList = new ArrayList<>();
|
|
||||||
List<StationPlan> reverseDirectionList = new ArrayList<>();
|
|
||||||
for (RoutePath routePath : routePathList) {
|
|
||||||
StationPlan stationPlan = tripPlan.queryStationPlan(routePath.getEnd());
|
|
||||||
if (stationPlan != null) {
|
|
||||||
if (routePath.isRight() == tripPlan.isRight()) {
|
|
||||||
sameDirectionList.add(stationPlan);
|
|
||||||
} else {
|
|
||||||
reverseDirectionList.add(stationPlan);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
StationPlan stationPlan = null;
|
|
||||||
if (sameDirectionList.size() > 0) {
|
|
||||||
stationPlan = sameDirectionList.get(0);
|
|
||||||
} else if (reverseDirectionList.size() > 0) {
|
|
||||||
stationPlan = reverseDirectionList.get(0);
|
|
||||||
}
|
|
||||||
if (stationPlan != null) {
|
|
||||||
this.updateNextPlan(simulation, trainInfo, tripPlan, stationPlan);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
int planRunTime = (int) ChronoUnit.SECONDS.between(startTime, endTime);
|
||||||
|
int adjustRunTime = planRunTime;
|
||||||
|
if (!turnBack && !outbound && config.isAdjustOperationAutomatically()
|
||||||
|
&& trainInfo.isAtsAutoAdjust()) {
|
||||||
|
startTime = systemTime.toLocalTime();
|
||||||
|
adjustRunTime = (int) ChronoUnit.SECONDS.between(startTime, endTime);
|
||||||
|
}
|
||||||
|
int runTime = Math.min(adjustRunTime, planRunTime + 30);
|
||||||
|
if (runTime <= 0) {
|
||||||
|
runTime = 1;
|
||||||
|
}
|
||||||
|
log.debug(String.format("列车[%s]站间[%s->%s]运行时间为:[%s]", trainInfo.getGroupNumber(),
|
||||||
|
start.debugStr(), end.debugStr(), runTime));
|
||||||
|
return runTime;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlePassStand(Simulation simulation, TrainInfo trainInfo) {
|
public void handleTurnBackTrackParking(Simulation simulation, TrainInfo trainInfo,
|
||||||
String planStandTrack = trainInfo.getPlanStandTrack();
|
Section parkSection) {
|
||||||
if (planStandTrack == null) {
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
return;
|
LocalDateTime systemTime = simulation.getSystemTime();
|
||||||
|
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(),
|
||||||
|
trainInfo.getTripNumber());
|
||||||
|
|
||||||
|
// 车次计划中的车站计划全部完成,并且当前折返轨与计划折返轨属于同一站,则认为车次计划完成
|
||||||
|
boolean completed = tripPlan.getPlanList().stream().allMatch(StationPlan::isFinished)
|
||||||
|
&& tripPlan.getEndSection().getStation().equals(parkSection.getStation());
|
||||||
|
if (completed) {
|
||||||
|
// 计划终端折返轨或和计划终端折返轨同站的折返轨,根据车次类型处理
|
||||||
|
TripPlan nextTripPlan = repository.queryNextTripPlanOf(tripPlan);
|
||||||
|
if (nextTripPlan == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (tripPlan.isBackup()) {
|
||||||
|
// 备用车
|
||||||
|
if (systemTime.toLocalTime().plusMinutes(5).isAfter(nextTripPlan.getStartTime())) {
|
||||||
|
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertNotEquals(parkSection,
|
||||||
|
nextTripPlan.getFirstStationPlan().getSection());
|
||||||
|
this.updateNextPlan(simulation, trainInfo, nextTripPlan,
|
||||||
|
nextTripPlan.getFirstStationPlan());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
} else if (tripPlan.isTurnBack()) {
|
||||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
// 折返计划
|
||||||
StationPlan stationPlan = tripPlan.queryStationPlan(planStandTrack);
|
this.updateTripPlan(simulation, trainInfo, nextTripPlan);
|
||||||
Section section = repository.getByCode(planStandTrack, Section.class);
|
BusinessExceptionAssertEnum.DATA_ERROR.assertNotEquals(parkSection,
|
||||||
//更新离站信息
|
nextTripPlan.getFirstStationPlan().getSection());
|
||||||
trainInfo.updateLeaveInfo(section, simulation.getSystemTime().toLocalTime());
|
this.updateNextPlan(simulation, trainInfo, nextTripPlan,
|
||||||
//更新后续计划到站
|
nextTripPlan.getFirstStationPlan());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 非终端折返轨,更新列车下一计划到达
|
||||||
|
if (trainInfo.getPlanStandTrack() != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 查询停靠区段能到达的相邻的站台轨,取计划中包含的,再进行筛选,选出下一车站计划
|
||||||
|
List<RoutePath> routePathList = repository.queryRoutePathsByStart(parkSection);
|
||||||
|
List<StationPlan> sameDirectionList = new ArrayList<>();
|
||||||
|
List<StationPlan> reverseDirectionList = new ArrayList<>();
|
||||||
|
for (RoutePath routePath : routePathList) {
|
||||||
|
StationPlan stationPlan = tripPlan.queryStationPlan(routePath.getEnd());
|
||||||
if (stationPlan != null) {
|
if (stationPlan != null) {
|
||||||
stationPlan.finish();
|
if (routePath.isRight() == tripPlan.isRight()) {
|
||||||
this.realRunRecordService.recordTrainRealRun(simulation, trainInfo, stationPlan.getStation(),
|
sameDirectionList.add(stationPlan);
|
||||||
stationPlan.getSection(), false);
|
} else {
|
||||||
StationPlan nextPlan = tripPlan.queryNextStationPlan(stationPlan.getStation());
|
reverseDirectionList.add(stationPlan);
|
||||||
this.updateNextPlan(simulation, trainInfo, tripPlan, nextPlan);
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
StationPlan stationPlan = null;
|
||||||
|
if (sameDirectionList.size() > 0) {
|
||||||
|
stationPlan = sameDirectionList.get(0);
|
||||||
|
} else if (reverseDirectionList.size() > 0) {
|
||||||
|
stationPlan = reverseDirectionList.get(0);
|
||||||
|
}
|
||||||
|
if (stationPlan != null) {
|
||||||
|
this.updateNextPlan(simulation, trainInfo, tripPlan, stationPlan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handlePassStand(Simulation simulation, TrainInfo trainInfo) {
|
||||||
|
String planStandTrack = trainInfo.getPlanStandTrack();
|
||||||
|
if (planStandTrack == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
|
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(),
|
||||||
|
trainInfo.getTripNumber());
|
||||||
|
StationPlan stationPlan = tripPlan.queryStationPlan(planStandTrack);
|
||||||
|
Section section = repository.getByCode(planStandTrack, Section.class);
|
||||||
|
//更新离站信息
|
||||||
|
trainInfo.updateLeaveInfo(section, simulation.getSystemTime().toLocalTime());
|
||||||
|
//更新后续计划到站
|
||||||
|
if (stationPlan != null) {
|
||||||
|
stationPlan.finish();
|
||||||
|
this.realRunRecordService.recordTrainRealRun(simulation, trainInfo, stationPlan.getStation(),
|
||||||
|
stationPlan.getSection(), false);
|
||||||
|
StationPlan nextPlan = tripPlan.queryNextStationPlan(stationPlan.getStation());
|
||||||
|
this.updateNextPlan(simulation, trainInfo, tripPlan, nextPlan);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,11 +246,11 @@ public class CiApiServiceImpl2 implements CiApiService {
|
||||||
@Override
|
@Override
|
||||||
public void humanCancel(Simulation simulation, String routeCode) {
|
public void humanCancel(Simulation simulation, String routeCode) {
|
||||||
Route route = simulation.getRepository().getByCode(routeCode, Route.class);
|
Route route = simulation.getRepository().getByCode(routeCode, Route.class);
|
||||||
// if (simulation.getRepository().getConfig().isRailway()) {
|
if (route.getStart().isGuideAspect()) { // 根据成都三引导解锁逻辑修改
|
||||||
// BusinessExceptionAssertEnum.OPERATION_FAIL.assertTrue(route.isApproachLock(),
|
signalService.closeRoute(simulation, route.getStart());
|
||||||
// "进路未接近锁闭,不能人解");
|
} else {
|
||||||
// }
|
this.routeService.delayUnlockStart(simulation, route, route.getStart());
|
||||||
this.routeService.delayUnlockStart(simulation, route, route.getStart());
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -504,6 +504,10 @@ public class CiApiServiceImpl2 implements CiApiService {
|
||||||
signal.guideDelayStart();
|
signal.guideDelayStart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (repository.getConfig().isGuideDelayCloseWhenFirstSectionOccupied()
|
||||||
|
&& signal.isGuideAspect()) {
|
||||||
|
signal.guideDelayStart();
|
||||||
|
}
|
||||||
// if (signal.getGuideRemain() > 0) {
|
// if (signal.getGuideRemain() > 0) {
|
||||||
// signal.setGuideRemain(0);
|
// signal.setGuideRemain(0);
|
||||||
// } else {
|
// } else {
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
package club.joylink.rtss.simulation.cbtc.data.map;
|
package club.joylink.rtss.simulation.cbtc.data.map;
|
||||||
|
|
||||||
|
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.DISPATCHER;
|
||||||
|
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.ELECTRIC_DISPATCHER;
|
||||||
|
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.MAINTAINER;
|
||||||
|
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.STATION_SUPERVISOR;
|
||||||
|
|
||||||
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
|
import club.joylink.rtss.simulation.cbtc.constant.RunLevel;
|
||||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||||
import club.joylink.rtss.vo.map.MapFunctionConfig;
|
import club.joylink.rtss.vo.map.MapFunctionConfig;
|
||||||
import club.joylink.rtss.vo.map.RealLineConfigVO;
|
import club.joylink.rtss.vo.map.RealLineConfigVO;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
import lombok.Getter;
|
||||||
import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.*;
|
import lombok.Setter;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地图配置
|
* 地图配置
|
||||||
|
@ -23,379 +25,420 @@ import static club.joylink.rtss.simulation.cbtc.member.SimulationMember.Type.*;
|
||||||
@Setter
|
@Setter
|
||||||
public class MapConfig {
|
public class MapConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上行方向是否向右
|
* 上行方向是否向右
|
||||||
*/
|
*/
|
||||||
private boolean upRight;
|
private boolean upRight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信号封锁下进路是否可以办理
|
* 信号封锁下进路是否可以办理
|
||||||
*/
|
*/
|
||||||
private boolean signalBlockRouteSettable;
|
private boolean signalBlockRouteSettable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)
|
* 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)
|
||||||
*/
|
*/
|
||||||
private boolean lockFirst;
|
private boolean lockFirst;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路办理不失败一直尝试办理
|
* 进路办理不失败一直尝试办理
|
||||||
*/
|
*/
|
||||||
private boolean routeSettingNoFail;
|
private boolean routeSettingNoFail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列车停站开门后,才办理出站进路开放出站信号机
|
* 列车停站开门后,才办理出站进路开放出站信号机
|
||||||
*/
|
*/
|
||||||
private boolean signalOpenAfterParking;
|
private boolean signalOpenAfterParking;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站台扣车是否关闭逻辑点灯的信号机
|
* 站台扣车是否关闭逻辑点灯的信号机
|
||||||
*/
|
*/
|
||||||
private boolean standHoldCloseLogicLight;
|
private boolean standHoldCloseLogicLight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ATS是否自动处理人工设置的站前折返自动更新车次
|
* ATS是否自动处理人工设置的站前折返自动更新车次
|
||||||
*/
|
*/
|
||||||
private boolean atsAutoHandleManualFrontTurnBack;
|
private boolean atsAutoHandleManualFrontTurnBack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CTC列车进路延续保护仅折返站处锁闭
|
* CTC列车进路延续保护仅折返站处锁闭
|
||||||
*/
|
*/
|
||||||
private boolean ctcOverlapOnlyTurnBackStationLock;
|
private boolean ctcOverlapOnlyTurnBackStationLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 引导办理是否需要先排列进路
|
* 引导办理是否需要先排列进路
|
||||||
*/
|
*/
|
||||||
private boolean guideNeedRouteSettingFirst;
|
private boolean guideNeedRouteSettingFirst;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路是否分为ATP信号、地面信号、引导信号
|
* 进路是否分为ATP信号、地面信号、引导信号
|
||||||
*/
|
*/
|
||||||
private boolean routeLikeHa1;
|
private boolean routeLikeHa1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔区段是否单独占用(对于两个相连的道岔情况)
|
* 道岔区段是否单独占用(对于两个相连的道岔情况)
|
||||||
*/
|
*/
|
||||||
private boolean switchSingleHandle;
|
private boolean switchSingleHandle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路延续保护设置通过触发设置
|
* 进路延续保护设置通过触发设置
|
||||||
*/
|
*/
|
||||||
private boolean overlapSettingByTrigger;
|
private boolean overlapSettingByTrigger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔正/反操是否联动
|
* 道岔正/反操是否联动
|
||||||
*/
|
*/
|
||||||
private boolean switchNRTurnChain;
|
private boolean switchNRTurnChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔单解/锁是否联动
|
* 道岔单解/锁是否联动
|
||||||
*/
|
*/
|
||||||
private boolean switchSingleLockChain;
|
private boolean switchSingleLockChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔失表联动
|
* 道岔失表联动
|
||||||
*/
|
*/
|
||||||
private boolean switchLossChain;
|
private boolean switchLossChain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消进路命令能否取消引导或接近锁闭的进路
|
* 取消进路命令能否取消引导或接近锁闭的进路
|
||||||
*/
|
*/
|
||||||
private ApproachLockCancel singleApproachLockCancelRoute;
|
private ApproachLockCancel singleApproachLockCancelRoute;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列车控制模式/级别
|
* 列车控制模式/级别
|
||||||
*/
|
*/
|
||||||
private RunLevel runMode;
|
private RunLevel runMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始加载设备时是否默认单锁正线道岔
|
* 初始加载设备时是否默认单锁正线道岔
|
||||||
*/
|
*/
|
||||||
private boolean initSingleLockSwitch;
|
private boolean initSingleLockSwitch;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不停站头码车服务号列表:010-999
|
* 不停站头码车服务号列表:010-999
|
||||||
*/
|
*/
|
||||||
private String noParkingSM = "";
|
private String noParkingSM = "";
|
||||||
/**
|
/**
|
||||||
* 停站头码车服务号列表:010-999
|
* 停站头码车服务号列表:010-999
|
||||||
*/
|
*/
|
||||||
private String parkingSM = "";
|
private String parkingSM = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RM模式下ATP防护速度(单位m/s)
|
* RM模式下ATP防护速度(单位m/s)
|
||||||
*/
|
*/
|
||||||
private float rmAtpSpeed;
|
private float rmAtpSpeed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URM下ATP防护速度(单位m/s)
|
* URM下ATP防护速度(单位m/s)
|
||||||
*/
|
*/
|
||||||
private float urmAtpSpeed;
|
private float urmAtpSpeed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关
|
* 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关
|
||||||
*/
|
*/
|
||||||
private boolean cancelAtsControlOfAllRoutesWhenCancelRoute;
|
private boolean cancelAtsControlOfAllRoutesWhenCancelRoute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在设置自排开或自动触发之前,信号机需处于人工控状态
|
* 在设置自排开或自动触发之前,信号机需处于人工控状态
|
||||||
*/
|
*/
|
||||||
private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger;
|
private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣车时是否允许提前发车
|
* 扣车时是否允许提前发车
|
||||||
*/
|
*/
|
||||||
private boolean allowEarlyDepartureWhenHoldTrain;
|
private boolean allowEarlyDepartureWhenHoldTrain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消进路时列车紧急制动
|
* 取消进路时列车紧急制动
|
||||||
*/
|
*/
|
||||||
private boolean EBWhenCancelRoute;
|
private boolean EBWhenCancelRoute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ATS自动调整运行
|
* ATS自动调整运行
|
||||||
*/
|
*/
|
||||||
private boolean adjustOperationAutomatically;
|
private boolean adjustOperationAutomatically;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在办理车队进路前是否要先排列进路
|
* 在办理车队进路前是否要先排列进路
|
||||||
*/
|
*/
|
||||||
private boolean setRouteBeforeSetFlt;
|
private boolean setRouteBeforeSetFlt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在取消车队进路时同时取消进路
|
* 在取消车队进路时同时取消进路
|
||||||
*/
|
*/
|
||||||
private boolean cancelRouteWhenCancelFlt;
|
private boolean cancelRouteWhenCancelFlt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 办理引导前需要信号机接近锁闭
|
* 办理引导前需要信号机接近锁闭
|
||||||
*/
|
*/
|
||||||
private boolean needApproachLockBeforeSetGuide;
|
private boolean needApproachLockBeforeSetGuide;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封锁命令(状态)仅在后备模式下有效
|
* 封锁命令(状态)仅在后备模式下有效
|
||||||
*/
|
*/
|
||||||
private boolean blockadeCommandOnlyValidInStandbyMode;
|
private boolean blockadeCommandOnlyValidInStandbyMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计轴预复位前需要车站预复位
|
* 计轴预复位前需要车站预复位
|
||||||
*/
|
*/
|
||||||
private boolean stationPreResetBeforeAxlePreReset;
|
private boolean stationPreResetBeforeAxlePreReset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔转动操作可以使失表故障恢复
|
* 道岔转动操作可以使失表故障恢复
|
||||||
*/
|
*/
|
||||||
private boolean switchTurnOperationCanRecoverSplitFault;
|
private boolean switchTurnOperationCanRecoverSplitFault;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣车命令不区分控制模式
|
* 扣车命令不区分控制模式
|
||||||
*/
|
*/
|
||||||
private boolean holdCommandIgnoreControlMode;
|
private boolean holdCommandIgnoreControlMode;
|
||||||
|
|
||||||
/** 共享紧急关闭效果的车站 */
|
/**
|
||||||
private Set<String> sharingECStations;
|
* 共享紧急关闭效果的车站
|
||||||
|
*/
|
||||||
|
private Set<String> sharingECStations;
|
||||||
|
|
||||||
/** 取消联锁条件不满足的进路时需要延时解锁 */
|
/**
|
||||||
private boolean delayWhenCancelRouteWithAbnormalInterlock;
|
* 取消联锁条件不满足的进路时需要延时解锁
|
||||||
|
*/
|
||||||
|
private boolean delayWhenCancelRouteWithAbnormalInterlock;
|
||||||
|
|
||||||
/** 车次号的位数 */
|
/**
|
||||||
private int figuresOfTripNumber;
|
* 车次号的位数
|
||||||
|
*/
|
||||||
|
private int figuresOfTripNumber;
|
||||||
|
|
||||||
/** 服务号的位数 */
|
/**
|
||||||
private int figuresOfServiceNumber;
|
* 服务号的位数
|
||||||
|
*/
|
||||||
|
private int figuresOfServiceNumber;
|
||||||
|
|
||||||
/** 设置头码车时检查方向 */
|
/**
|
||||||
private boolean checkDirectionWhenSetHead;
|
* 设置头码车时检查方向
|
||||||
|
*/
|
||||||
|
private boolean checkDirectionWhenSetHead;
|
||||||
|
|
||||||
/** 转换轨进路只能通过故障解锁来取消 */
|
/**
|
||||||
private boolean transferRouteCanOnlyFaultUnlock;
|
* 转换轨进路只能通过故障解锁来取消
|
||||||
|
*/
|
||||||
|
private boolean transferRouteCanOnlyFaultUnlock;
|
||||||
|
|
||||||
/** 头码车抵达目的地后变为人工车 */
|
/**
|
||||||
private boolean setManualWhenHeadTrainArriveTarget;
|
* 头码车抵达目的地后变为人工车
|
||||||
|
*/
|
||||||
|
private boolean setManualWhenHeadTrainArriveTarget;
|
||||||
|
|
||||||
/** 进路默认开启冲突检测 */
|
/**
|
||||||
private boolean routeDefaultCheckConflict;
|
* 进路默认开启冲突检测
|
||||||
|
*/
|
||||||
|
private boolean routeDefaultCheckConflict;
|
||||||
|
|
||||||
/** 处理停车场/车辆段逻辑 */
|
/**
|
||||||
private boolean handleDepot;
|
* 处理停车场/车辆段逻辑
|
||||||
|
*/
|
||||||
|
private boolean handleDepot;
|
||||||
|
|
||||||
/** 运行图中车次号是否唯一 */
|
/**
|
||||||
private boolean tripNumberIsUnique;
|
* 运行图中车次号是否唯一
|
||||||
|
*/
|
||||||
|
private boolean tripNumberIsUnique;
|
||||||
|
|
||||||
/** 站台折返策略不生效 */
|
/**
|
||||||
private boolean standTbStrategyIsInvalid;
|
* 站台折返策略不生效
|
||||||
|
*/
|
||||||
|
private boolean standTbStrategyIsInvalid;
|
||||||
|
|
||||||
/** 根据服务号更新车次计划(西安三提出,抽线之后,后续列车还跑原来的服务,不会自动顶上) */
|
/**
|
||||||
private boolean updateTripPlanByServiceNumber;
|
* 根据服务号更新车次计划(西安三提出,抽线之后,后续列车还跑原来的服务,不会自动顶上)
|
||||||
|
*/
|
||||||
|
private boolean updateTripPlanByServiceNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大铁线路
|
* 大铁线路
|
||||||
*/
|
*/
|
||||||
private boolean railway;
|
private boolean railway;
|
||||||
/**
|
/**
|
||||||
* 对信号机封锁操作,是否影响信号显示
|
* 对信号机封锁操作,是否影响信号显示
|
||||||
* <p>
|
* <p>
|
||||||
* true-封锁信号机,会使信号机显示禁止色<br>
|
* true-封锁信号机,会使信号机显示禁止色<br> false-封锁信号机,不会影响信号机显示。
|
||||||
* false-封锁信号机,不会影响信号机显示。
|
*/
|
||||||
*/
|
private boolean signalBolckOptReflectSignal;
|
||||||
private boolean signalBolckOptReflectSignal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区故解只能应用于故障锁闭区段
|
* 区故解只能应用于故障锁闭区段
|
||||||
*/
|
*/
|
||||||
private boolean SFUCanOnlyApplyForFaultLockSection;
|
private boolean SFUCanOnlyApplyForFaultLockSection;
|
||||||
|
|
||||||
private boolean hasCTC;
|
private boolean hasCTC;
|
||||||
|
|
||||||
private boolean hasTDCS;
|
private boolean hasTDCS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔失表/挤岔时可以办理进路(由远及近锁闭,到失表/挤岔处终止,并且可以开放引导信号)
|
* 道岔失表/挤岔时可以办理进路(由远及近锁闭,到失表/挤岔处终止,并且可以开放引导信号)
|
||||||
*/
|
*/
|
||||||
private boolean routeCanSetWhenSwitchFault;
|
private boolean routeCanSetWhenSwitchFault;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态
|
* 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态
|
||||||
*/
|
*/
|
||||||
private boolean manualTrainDefaultStop;
|
private boolean manualTrainDefaultStop;
|
||||||
|
|
||||||
private Set<SimulationMember.Type> needConfirmConnectMembers =
|
/**
|
||||||
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet());
|
* 办理引导进路时,如果进路首区段占用,引导信号15秒后关闭
|
||||||
|
*/
|
||||||
|
private boolean guideDelayCloseWhenFirstSectionOccupied;
|
||||||
|
|
||||||
public MapConfig() {
|
private Set<SimulationMember.Type> needConfirmConnectMembers =
|
||||||
this.lockFirst = false;
|
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER)
|
||||||
this.runMode = RunLevel.CBTC;
|
.collect(Collectors.toSet());
|
||||||
}
|
|
||||||
|
|
||||||
public void copyConfigBy(RealLineConfigVO configVO) {
|
public MapConfig() {
|
||||||
if (Objects.nonNull(configVO)) {
|
this.lockFirst = false;
|
||||||
setUpRight(configVO.getUpRight());
|
this.runMode = RunLevel.CBTC;
|
||||||
this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable());
|
}
|
||||||
setLockFirst(configVO.getLockFirst());
|
|
||||||
setRouteSettingNoFail(configVO.isRouteSettingNoFail());
|
public void copyConfigBy(RealLineConfigVO configVO) {
|
||||||
setSignalOpenAfterParking(configVO.isSignalOpenAfterParking());
|
if (Objects.nonNull(configVO)) {
|
||||||
this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight());
|
setUpRight(configVO.getUpRight());
|
||||||
this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack());
|
this.setSignalBlockRouteSettable(configVO.isSignalBlockRouteSettable());
|
||||||
setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock());
|
setLockFirst(configVO.getLockFirst());
|
||||||
this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst());
|
setRouteSettingNoFail(configVO.isRouteSettingNoFail());
|
||||||
setSwitchSingleHandle(configVO.getSwitchSingleHandle());
|
setSignalOpenAfterParking(configVO.isSignalOpenAfterParking());
|
||||||
setSwitchNRTurnChain(configVO.getSwitchNRTurnChain());
|
this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight());
|
||||||
setSwitchSingleLockChain(configVO.getSwitchSingleLockChain());
|
this.setAtsAutoHandleManualFrontTurnBack(configVO.isAtsAutoHandleManualFrontTurnBack());
|
||||||
setSwitchLossChain(configVO.getSwitchLossChain());
|
setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock());
|
||||||
setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute());
|
this.setGuideNeedRouteSettingFirst(configVO.isGuideNeedRouteSettingFirst());
|
||||||
setRunMode(RunLevel.valueOf(configVO.getRunMode()));
|
setSwitchSingleHandle(configVO.getSwitchSingleHandle());
|
||||||
setInitSingleLockSwitch(configVO.isInitSingleLockSwitch());
|
setSwitchNRTurnChain(configVO.getSwitchNRTurnChain());
|
||||||
setNoParkingSM(configVO.getNoParkingSM());
|
setSwitchSingleLockChain(configVO.getSwitchSingleLockChain());
|
||||||
setParkingSM(configVO.getParkingSM());
|
setSwitchLossChain(configVO.getSwitchLossChain());
|
||||||
setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f);
|
setSingleApproachLockCancelRoute(configVO.getSingleApproachLockCancelRoute());
|
||||||
setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f);
|
setRunMode(RunLevel.valueOf(configVO.getRunMode()));
|
||||||
setCancelAtsControlOfAllRoutesWhenCancelRoute(configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute());
|
setInitSingleLockSwitch(configVO.isInitSingleLockSwitch());
|
||||||
setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger(configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger());
|
setNoParkingSM(configVO.getNoParkingSM());
|
||||||
setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain());
|
setParkingSM(configVO.getParkingSM());
|
||||||
setEBWhenCancelRoute(configVO.isEBWhenCancelRoute());
|
setRmAtpSpeed(configVO.getRmAtpSpeed() / 3.6f);
|
||||||
setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically());
|
setUrmAtpSpeed(configVO.getUrmAtpSpeed() / 3.6f);
|
||||||
setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt());
|
setCancelAtsControlOfAllRoutesWhenCancelRoute(
|
||||||
setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt());
|
configVO.isCancelAtsControlOfAllRoutesWhenCancelRoute());
|
||||||
setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide());
|
setSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger(
|
||||||
|
configVO.isSignalHumanControlBeforeSetAtsControlOrCIAutoTrigger());
|
||||||
|
setAllowEarlyDepartureWhenHoldTrain(configVO.isAllowEarlyDepartureWhenHoldTrain());
|
||||||
|
setEBWhenCancelRoute(configVO.isEBWhenCancelRoute());
|
||||||
|
setAdjustOperationAutomatically(configVO.isAdjustOperationAutomatically());
|
||||||
|
setSetRouteBeforeSetFlt(configVO.isSetRouteBeforeSetFlt());
|
||||||
|
setCancelRouteWhenCancelFlt(configVO.isCancelRouteWhenCancelFlt());
|
||||||
|
setNeedApproachLockBeforeSetGuide(configVO.isNeedApproachLockBeforeSetGuide());
|
||||||
// setStandSkipSetTrainOnlyOnce(configVO.isStandSkipSetTrainOnlyOnce());
|
// setStandSkipSetTrainOnlyOnce(configVO.isStandSkipSetTrainOnlyOnce());
|
||||||
setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode());
|
setBlockadeCommandOnlyValidInStandbyMode(configVO.isBlockadeCommandOnlyValidInStandbyMode());
|
||||||
// setSomeCommandNeedInit(configVO.isSwitchBlockadeCommandNeedInit());
|
// setSomeCommandNeedInit(configVO.isSwitchBlockadeCommandNeedInit());
|
||||||
setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset());
|
setStationPreResetBeforeAxlePreReset(configVO.isStationPreResetBeforeAxlePreReset());
|
||||||
setSwitchTurnOperationCanRecoverSplitFault(configVO.isSwitchTurnOperationCanRecoverSplitFault());
|
setSwitchTurnOperationCanRecoverSplitFault(
|
||||||
setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode());
|
configVO.isSwitchTurnOperationCanRecoverSplitFault());
|
||||||
setDelayWhenCancelRouteWithAbnormalInterlock(configVO.isDelayWhenCancelRouteWithAbnormalInterlock());
|
setHoldCommandIgnoreControlMode(configVO.isHoldCommandIgnoreControlMode());
|
||||||
setFiguresOfTripNumber(configVO.getFiguresOfTripNumber());
|
setDelayWhenCancelRouteWithAbnormalInterlock(
|
||||||
setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber());
|
configVO.isDelayWhenCancelRouteWithAbnormalInterlock());
|
||||||
setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead());
|
setFiguresOfTripNumber(configVO.getFiguresOfTripNumber());
|
||||||
setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock());
|
setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber());
|
||||||
setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget());
|
setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead());
|
||||||
setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict());
|
setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock());
|
||||||
setTripNumberIsUnique(configVO.isTripNumberIsUnique());
|
setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget());
|
||||||
setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid());
|
setRouteDefaultCheckConflict(configVO.isRouteDefaultCheckConflict());
|
||||||
setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber());
|
setTripNumberIsUnique(configVO.isTripNumberIsUnique());
|
||||||
setRailway(configVO.isRailway());
|
setStandTbStrategyIsInvalid(configVO.isStandTbStrategyIsInvalid());
|
||||||
setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal());
|
setUpdateTripPlanByServiceNumber(configVO.isUpdateTripPlanByServiceNumber());
|
||||||
setSFUCanOnlyApplyForFaultLockSection(configVO.isSFUCanOnlyApplyForFaultLockSection());
|
setRailway(configVO.isRailway());
|
||||||
setRouteCanSetWhenSwitchFault(configVO.isRouteCanSetWhenSwitchFault());
|
setSignalBolckOptReflectSignal(configVO.isSignalBolckOptReflectSignal());
|
||||||
setManualTrainDefaultStop(configVO.isManualTrainDefaultStop());
|
setSFUCanOnlyApplyForFaultLockSection(configVO.isSFUCanOnlyApplyForFaultLockSection());
|
||||||
|
setRouteCanSetWhenSwitchFault(configVO.isRouteCanSetWhenSwitchFault());
|
||||||
|
setManualTrainDefaultStop(configVO.isManualTrainDefaultStop());
|
||||||
|
setGuideDelayCloseWhenFirstSectionOccupied(
|
||||||
|
configVO.isGuideDelayCloseWhenFirstSectionOccupied());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void copyConfigBy(MapFunctionConfig mapFunctionConfig) {
|
||||||
|
if (mapFunctionConfig == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.hasCTC = mapFunctionConfig.isHasCTC();
|
||||||
|
this.hasTDCS = mapFunctionConfig.isHasTDCS();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoParkingServiceNumber(String serviceNumber) {
|
||||||
|
if (StringUtils.hasText(noParkingSM)) {
|
||||||
|
if (noParkingSM.contains("-")) {
|
||||||
|
String[] split = noParkingSM.split("-");
|
||||||
|
if (split.length == 2) {
|
||||||
|
return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0])
|
||||||
|
&& Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void copyConfigBy(MapFunctionConfig mapFunctionConfig) {
|
public boolean isParkingServiceNumber(String serviceNumber) {
|
||||||
if (mapFunctionConfig == null)
|
if (StringUtils.hasText(parkingSM)) {
|
||||||
return;
|
if (parkingSM.contains("-")) {
|
||||||
this.hasCTC = mapFunctionConfig.isHasCTC();
|
String[] split = parkingSM.split("-");
|
||||||
this.hasTDCS = mapFunctionConfig.isHasTDCS();
|
if (split.length == 2) {
|
||||||
}
|
return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0])
|
||||||
|
&& Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]);
|
||||||
public boolean isNoParkingServiceNumber(String serviceNumber) {
|
|
||||||
if (StringUtils.hasText(noParkingSM)) {
|
|
||||||
if (noParkingSM.contains("-")) {
|
|
||||||
String[] split = noParkingSM.split("-");
|
|
||||||
if (split.length == 2) {
|
|
||||||
return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isParkingServiceNumber(String serviceNumber) {
|
/**
|
||||||
if (StringUtils.hasText(parkingSM)) {
|
* 是否向右,根据上/下行
|
||||||
if (parkingSM.contains("-")) {
|
*
|
||||||
String[] split = parkingSM.split("-");
|
* @param up 是否上行
|
||||||
if (split.length == 2) {
|
* @return
|
||||||
return Integer.parseInt(serviceNumber) >= Integer.parseInt(split[0]) && Integer.parseInt(serviceNumber) <= Integer.parseInt(split[1]);
|
*/
|
||||||
}
|
public boolean isRight(boolean up) {
|
||||||
}
|
if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) {
|
||||||
}
|
return true;
|
||||||
return false;
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是上行,根据左/右行
|
||||||
|
*/
|
||||||
|
public boolean isUp(boolean right) {
|
||||||
|
return this.upRight == right;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSharingECStation(String stationCode) {
|
||||||
|
if (CollectionUtils.isEmpty(this.sharingECStations)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (String code : sharingECStations) {
|
||||||
|
if (code.equals(stationCode)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ApproachLockCancel {
|
||||||
/**
|
/**
|
||||||
* 是否向右,根据上/下行
|
* 不能取消
|
||||||
*
|
|
||||||
* @param up 是否上行
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean isRight(boolean up) {
|
NOT,
|
||||||
if ((this.isUpRight() && up) || (!this.isUpRight() && !up)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是上行,根据左/右行
|
* 延时取消
|
||||||
*/
|
*/
|
||||||
public boolean isUp(boolean right) {
|
DELAY,
|
||||||
return this.upRight == right;
|
/**
|
||||||
}
|
* 直接取消
|
||||||
|
*/
|
||||||
public boolean isSharingECStation(String stationCode) {
|
DIRECT,
|
||||||
if (CollectionUtils.isEmpty(this.sharingECStations))
|
;
|
||||||
return false;
|
}
|
||||||
for (String code : sharingECStations) {
|
|
||||||
if (code.equals(stationCode))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ApproachLockCancel {
|
|
||||||
/**
|
|
||||||
* 不能取消
|
|
||||||
*/
|
|
||||||
NOT,
|
|
||||||
/**
|
|
||||||
* 延时取消
|
|
||||||
*/
|
|
||||||
DELAY,
|
|
||||||
/**
|
|
||||||
* 直接取消
|
|
||||||
*/
|
|
||||||
DIRECT,;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,10 +345,15 @@ public class SimulationRobotService {
|
||||||
|| Objects.equals(vrSignal.getAspect(), signal.getGuideAspect())) { //引导信号
|
|| Objects.equals(vrSignal.getAspect(), signal.getGuideAspect())) { //引导信号
|
||||||
if (!Objects.equals(signal, throughSignal) || !Objects.equals(vrSignal.getAspect(),
|
if (!Objects.equals(signal, throughSignal) || !Objects.equals(vrSignal.getAspect(),
|
||||||
throughAspect)) {
|
throughAspect)) {
|
||||||
SectionPosition noPassPosition = CalculateService.calculateNextPositionByStartAndLen(
|
SectionPosition tempPosition;
|
||||||
signalPosition, !right, 2, true);
|
if (section.isFunctionTrack()) { //解决福州一列车从车辆段开出来时,在转换轨停车位置有误,导致无法发车的问题
|
||||||
if (targetPosition == null || noPassPosition.isAheadOf(targetPosition, right)) {
|
tempPosition = new SectionPosition(section, section.getStopPointByDirection(right));
|
||||||
targetPosition = noPassPosition;
|
} else {
|
||||||
|
tempPosition = CalculateService.calculateNextPositionByStartAndLen(
|
||||||
|
signalPosition, !right, 2, true);
|
||||||
|
}
|
||||||
|
if (targetPosition == null || tempPosition.isAheadOf(targetPosition, right)) {
|
||||||
|
targetPosition = tempPosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ public class MetroSimulationWorkServiceImpl implements SimulationWorkService {
|
||||||
faultGenerator.addJobs(simulation);
|
faultGenerator.addJobs(simulation);
|
||||||
atsMessageCollectAndDispatcher.addJobs(simulation);
|
atsMessageCollectAndDispatcher.addJobs(simulation);
|
||||||
nccAlarmService.addJobs(simulation);
|
nccAlarmService.addJobs(simulation);
|
||||||
trainMessageDiagram.addJobs(simulation);
|
// trainMessageDiagram.addJobs(simulation); 逻辑报错,暂时注掉
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,251 +10,275 @@ import lombok.Setter;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*地图线路公共配置项
|
* 地图线路公共配置项
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class RealLineConfigVO {
|
public class RealLineConfigVO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*上行是否右方向
|
* 上行是否右方向
|
||||||
*/
|
*/
|
||||||
private Boolean upRight = true;
|
private Boolean upRight = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)
|
* 进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)
|
||||||
*/
|
*/
|
||||||
private Boolean lockFirst = false;
|
private Boolean lockFirst = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信号封锁下进路是否可以办理
|
* 信号封锁下进路是否可以办理
|
||||||
*/
|
*/
|
||||||
private boolean signalBlockRouteSettable = false;
|
private boolean signalBlockRouteSettable = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路办理不失败
|
* 进路办理不失败
|
||||||
*/
|
*/
|
||||||
private boolean routeSettingNoFail = false;
|
private boolean routeSettingNoFail = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*是否列车停站开门后,才办理出站进路开放出站信号机
|
* 是否列车停站开门后,才办理出站进路开放出站信号机
|
||||||
*/
|
*/
|
||||||
private boolean signalOpenAfterParking = false;
|
private boolean signalOpenAfterParking = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*站台扣车是否关闭逻辑点灯的信号机
|
* 站台扣车是否关闭逻辑点灯的信号机
|
||||||
*/
|
*/
|
||||||
private boolean standHoldCloseLogicLight = false;
|
private boolean standHoldCloseLogicLight = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*ATS是否自动处理人工设置的站前折返自动更新车次
|
* ATS是否自动处理人工设置的站前折返自动更新车次
|
||||||
*/
|
*/
|
||||||
private boolean atsAutoHandleManualFrontTurnBack = false;
|
private boolean atsAutoHandleManualFrontTurnBack = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*CTC列车进路延续保护仅折返站处锁闭
|
* CTC列车进路延续保护仅折返站处锁闭
|
||||||
*/
|
*/
|
||||||
private boolean ctcOverlapOnlyTurnBackStationLock = false;
|
private boolean ctcOverlapOnlyTurnBackStationLock = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*引导办理是否需要先排列进路
|
* 引导办理是否需要先排列进路
|
||||||
*/
|
*/
|
||||||
private boolean guideNeedRouteSettingFirst = true;
|
private boolean guideNeedRouteSettingFirst = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*道岔区段状态改变按单个道岔处理
|
* 道岔区段状态改变按单个道岔处理
|
||||||
*/
|
*/
|
||||||
private Boolean switchSingleHandle = true;
|
private Boolean switchSingleHandle = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*道岔正/反操是否联动
|
* 道岔正/反操是否联动
|
||||||
*/
|
*/
|
||||||
private Boolean switchNRTurnChain = false;
|
private Boolean switchNRTurnChain = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*道岔单解/锁是否联动
|
* 道岔单解/锁是否联动
|
||||||
*/
|
*/
|
||||||
private Boolean switchSingleLockChain = false;
|
private Boolean switchSingleLockChain = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*道岔故障失表是否联动
|
* 道岔故障失表是否联动
|
||||||
*/
|
*/
|
||||||
private Boolean switchLossChain = false;
|
private Boolean switchLossChain = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路
|
* 是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路
|
||||||
*/
|
*/
|
||||||
private MapConfig.ApproachLockCancel singleApproachLockCancelRoute = MapConfig.ApproachLockCancel.NOT;
|
private MapConfig.ApproachLockCancel singleApproachLockCancelRoute = MapConfig.ApproachLockCancel.NOT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*列车控制模式/级别
|
* 列车控制模式/级别
|
||||||
*/
|
*/
|
||||||
private String runMode = RunLevel.CBTC.name();
|
private String runMode = RunLevel.CBTC.name();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*不停站头码车服务号列表
|
* 不停站头码车服务号列表
|
||||||
*/
|
*/
|
||||||
private String noParkingSM="";
|
private String noParkingSM = "";
|
||||||
/**
|
/**
|
||||||
*停站头码车服务号列表
|
* 停站头码车服务号列表
|
||||||
*/
|
*/
|
||||||
private String parkingSM="";
|
private String parkingSM = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*RM模式下ATP防护速度(单位km/h)
|
* RM模式下ATP防护速度(单位km/h)
|
||||||
*/
|
*/
|
||||||
private float rmAtpSpeed = 25f;
|
private float rmAtpSpeed = 25f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*URM模式下ATP防护速度(单位km/h)
|
* URM模式下ATP防护速度(单位km/h)
|
||||||
*/
|
*/
|
||||||
private float urmAtpSpeed = 45f;
|
private float urmAtpSpeed = 45f;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始加载设备时是否默认单锁正线道岔
|
* 初始加载设备时是否默认单锁正线道岔
|
||||||
*/
|
*/
|
||||||
private boolean initSingleLockSwitch = false;
|
private boolean initSingleLockSwitch = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关
|
* 当取消进路/人解进路时,将该进路始端信号机下所有进路设为自排关
|
||||||
*/
|
*/
|
||||||
private boolean cancelAtsControlOfAllRoutesWhenCancelRoute;
|
private boolean cancelAtsControlOfAllRoutesWhenCancelRoute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在设置自排开或自动触发之前,信号机需处于人工控状态
|
* 在设置自排开或自动触发之前,信号机需处于人工控状态
|
||||||
*/
|
*/
|
||||||
private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger;
|
private boolean signalHumanControlBeforeSetAtsControlOrCIAutoTrigger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣车时是否允许提前发车
|
* 扣车时是否允许提前发车
|
||||||
*/
|
*/
|
||||||
private boolean allowEarlyDepartureWhenHoldTrain;
|
private boolean allowEarlyDepartureWhenHoldTrain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消进路时列车紧急制动
|
* 取消进路时列车紧急制动
|
||||||
*/
|
*/
|
||||||
private boolean EBWhenCancelRoute;
|
private boolean EBWhenCancelRoute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ATS自动调整运行
|
* ATS自动调整运行
|
||||||
*/
|
*/
|
||||||
private boolean adjustOperationAutomatically = true;
|
private boolean adjustOperationAutomatically = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在办理车队进路前是否要先排列进路
|
* 在办理车队进路前是否要先排列进路
|
||||||
*/
|
*/
|
||||||
private boolean setRouteBeforeSetFlt = true;
|
private boolean setRouteBeforeSetFlt = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在取消车队进路时同时取消进路
|
* 在取消车队进路时同时取消进路
|
||||||
*/
|
*/
|
||||||
private boolean cancelRouteWhenCancelFlt;
|
private boolean cancelRouteWhenCancelFlt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 办理引导前需要信号机接近锁闭
|
* 办理引导前需要信号机接近锁闭
|
||||||
*/
|
*/
|
||||||
private boolean needApproachLockBeforeSetGuide = true;
|
private boolean needApproachLockBeforeSetGuide = true;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 站台指定列车跳停仅跳停一次
|
// * 站台指定列车跳停仅跳停一次
|
||||||
// */
|
// */
|
||||||
// private boolean standSkipSetTrainOnlyOnce;
|
// private boolean standSkipSetTrainOnlyOnce;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封锁命令(状态)仅在后备模式下有效
|
* 封锁命令(状态)仅在后备模式下有效
|
||||||
*/
|
*/
|
||||||
private boolean blockadeCommandOnlyValidInStandbyMode;
|
private boolean blockadeCommandOnlyValidInStandbyMode;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 道岔封锁命令需要初始化
|
// * 道岔封锁命令需要初始化
|
||||||
// */
|
// */
|
||||||
// private boolean switchBlockadeCommandNeedInit;
|
// private boolean switchBlockadeCommandNeedInit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计轴预复位前需要车站预复位
|
* 计轴预复位前需要车站预复位
|
||||||
*/
|
*/
|
||||||
private boolean stationPreResetBeforeAxlePreReset;
|
private boolean stationPreResetBeforeAxlePreReset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔转动操作可以使失表故障恢复
|
* 道岔转动操作可以使失表故障恢复
|
||||||
*/
|
*/
|
||||||
private boolean switchTurnOperationCanRecoverSplitFault;
|
private boolean switchTurnOperationCanRecoverSplitFault;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扣车命令不区分控制模式
|
* 扣车命令不区分控制模式
|
||||||
*/
|
*/
|
||||||
private boolean holdCommandIgnoreControlMode;
|
private boolean holdCommandIgnoreControlMode;
|
||||||
|
|
||||||
/** 取消联锁条件不满足的进路时需要延时解锁 */
|
/**
|
||||||
private boolean delayWhenCancelRouteWithAbnormalInterlock;
|
* 取消联锁条件不满足的进路时需要延时解锁
|
||||||
|
*/
|
||||||
|
private boolean delayWhenCancelRouteWithAbnormalInterlock;
|
||||||
|
|
||||||
/** 车次号的位数 */
|
/**
|
||||||
private int figuresOfTripNumber = 4;
|
* 车次号的位数
|
||||||
|
*/
|
||||||
|
private int figuresOfTripNumber = 4;
|
||||||
|
|
||||||
/** 服务号的位数 */
|
/**
|
||||||
private int figuresOfServiceNumber = 3;
|
* 服务号的位数
|
||||||
|
*/
|
||||||
|
private int figuresOfServiceNumber = 3;
|
||||||
|
|
||||||
/** 设置头码车时检查方向 */
|
/**
|
||||||
private boolean checkDirectionWhenSetHead;
|
* 设置头码车时检查方向
|
||||||
|
*/
|
||||||
|
private boolean checkDirectionWhenSetHead;
|
||||||
|
|
||||||
/** 转换轨进路只能通过故障解锁来取消 */
|
/**
|
||||||
private boolean transferRouteCanOnlyFaultUnlock;
|
* 转换轨进路只能通过故障解锁来取消
|
||||||
|
*/
|
||||||
|
private boolean transferRouteCanOnlyFaultUnlock;
|
||||||
|
|
||||||
/** 头码车抵达目的地后变为人工车 */
|
/**
|
||||||
private boolean setManualWhenHeadTrainArriveTarget;
|
* 头码车抵达目的地后变为人工车
|
||||||
|
*/
|
||||||
|
private boolean setManualWhenHeadTrainArriveTarget;
|
||||||
|
|
||||||
/** 进路默认开启冲突检测 */
|
/**
|
||||||
private boolean routeDefaultCheckConflict;
|
* 进路默认开启冲突检测
|
||||||
|
*/
|
||||||
|
private boolean routeDefaultCheckConflict;
|
||||||
|
|
||||||
/** 运行图中车次号是否唯一 */
|
/**
|
||||||
private boolean tripNumberIsUnique;
|
* 运行图中车次号是否唯一
|
||||||
|
*/
|
||||||
|
private boolean tripNumberIsUnique;
|
||||||
|
|
||||||
/** 站台折返策略不生效 */
|
/**
|
||||||
private boolean standTbStrategyIsInvalid;
|
* 站台折返策略不生效
|
||||||
|
*/
|
||||||
|
private boolean standTbStrategyIsInvalid;
|
||||||
|
|
||||||
/** 根据服务号更新车次计划 */
|
/**
|
||||||
private boolean updateTripPlanByServiceNumber;
|
* 根据服务号更新车次计划
|
||||||
|
*/
|
||||||
|
private boolean updateTripPlanByServiceNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大铁线路
|
* 大铁线路
|
||||||
*/
|
*/
|
||||||
private boolean railway;
|
private boolean railway;
|
||||||
/**
|
/**
|
||||||
* 对信号机封锁操作,是否影响信号显示
|
* 对信号机封锁操作,是否影响信号显示
|
||||||
* <p>
|
* <p>
|
||||||
* true-封锁信号机,会使信号机显示禁止色<br>
|
* true-封锁信号机,会使信号机显示禁止色<br> false-封锁信号机,不会影响信号机显示。
|
||||||
* false-封锁信号机,不会影响信号机显示。
|
*/
|
||||||
*/
|
private boolean signalBolckOptReflectSignal = true;
|
||||||
private boolean signalBolckOptReflectSignal=true;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 区故解只能应用于故障锁闭区段
|
|
||||||
*/
|
|
||||||
@JsonProperty(value = "SFUCanOnlyApplyForFaultLockSection")
|
|
||||||
private boolean SFUCanOnlyApplyForFaultLockSection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道岔故障时可以办理进路(由远及近锁闭,到故障处终止)
|
* 区故解只能应用于故障锁闭区段
|
||||||
*/
|
*/
|
||||||
private boolean routeCanSetWhenSwitchFault;
|
@JsonProperty(value = "SFUCanOnlyApplyForFaultLockSection")
|
||||||
|
private boolean SFUCanOnlyApplyForFaultLockSection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态
|
* 道岔故障时可以办理进路(由远及近锁闭,到故障处终止)
|
||||||
*/
|
*/
|
||||||
private boolean manualTrainDefaultStop;
|
private boolean routeCanSetWhenSwitchFault;
|
||||||
|
|
||||||
public static RealLineConfigVO parseJsonStr(String configData) {
|
/**
|
||||||
if (StringUtils.hasText(configData)) {
|
* 人工驾驶模式(CM/RM/NRM)下的列车默认是停车等待命令状态
|
||||||
return JsonUtils.read(configData, RealLineConfigVO.class);
|
*/
|
||||||
}
|
private boolean manualTrainDefaultStop;
|
||||||
return new RealLineConfigVO();
|
|
||||||
|
/**
|
||||||
|
* 办理引导进路时,如果进路首区段占用,引导信号15秒后关闭
|
||||||
|
*/
|
||||||
|
private boolean guideDelayCloseWhenFirstSectionOccupied;
|
||||||
|
|
||||||
|
public static RealLineConfigVO parseJsonStr(String configData) {
|
||||||
|
if (StringUtils.hasText(configData)) {
|
||||||
|
return JsonUtils.read(configData, RealLineConfigVO.class);
|
||||||
}
|
}
|
||||||
|
return new RealLineConfigVO();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isUp(boolean right) {
|
public boolean isUp(boolean right) {
|
||||||
|
|
||||||
return right == upRight;
|
return right == upRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue