| | |
| | | return pathLenFactor; |
| | | } |
| | | |
| | | enum RerouteSceneType { |
| | | RUN_BLOCK_REROUTE, |
| | | IDLE_RECOVER, |
| | | OUT_ORDER, |
| | | WATCH_CIRCLE |
| | | } |
| | | |
| | | static final class RerouteDecision { |
| | | private final boolean skip; |
| | | private final String skipReason; |
| | | private final Integer targetStationId; |
| | | |
| | | private RerouteDecision(boolean skip, String skipReason, Integer targetStationId) { |
| | | this.skip = skip; |
| | | this.skipReason = skipReason; |
| | | this.targetStationId = targetStationId; |
| | | } |
| | | |
| | | static RerouteDecision skip(String reason) { |
| | | return new RerouteDecision(true, reason, null); |
| | | } |
| | | |
| | | static RerouteDecision proceed(Integer targetStationId) { |
| | | return new RerouteDecision(false, null, targetStationId); |
| | | } |
| | | |
| | | boolean skip() { |
| | | return skip; |
| | | } |
| | | |
| | | String skipReason() { |
| | | return skipReason; |
| | | } |
| | | |
| | | Integer targetStationId() { |
| | | return targetStationId; |
| | | } |
| | | } |
| | | |
| | | private static class OutOrderDispatchDecision { |
| | | private final Integer targetStationId; |
| | | private final boolean circle; |