转换轨列车添加停站流程

修改由转换轨列车流程导致的ATS进路触发逻辑问题
修改进路延续保护道岔锁闭逻辑bug
修改转换轨列车初始化加载逻辑
This commit is contained in:
walker-sheng 2021-01-29 16:44:35 +08:00
parent dd4a72b130
commit 298fb9a1a3
5 changed files with 18 additions and 3 deletions

View File

@ -576,7 +576,14 @@ public class AtsPlanService {
}
// 根据路径获取加载方向
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);
SectionPosition headPosition = new SectionPosition(startSection, offset);
// 下一计划到达第一车站到发计划

View File

@ -220,7 +220,7 @@ public class AtsRouteSettingService {
if (Objects.nonNull(train.getPlanStandTrack())) {
Section nextSection = repository.getByCode(train.getPlanStandTrack(), Section.class);
if (!Objects.equals(trainSection, nextSection)) {
if (train.isParking()) { // 列车在站台停车
if (train.isParking() && !trainSection.isTransferTrack()) { // 列车在站台停车
// 处理站前折返的进路排列
routePaths = repository.queryRoutePaths(trainSection, nextSection);
} else if (train.isStop() && !trainSection.isNormalStandTrack() && (trainSection.isTurnBackTrack())) { // 折返轨停车

View File

@ -523,6 +523,10 @@ public class RouteService {
this.routeFlsControl(simulation, flsList);
if (config.isLockFirst()) {
for (SwitchElement switchElement : switchList) {
if (!switchElement.isOnPosition() &&
(switchElement.getASwitch().isSectionOccupied() || switchElement.getASwitch().isLocked())) {
continue;
}
switchElement.getASwitch().overlapLock();
}
if (!CollectionUtils.isEmpty(flsList)) {

View File

@ -193,6 +193,10 @@ public class ATPLogicLoop {
}
private void handleStandParkedTrain(Simulation simulation, VirtualRealityTrain train) {
if (train.getHeadPosition().getSection().isTransferTrack()) {
// 列车在转换轨直接发车
train.earlyDeparture();
}
StandParkedTrainActivity activity = train.getStandParkedTrainActivity();
int parkRemainTime = train.getParkRemainTime();
if (parkRemainTime > 0) {

View File

@ -214,7 +214,7 @@ public class ATPService {
if (train.isStop()) {
SectionPosition headPosition = train.getHeadPosition();
Section headSection = headPosition.getSection();
if (headSection.isNormalStandTrack()) {
if (headSection.isNormalStandTrack() || headSection.isTransferTrack()) {
float offset = headPosition.getOffset();
float stopPoint = headSection.getStopPointByDirection(train.isRight());
float dlen = Math.abs(offset - stopPoint);