[修改]列车在功能轨上时,会优先停在轨道的停车点上

This commit is contained in:
thesai 2024-10-10 17:07:17 +08:00
parent f14e377565
commit 82682452a1

View File

@ -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;
} }
} }
} }