修改“驾驶”命令设置目的地时的bug
This commit is contained in:
parent
3e8ed7095e
commit
29b94f0f1b
|
@ -467,11 +467,10 @@ public class AtsTrainService {
|
|||
throw new SimulationException(SimulationExceptionType.System_Fault, "只能选列车或区段");
|
||||
}
|
||||
Section section = (Section) element;
|
||||
Section targetSection = section.getNextRunningSectionOf(right);
|
||||
SectionPosition trainTargetPosition = new SectionPosition(targetSection,
|
||||
targetSection.getStopPointByDirection(right));
|
||||
SectionPosition trainTargetPosition = new SectionPosition(section,
|
||||
section.getStopPointByDirection(right));
|
||||
Float distance = CalculateService.calculateDistance(train.getHeadPosition(),
|
||||
trainTargetPosition, right, false);
|
||||
trainTargetPosition, right, true);
|
||||
if (distance == null) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "无法到达的位置");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue