fix(B05 노선 추천 창): 상한 풂 글 = 탐색 링크 한도 14 → N % 로 풂(지형상 못 이음 · 4 m 마디) · 도움말 「탐색 링크 한도를 풂」 (421-3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
This commit is contained in:
2026-10-18 13:32:07 +09:00
co-authored by Claude Opus 5.5
parent 06f10f5e9b
commit 0456c2d3d7
4 changed files with 11 additions and 7 deletions
@@ -602,12 +602,14 @@ export function endsLine(choice: InitialChoice | null): string {
return `시종점 높이 차가 상한을 넘음(평균 ${fixed(choice.endsGradePct ?? null, 1, "%")}) — 종단으로 못 맞춤 · 노선을 늘려야 함`;
}
/** 상한을 풀었을 때만 — 「지형상 14% 로 못 이어져 상한을 23.5% 로 풂」. 아니면 빈 글. */
/** 탐색 링크 한도를 풀었을 때만 — 「탐색 링크 한도 14.0 → 23.5% 로 풂(지형상 14.0% 로 못 이음 · 4 m 마디)」. 아니면 빈 글.
* 엔진 탐색 격자(4 m) 링크 기울기 한도 — 원지반 기울기(참고 · 측점 20 m)와 잣대가 다름(421-3). */
export function relaxedLine(choice: InitialChoice | null): string {
const bound = choice?.terrainBoundPct;
if (bound === null || bound === undefined) return "";
const limit = fixed(choice?.criteria?.maxGradePct ?? null, 1, "%");
return `지형상 ${limit} 로 못 이어져 상한을 ${fixed(bound, 1, "%")} 로 풂`;
const limitPct = choice?.criteria?.maxGradePct ?? null;
const limit = fixed(limitPct, 1, "%");
return `탐색 링크 한도 ${fixed(limitPct, 1, "")} → ${fixed(bound, 1, "%")} 로 풂(지형상 ${limit} 로 못 이음 · 4 m 마디)`;
}
/** 캐시에서 마지막 초기값을 읽는다. 없거나 꼴이 틀리면 null(= 예상노선 추적). */
@@ -130,8 +130,8 @@ const LINES_HELP: Array<{ name: string; text: string }> = [
text: "시점 · 종점 높이 차 ÷ 노선 연장이 상한을 넘으면 알림 — 종단으로 못 맞춤 · 노선을 늘려야 함",
},
{
name: "상한을 풂",
text: "지형상 상한 안으로는 시점 · 종점을 이을 수 없어 꼭 필요한 만큼만 상한을 올린 경우",
name: "탐색 링크 한도를 풂",
text: "노선 찾기(4 m 마디 원지반)에서 상한 안 링크로는 시점 · 종점을 못 이어 꼭 필요한 만큼만 링크 한도를 올린 경우 — 원지반 기울기(참고 · 측점 20 m)와 잣대가 달라 값이 다를 수 있음",
},
{
name: "거의 같은 노선",
@@ -105,7 +105,9 @@ def test_제약_못_지킨_구간과_상한_풂(results):
"제약 못 지킨 구간 7곳: No.0+0.0 R 5.0m(곡선 둘 자리 모자람)"
)
assert labels["violationsMany"].endswith(" 외 2곳")
assert labels["relaxed"] == "지형상 14.0% 로 못 이어져 상한을 23.5% 로 풂"
assert (
labels["relaxed"] == "탐색 링크 한도 14.0 → 23.5% 로 풂(지형상 14.0% 로 못 이음 · 4 m 마디)"
)
assert labels["notRelaxed"] == ""
@@ -233,7 +233,7 @@ def test_제약_못_지킨_구간이_목록과_화면_줄에(rounds):
assert applied["violations"].startswith(head), applied["violations"]
if answer.get("relaxed"):
bound = f"{answer['terrain_bound_pct']:.1f}%"
assert applied["relaxed"].endswith(f"상한을 {bound} 로 풂"), applied["relaxed"]
assert f"→ {bound} 로 풂(" in applied["relaxed"], applied["relaxed"]
else:
assert applied["relaxed"] == ""
smooth = answer["criteria"]["grade_smooth_m"]