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

This commit is contained in:
thesai 2024-10-10 17:07:17 +08:00
parent f14e377565
commit 82682452a1
1 changed files with 9 additions and 4 deletions

View File

@ -345,10 +345,15 @@ public class SimulationRobotService {
|| Objects.equals(vrSignal.getAspect(), signal.getGuideAspect())) { //引导信号
if (!Objects.equals(signal, throughSignal) || !Objects.equals(vrSignal.getAspect(),
throughAspect)) {
SectionPosition noPassPosition = CalculateService.calculateNextPositionByStartAndLen(
signalPosition, !right, 2, true);
if (targetPosition == null || noPassPosition.isAheadOf(targetPosition, right)) {
targetPosition = noPassPosition;
SectionPosition tempPosition;
if (section.isFunctionTrack()) { //解决福州一列车从车辆段开出来时在转换轨停车位置有误导致无法发车的问题
tempPosition = new SectionPosition(section, section.getStopPointByDirection(right));
} else {
tempPosition = CalculateService.calculateNextPositionByStartAndLen(
signalPosition, !right, 2, true);
}
if (targetPosition == null || tempPosition.isAheadOf(targetPosition, right)) {
targetPosition = tempPosition;
}
}
}