新增:头码车到终点变人工车(线路配置)
This commit is contained in:
parent
8099ee57e9
commit
35d6139ed6
@ -474,8 +474,16 @@ public class AtsTrainService {
|
||||
log.error("地图[{}}]目的地码[{}]不存在", simulation.getBuildParams().getMap().getName(), destinationCode);
|
||||
return;
|
||||
}
|
||||
if (headSection.equals(destDefinition.getSection())) //列车已到达目的地区段
|
||||
Section destSection = destDefinition.getSection();
|
||||
if (headSection.equals(destSection)) { //列车已到达目的地区段
|
||||
VirtualRealityTrain vrTrain = repository.getOnlineTrainBy(train.getGroupNumber());
|
||||
if (vrTrain.isStopAtThePosition(new SectionPosition(destSection, destSection.getStopPointByDirection(trainRight)))) {
|
||||
if (repository.getConfig().isSetManualWhenHeadTrainArriveTarget()) {
|
||||
setManualTrain(simulation, vrTrain.getGroupNumber());
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (targetSection != null) {
|
||||
SectionPosition targetPosition = new SectionPosition(targetSection, targetSection.getStopPointByDirection(trainRight));
|
||||
// TODO: 2021/5/28 这里列车越过目标停车点的判断逻辑不严谨,如果开过头并换端了,以此逻辑判断并不正确
|
||||
|
@ -210,6 +210,9 @@ public class MapConfig {
|
||||
/** 转换轨进路只能通过故障解锁来取消 */
|
||||
private boolean transferRouteCanOnlyFaultUnlock;
|
||||
|
||||
/** 头码车抵达目的地后变为人工车 */
|
||||
private boolean setManualWhenHeadTrainArriveTarget;
|
||||
|
||||
private Set<SimulationMember.Type> needConfirmConnectMembers =
|
||||
Stream.of(DISPATCHER, STATION_SUPERVISOR, MAINTAINER, ELECTRIC_DISPATCHER).collect(Collectors.toSet());
|
||||
|
||||
@ -259,6 +262,7 @@ public class MapConfig {
|
||||
setFiguresOfServiceNumber(configVO.getFiguresOfServiceNumber());
|
||||
setCheckDirectionWhenSetHead(configVO.isCheckDirectionWhenSetHead());
|
||||
setTransferRouteCanOnlyFaultUnlock(configVO.isTransferRouteCanOnlyFaultUnlock());
|
||||
setSetManualWhenHeadTrainArriveTarget(configVO.isSetManualWhenHeadTrainArriveTarget());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,6 +199,9 @@ public class RealLineConfigVO {
|
||||
/** 转换轨进路只能通过故障解锁来取消 */
|
||||
private boolean transferRouteCanOnlyFaultUnlock;
|
||||
|
||||
/** 头码车抵达目的地后变为人工车 */
|
||||
private boolean setManualWhenHeadTrainArriveTarget;
|
||||
|
||||
public static RealLineConfigVO parseJsonStr(String configData) {
|
||||
if (StringUtils.hasText(configData)) {
|
||||
return JsonUtils.read(configData, RealLineConfigVO.class);
|
||||
|
Loading…
Reference in New Issue
Block a user