修改停站流程
This commit is contained in:
parent
8059408d96
commit
63da590542
@ -55,6 +55,11 @@ public class AtsHeadTrainStageService implements AtsStageService {
|
||||
|
||||
@Override
|
||||
public void handleNormalStandParking(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
||||
//环路类目的地码可能需要处理
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
||||
DestinationCodeDefinition dcd = simulation.getRepository().getDestinationCodeDefinition(trainInfo.getDestinationCode());
|
||||
if (Objects.equals(dcd.getSection(), parkSection)) {
|
||||
handleArriveDestination(simulation, trainInfo);
|
||||
|
@ -43,6 +43,11 @@ public class AtsManualTrainStageService implements AtsStageService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTurnBackTrackParking(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
||||
|
||||
|
@ -75,6 +75,13 @@ public class AtsPlanTrainStageService implements AtsStageService {
|
||||
this.updateNextPlan(simulation, trainInfo, nextTripPlan, nextTripPlan.getFirstStationPlan());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo, Section parkSection) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
TripPlan tripPlan = repository.getTripPlan(trainInfo.getServiceNumber(), trainInfo.getTripNumber());
|
||||
StationPlan stationPlan = tripPlan.queryStationPlan(parkSection);
|
||||
if (stationPlan == null) {
|
||||
// 非计划中的停靠站台轨,暂不处理
|
||||
return;
|
||||
|
@ -21,6 +21,11 @@ public interface AtsStageService {
|
||||
*/
|
||||
void handleNormalStandParking(Simulation simulation, TrainInfo trainInfo, Section parkSection);
|
||||
|
||||
/**
|
||||
* 准备从正常站台发车
|
||||
*/
|
||||
void ready2DepartFromNormalStand(Simulation simulation, TrainInfo trainInfo, Section parkSection);
|
||||
|
||||
/**
|
||||
* 处理折返轨停车
|
||||
* @param simulation
|
||||
|
@ -6,8 +6,6 @@ import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationModule;
|
||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
||||
import club.joylink.rtss.simulation.cbtc.data.plan.StationPlan;
|
||||
import club.joylink.rtss.simulation.cbtc.data.support.RoutePath;
|
||||
import club.joylink.rtss.simulation.cbtc.data.vo.TrainInfo;
|
||||
import club.joylink.rtss.simulation.cbtc.onboard.ATP.OnboardAtpApiService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -33,6 +31,7 @@ public class AtsTrainStageHandler {
|
||||
|
||||
/**
|
||||
* 处理列车回库
|
||||
*
|
||||
* @param simulation
|
||||
* @param train
|
||||
*/
|
||||
@ -50,6 +49,7 @@ public class AtsTrainStageHandler {
|
||||
|
||||
/**
|
||||
* 处理列车站台停靠(包括正常站台轨、折返轨、转换轨)
|
||||
*
|
||||
* @param simulation
|
||||
* @param trainInfo
|
||||
*/
|
||||
@ -63,7 +63,11 @@ public class AtsTrainStageHandler {
|
||||
stageService.handleNormalStandParking(simulation, trainInfo, parkSection);
|
||||
List<Stand> standList = parkSection.getStandList();
|
||||
int remainTime = standList.get(0).getRemainTime();
|
||||
if (remainTime < 10000) { // 通知列车可以关门了
|
||||
if (remainTime < 2 && !trainInfo.isDoorOpen() &&
|
||||
(this.atsStandService.isStandDoorCloseOrInterlockRelease(simulation, parkSection)) &&
|
||||
!this.atsStandService.isHoldTrain(parkSection)) { //即将发车
|
||||
stageService.ready2DepartFromNormalStand(simulation, trainInfo, parkSection);
|
||||
} else if (remainTime < 10000) { // 通知列车可以关门了
|
||||
this.onboardAtpApiService.departure(simulation, trainInfo.getGroupNumber());
|
||||
}
|
||||
} else { // 折返轨
|
||||
@ -76,6 +80,7 @@ public class AtsTrainStageHandler {
|
||||
|
||||
/**
|
||||
* 处理列车跳停车站
|
||||
*
|
||||
* @param simulation
|
||||
* @param trainInfo
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user