Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
8471bd9d6e
@ -111,11 +111,7 @@ public class AtpSectionService {
|
||||
for (Section section : sectionList) {
|
||||
if (section.isSwitchAxleCounterSection()) {
|
||||
Section switchSection = section.getLogicList().get(0);
|
||||
if (switchSingleHandle && isRailway) {
|
||||
atpSectionList.addAll(handleSingleSwitchPosition(section, right));
|
||||
} else {
|
||||
atpSectionList.addAll(switchSection.getSwitchAxleSectionsBySwitchPosition());
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (CollectionUtils.isEmpty(section.getLogicList())) {
|
||||
|
@ -74,24 +74,12 @@ public class GroundAtpApiServiceImpl implements GroundAtpApiService {
|
||||
section.communicateTrainOccupy(train.isRight());
|
||||
}
|
||||
}));
|
||||
// 大铁逻辑
|
||||
if (simulation.getRepository().getConfig().isRailway()) {
|
||||
// 非通信车占用
|
||||
nctSectionMap.forEach(((train, sections) -> {
|
||||
for (Section section : sections) {
|
||||
section.nonCommunicateTrainOccupy(train.isRight());
|
||||
if (section.equals(train.getHeadPosition().getSection())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
nctSectionMap.forEach(((train, sections) -> {
|
||||
for (Section section : sections) {
|
||||
section.nonCommunicateTrainOccupy(train.isRight());
|
||||
}
|
||||
}));
|
||||
}
|
||||
// 信号机接近信息
|
||||
this.atpSectionService.changeSignalModeByTrainApproach(simulation, onlineTrainList, trainAtpSectionMap);
|
||||
|
||||
|
@ -409,8 +409,18 @@ public class CTCLogicLoop {
|
||||
private void loadSignRunPlanTrain(Simulation simulation) {
|
||||
// 没有加载过计划、始发计划、已发送至占线板、计划时间比当前时间相差5分钟
|
||||
simulation.getCtcRepository().getAllRunPlanList().stream()
|
||||
.filter(r -> !r.isLoad() && r.isStartRunPlan() && r.isSign() && r.getStatus() != -1
|
||||
&& r.getDepartRunPlan().getPlanTime().isBefore(simulation.getCorrectSystemTime().plusMinutes(5)))
|
||||
.filter(r -> {
|
||||
boolean valid = !r.isLoad() && r.isStartRunPlan() && r.isSign() && r.getStatus() != -1
|
||||
&& r.getDepartRunPlan().getPlanTime().isBefore(simulation.getCorrectSystemTime().plusMinutes(5));
|
||||
if (valid) {
|
||||
valid = !simulation.getRepository().getTrainInfoMap().values().stream()
|
||||
.anyMatch(trainInfo -> r.getDepartRunPlan().getTripNumber().equals(trainInfo.getTripNumber()));
|
||||
if (!valid) { // 如果列车已经上线,则直接修改状态
|
||||
r.setLoad(true);
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
})
|
||||
.sorted((r1, r2) -> r1.getDepartRunPlan().getPlanTime().isBefore(r2.getDepartRunPlan().getPlanTime()) ? -1 : 1)
|
||||
.forEach(r -> {
|
||||
Section section = r.getDepartRunPlan().getTrackSection();
|
||||
|
@ -103,6 +103,7 @@ public class StorageCtcRunPlanLog {
|
||||
if (this.arriveItemOtherInfo != null) {
|
||||
this.arriveItemOtherInfo.convertToObj(ctcStationRunPlanLog.getArriveRunPlan());
|
||||
}
|
||||
ctcRepository.addRunPlanToSimulationMap(ctcStationRunPlanLog);
|
||||
}
|
||||
|
||||
private void setDepartAndArrive(CtcRunPlanParam ctcRunPlanParam, CtcStationRunPlanLog.RunPlanItem runPlanItem, boolean arrive) {
|
||||
|
@ -17,6 +17,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -51,13 +52,12 @@ public class MemberManager {
|
||||
// 大铁CTC
|
||||
if (simulation.getRepository().getConfig().isRailway()) {
|
||||
// this.addRole(simulation, SimulationMember.Type.RAIL_CTC, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_ASSISTANT, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_MASTER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_SIGNALER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_PASSENGER, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_SWITCH_MAN, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_FACILITATOR, null, station);
|
||||
this.addRole(simulation, SimulationMember.Type.STATION_WORKER, null, station);
|
||||
Arrays.asList(
|
||||
SimulationMember.Type.STATION_ASSISTANT, SimulationMember.Type.STATION_MASTER,
|
||||
SimulationMember.Type.STATION_SIGNALER, SimulationMember.Type.STATION_PASSENGER,
|
||||
SimulationMember.Type.STATION_SWITCH_MAN, SimulationMember.Type.STATION_FACILITATOR,
|
||||
SimulationMember.Type.STATION_WORKER, SimulationMember.Type.DEVICE_MANAGER
|
||||
).forEach(type -> this.addRole(simulation, type, null, station));
|
||||
}
|
||||
}
|
||||
// 司机
|
||||
|
@ -177,6 +177,8 @@ public class SimulationMember extends club.joylink.rtss.simulation.SimulationMem
|
||||
STATION_FACILITATOR,
|
||||
/*** 车站工务工*/
|
||||
STATION_WORKER,
|
||||
/*** 设备管理员 **/
|
||||
DEVICE_MANAGER,
|
||||
}
|
||||
|
||||
public enum Gender {
|
||||
|
Loading…
Reference in New Issue
Block a user