[修改]列车在功能轨上时,会优先停在轨道的停车点上
This commit is contained in:
parent
f14e377565
commit
82682452a1
@ -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;
|
||||||
|
if (section.isFunctionTrack()) { //解决福州一列车从车辆段开出来时,在转换轨停车位置有误,导致无法发车的问题
|
||||||
|
tempPosition = new SectionPosition(section, section.getStopPointByDirection(right));
|
||||||
|
} else {
|
||||||
|
tempPosition = CalculateService.calculateNextPositionByStartAndLen(
|
||||||
signalPosition, !right, 2, true);
|
signalPosition, !right, 2, true);
|
||||||
if (targetPosition == null || noPassPosition.isAheadOf(targetPosition, right)) {
|
}
|
||||||
targetPosition = noPassPosition;
|
if (targetPosition == null || tempPosition.isAheadOf(targetPosition, right)) {
|
||||||
|
targetPosition = tempPosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user