车站预复位逻辑修改

This commit is contained in:
joylink_zhangsai 2021-03-23 11:18:44 +08:00
parent ced64ef381
commit d930f18d52
3 changed files with 16 additions and 6 deletions

View File

@ -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);
}
}
/**

View File

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

View File

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