车站预复位逻辑修改
This commit is contained in:
parent
ced64ef381
commit
d930f18d52
@ -434,7 +434,11 @@ public class AtsStationService {
|
||||
* 计轴预复位
|
||||
*/
|
||||
public void preReset(Simulation simulation, Station station) {
|
||||
station.getPreResetValidDuration().set(60 * 1000);
|
||||
if (station.isCentralized()) {
|
||||
station.getPreResetValidDuration().set(60 * 1000);
|
||||
} else {
|
||||
station.getDeviceStation().getPreResetValidDuration().set(60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -631,9 +631,9 @@ public class CiApiServiceImpl implements CiApiService {
|
||||
VirtualRealitySectionAxleCounter virtualAxleCounter = axleSection.getVirtualAxleCounter();
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(virtualAxleCounter.isOccupy(), section.debugStr() + "计轴未占用,无需预复位");
|
||||
if (simulation.getRepository().getConfig().isStationPreResetBeforeAxlePreReset()) {
|
||||
Station station = axleSection.getStation();
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertNotNull(station, section.debugStr() + "没有所属车站");
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(station.isPreReset(), station.debugStr() + "需处于预复位状态");
|
||||
Station deviceStation = axleSection.getDeviceStation();
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertNotNull(deviceStation, section.debugStr() + "没有所属集中站");
|
||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(deviceStation.isPreReset(), deviceStation.debugStr() + "需处于预复位状态");
|
||||
}
|
||||
return virtualAxleCounter;
|
||||
}
|
||||
|
@ -53,6 +53,11 @@ public class DestinationCodeDefinition {
|
||||
*/
|
||||
private Boolean rightFrontTurnBack;
|
||||
|
||||
/**
|
||||
* 必选进路
|
||||
*/
|
||||
private Route necessaryRoute;
|
||||
|
||||
//根据目的地码的定义数据,生成路径
|
||||
/**
|
||||
* 目的地码代表的运行路径(物理区段)
|
||||
@ -62,12 +67,12 @@ public class DestinationCodeDefinition {
|
||||
private List<Route> routes;
|
||||
|
||||
public DestinationCodeDefinition(String code, Type type, Section section) {
|
||||
this(code, type, null, null, section, null, null, null, null, null, null, null, null);
|
||||
this(code, type, null, null, section, null, null, null, null, null, null, null, null, null);
|
||||
}
|
||||
|
||||
public DestinationCodeDefinition(String code, Type type, String description, Section startSection, Section section, Boolean right,
|
||||
List<Section> necessarySections, Station leftStation, Boolean leftFrontTurnBack,
|
||||
Station rightStation, Boolean rightFrontTurnBack, List<Section> runPath, List<Route> routes) {
|
||||
Station rightStation, Boolean rightFrontTurnBack, Route route, List<Section> runPath, List<Route> routes) {
|
||||
this.code = code;
|
||||
this.type = type;
|
||||
this.description = description;
|
||||
@ -79,6 +84,7 @@ public class DestinationCodeDefinition {
|
||||
this.leftFrontTurnBack = leftFrontTurnBack;
|
||||
this.rightStation = rightStation;
|
||||
this.rightFrontTurnBack = rightFrontTurnBack;
|
||||
this.necessaryRoute = route;
|
||||
this.runPath = runPath;
|
||||
this.routes = routes;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user