修改ats进路触发时间限制

This commit is contained in:
joylink_zhangsai 2021-08-12 17:33:06 +08:00
parent d070ca7005
commit 5618276a3a

View File

@ -56,7 +56,8 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService {
List<StationPlan> planList = tripPlan.getPlanList();
for (StationPlan stationPlan : planList) {
if (!stationPlan.getStation().isDepot()) { //第一个非停车场的车站
if (stationPlan.getSection().getCode().equals(trainInfo.getPlanStandTrack())) { //车站是列车的计划
if (stationPlan.getSection().getCode().equals(trainInfo.getPlanStandTrack())
&& !section.equals(stationPlan.getSection())) { //车站是列车的计划
if (!systemTime.toLocalTime().plusSeconds(60).isAfter(tripPlan.getStartTime())) { //当前时间不早于计划开始时间60秒
log.debug(String.format("列车[%s]未到发车时间,不触发进路", trainInfo.getGroupNumber()));
return null;
@ -79,6 +80,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService {
/**
* 先选取需要征用的进路再根据计划判断是否存在冲突的未完成计划
*
* @param simulation
* @param trainInfo
* @param tripPlan
@ -127,6 +129,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService {
/**
* 检查进路是否和未完成的计划冲突
*
* @param repository
* @param trainInfo
* @param tripPlan
@ -165,7 +168,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService {
}
if (!temp.isFinished()) {
if (!start.equals(temp.getSection())) {
if(this.isConflict(repository, route, aheadTrain, start, temp.getSection())){
if (this.isConflict(repository, route, aheadTrain, start, temp.getSection())) {
conflictStationPlan = temp;
break;
}
@ -195,6 +198,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService {
/**
* 查询所需办理进路所需到达的计划时间
*
* @param repository
* @param route
* @param trainInfo