feat(b09): 치즐 소모량 — 자원 목록 AR-M 치즐(본) · 대형브레이커 줄 옆 본/hr ÷ Q × 배분으로 같은 D 에 붙음(수동 단가가 있을 때만) · 칸을 채우면 치즐 13공종 온전 · 9-4-1 평균 갈래는 원문에 치즐 평균이 없어 사유

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
2026-09-14 12:53:32 +09:00
co-authored by Claude Opus 5
parent 2b464138ae
commit 6b083ce3c5
5 changed files with 240 additions and 5 deletions
+29 -5
View File
@@ -106,12 +106,22 @@ def _add_rock_leaf(build: Any, node: dict[str, Any]) -> None:
+ (f" (기계 단가 층 없음: {', '.join(missing)})" if missing else "")
)
return
variants = [(rock, q, f"작업능력 Q = {q} ㎥/hr ({rock})") for rock, q, _ in rows]
from B09_Estimation.B09_Estimation_Chisel import (
CHISEL_AVERAGE_NOT_GIVEN,
CHISEL_MISSING,
attach_chisel,
)
variants = [(rock, q, f"작업능력 Q = {q} ㎥/hr ({rock})", chisel) for rock, q, chisel in rows]
if code in AVERAGE_BASIS:
# 평균 Q 도 **소수 2자리로 확정**한 뒤 나눔(명세 7장) — (5.0+3.4+2.6)/3 = 3.67.
# ⚠ 치즐 평균은 원문에 없어 안 붙임(None) — 지어내지 않고 사유로 남김.
average = fix2(sum((q for _, q, _ in rows), Decimal(0)) / Decimal(len(rows)))
variants.append((AVERAGE_VARIANT, average, f"Q = {average} ㎥/hr — {AVERAGE_BASIS[code]}"))
for variant, capacity, note in variants:
variants.append(
(AVERAGE_VARIANT, average, f"Q = {average} ㎥/hr — {AVERAGE_BASIS[code]}", None)
)
attached = False
for variant, capacity, note, chisel in variants:
title_code = f"B-{code}#{variant}"
build.book.add_title(
PriceTitle(
@@ -131,9 +141,23 @@ def _add_rock_leaf(build: Any, node: dict[str, Any]) -> None:
f"{note} · {source}",
output=capacity,
)
# 치즐 — 암질마다 표의 본/hr ÷ Q(수동 단가가 들어와 치즐 제목이 섰을 때만).
attached = attach_chisel(build.book, title_code, chisel, capacity) or attached
build.variants.setdefault(code, []).append(variant)
# 표 줄은 다 읽었다 — 남는 것은 치즐뿐(자재 카탈로그가 없어 금액에 안 붙는 알려진 미결).
build.unattached[code] = ["치즐소모량(본/hr) — 자재 단가 층 없음"] if rows[0][2] else []
# 표 줄은 다 읽었다 — 남는 것은 치즐뿐. 단가가 없으면 못 붙은 줄, 붙었으면 평균 갈래 사유만.
if rows[0][2]:
# 암질 표는 치즐이 열이라 「치즐소모」 줄로 안 잡힘 — 「자재 단가」 탭 쓰이는 곳에 올림.
from B09_Estimation.B09_Estimation_Chisel import CHISEL_CODE
uses = build.material_uses.setdefault(CHISEL_CODE, [])
if code not in uses:
uses.append(code)
if not rows[0][2]:
build.unattached[code] = []
elif not attached:
build.unattached[code] = [CHISEL_MISSING]
else:
build.unattached[code] = [CHISEL_AVERAGE_NOT_GIVEN] if code in AVERAGE_BASIS else []
def _step_titles(build: Any, step: str) -> dict[str, str]: