Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-zhouyin

This commit is contained in:
tiger_zhou 2023-01-31 10:08:18 +08:00
commit 40875c44db
2 changed files with 21 additions and 3 deletions

View File

@ -340,6 +340,8 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
/**
* 生成调车进路
* 调车进路的始终端都应具备调车功能
* 调车进路不会越过进站信号机
*/
private void generateShuntingRoute(Assistant assistant, int iter) {
Signal startSignal = assistant.startSignal;
@ -358,8 +360,22 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
}
while (section != null) {
boolean outStation = false; //超出车站范围
Signal sdSignal = section.getSignalOf(right); //同向信号机
if (sdSignal != null) {
if (sdSignal.isReceivingDepartureSignal()) {
outStation = true;
}
sdSignal = sdSignal.hasShuntingFunction() ? sdSignal : null;
}
Signal tempOdSignal = section.getSignalOf(!right); //反向信号机
if (tempOdSignal != null) {
if (tempOdSignal.isReceivingDepartureSignal()) {
outStation = true;
}
tempOdSignal = tempOdSignal.hasShuntingFunction() ? tempOdSignal : null;
}
if (sdSignal != null) {
if (tempOdSignal == null) { //仅有同向信号机
assistant.endSignal = sdSignal;
@ -396,6 +412,10 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
break;
}
if (outStation) {
break;
}
Section next = section.getNextSection(right);
if (next == null) {
@ -501,7 +521,7 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
route.setType(Route.Type.SHUNTING);
String startEndSignalCode = route.getStart().getCode() + route.getDestination().getCode();
Route otherRoute = routeMap.get(startEndSignalCode); //同始终端信号机进路
if (otherRoute != null) { //选择反位道岔更少的/反位道岔更靠后的
if (otherRoute != null && Route.Type.SHUNTING.equals(otherRoute.getType())) { //选择反位道岔更少的/反位道岔更靠后的
int routeReverseSwitchQuantity = route.getReverseSwitchQuantity();
int otherRouteReverseSwitchQuantity = otherRoute.getReverseSwitchQuantity();
if (routeReverseSwitchQuantity < otherRouteReverseSwitchQuantity) { //选择反位道岔更少的

View File

@ -23,7 +23,6 @@ import club.joylink.rtss.vo.map.MapVO;
import club.joylink.rtss.vo.map.graph.MapMemberVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -780,7 +779,6 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
return fillFunctions;
}
@Nullable
private Supplier<RtsMapFunctionCreateVO> getEmergencyFunctionSupplier(long mapId, Set<String> systemNameSet, List<String> msgList, Simulation.Type simType) {
//应急调度指挥系统
Supplier<RtsMapFunctionCreateVO> system = () -> {