转换轨列车添加停站流程
修改由转换轨列车流程导致的ATS进路触发逻辑问题 修改进路延续保护道岔锁闭逻辑bug 修改转换轨列车初始化加载逻辑
This commit is contained in:
parent
dd4a72b130
commit
298fb9a1a3
@ -576,7 +576,14 @@ public class AtsPlanService {
|
|||||||
}
|
}
|
||||||
// 根据路径获取加载方向
|
// 根据路径获取加载方向
|
||||||
List<RoutePath> routePaths = repository.getRoutePaths(startSection, endSection);
|
List<RoutePath> routePaths = repository.getRoutePaths(startSection, endSection);
|
||||||
boolean right = routePaths.get(0).isRight();
|
RoutePath routePath = routePaths.get(0);
|
||||||
|
boolean right = routePath.isRight();
|
||||||
|
if (startSection.isOccupied() ||
|
||||||
|
(Objects.nonNull(startSection.getSectionOf(right)) &&
|
||||||
|
startSection.getSectionOf(right).isOccupied())) {
|
||||||
|
// 转换轨有车占用,不加载
|
||||||
|
return;
|
||||||
|
}
|
||||||
float offset = startSection.getStopPointByDirection(right);
|
float offset = startSection.getStopPointByDirection(right);
|
||||||
SectionPosition headPosition = new SectionPosition(startSection, offset);
|
SectionPosition headPosition = new SectionPosition(startSection, offset);
|
||||||
// 下一计划到达:第一车站到发计划
|
// 下一计划到达:第一车站到发计划
|
||||||
|
@ -220,7 +220,7 @@ public class AtsRouteSettingService {
|
|||||||
if (Objects.nonNull(train.getPlanStandTrack())) {
|
if (Objects.nonNull(train.getPlanStandTrack())) {
|
||||||
Section nextSection = repository.getByCode(train.getPlanStandTrack(), Section.class);
|
Section nextSection = repository.getByCode(train.getPlanStandTrack(), Section.class);
|
||||||
if (!Objects.equals(trainSection, nextSection)) {
|
if (!Objects.equals(trainSection, nextSection)) {
|
||||||
if (train.isParking()) { // 列车在站台停车
|
if (train.isParking() && !trainSection.isTransferTrack()) { // 列车在站台停车
|
||||||
// 处理站前折返的进路排列
|
// 处理站前折返的进路排列
|
||||||
routePaths = repository.queryRoutePaths(trainSection, nextSection);
|
routePaths = repository.queryRoutePaths(trainSection, nextSection);
|
||||||
} else if (train.isStop() && !trainSection.isNormalStandTrack() && (trainSection.isTurnBackTrack())) { // 折返轨停车
|
} else if (train.isStop() && !trainSection.isNormalStandTrack() && (trainSection.isTurnBackTrack())) { // 折返轨停车
|
||||||
|
@ -523,6 +523,10 @@ public class RouteService {
|
|||||||
this.routeFlsControl(simulation, flsList);
|
this.routeFlsControl(simulation, flsList);
|
||||||
if (config.isLockFirst()) {
|
if (config.isLockFirst()) {
|
||||||
for (SwitchElement switchElement : switchList) {
|
for (SwitchElement switchElement : switchList) {
|
||||||
|
if (!switchElement.isOnPosition() &&
|
||||||
|
(switchElement.getASwitch().isSectionOccupied() || switchElement.getASwitch().isLocked())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
switchElement.getASwitch().overlapLock();
|
switchElement.getASwitch().overlapLock();
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(flsList)) {
|
if (!CollectionUtils.isEmpty(flsList)) {
|
||||||
|
@ -193,6 +193,10 @@ public class ATPLogicLoop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleStandParkedTrain(Simulation simulation, VirtualRealityTrain train) {
|
private void handleStandParkedTrain(Simulation simulation, VirtualRealityTrain train) {
|
||||||
|
if (train.getHeadPosition().getSection().isTransferTrack()) {
|
||||||
|
// 列车在转换轨,直接发车
|
||||||
|
train.earlyDeparture();
|
||||||
|
}
|
||||||
StandParkedTrainActivity activity = train.getStandParkedTrainActivity();
|
StandParkedTrainActivity activity = train.getStandParkedTrainActivity();
|
||||||
int parkRemainTime = train.getParkRemainTime();
|
int parkRemainTime = train.getParkRemainTime();
|
||||||
if (parkRemainTime > 0) {
|
if (parkRemainTime > 0) {
|
||||||
|
@ -214,7 +214,7 @@ public class ATPService {
|
|||||||
if (train.isStop()) {
|
if (train.isStop()) {
|
||||||
SectionPosition headPosition = train.getHeadPosition();
|
SectionPosition headPosition = train.getHeadPosition();
|
||||||
Section headSection = headPosition.getSection();
|
Section headSection = headPosition.getSection();
|
||||||
if (headSection.isNormalStandTrack()) {
|
if (headSection.isNormalStandTrack() || headSection.isTransferTrack()) {
|
||||||
float offset = headPosition.getOffset();
|
float offset = headPosition.getOffset();
|
||||||
float stopPoint = headSection.getStopPointByDirection(train.isRight());
|
float stopPoint = headSection.getStopPointByDirection(train.isRight());
|
||||||
float dlen = Math.abs(offset - stopPoint);
|
float dlen = Math.abs(offset - stopPoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user