- 알약 = 예상노선 추적(종단 없음) · 영선 · 토공 최소 · 기울기 최소 · 비중 계산(넷은 종단 늘 반영) · 안전 우선 · 계류 횡단 최소 · 공사비 어림 최소 화면에서 뺌 - 「종단 반영」 켬/끔 단추 없앰(추천 창 · 종단 띠) — 띠 · [확인]은 지금 추천 갈래로 종단 여부 - ✕ 없애고 [적용] · [닫기]를 제목줄 오른쪽 위로 · 옵션 칸은 지도 왼쪽 위 작은 겹창 · 창 폭 넓힘 - 적용한 추천 갈래가 있으면 창을 다시 열 때 그 갈래가 골라진 채 - 도움말: 종단 반영 = 측점마다 횡단을 보고 정한 종단(적분값 아님) - 균형 종단 단면적에 곡선부 확폭(B05 측점 생성과 같은 셈) — 빼서 확정 뒤 성토가 1.7배 벌어졌음(노선 267 같은 계획고: 성 10,102 → 17,819 · 본 설계 16,140) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EMfGERKUg5nMMNQsyVZ2j
37 lines
1.5 KiB
Python
37 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""노선 추천 균형 종단에 곡선부 확폭 — PLAN 77-7.
|
|
|
|
빼면 확정 뒤 본 설계(확폭 있음)와 성토가 1.7배로 벌어졌다(랩탑 메인 노선 267 실측).
|
|
추천 측점 확폭 = B05 측점 생성과 같은 `_plan_radii` · `_curve_widenings`.
|
|
"""
|
|
|
|
import numpy as np
|
|
|
|
from B05_Profile.B05_Profile_Engine_RouteInitial_Profile import _widenings
|
|
from config.config_system_design import curve_widening_m
|
|
|
|
|
|
def _route() -> tuple[np.ndarray, np.ndarray, np.ndarray]:
|
|
straight = [(x, 0.0) for x in np.arange(0.0, 60.0, 2.0)]
|
|
radius = 15.0
|
|
arc = [
|
|
(60.0 + radius * np.sin(t), radius - radius * np.cos(t))
|
|
for t in np.linspace(0.0, np.pi / 2, 30)
|
|
]
|
|
xy = np.asarray(straight + arc + [(75.0, 15.0 + d) for d in np.arange(2.0, 60.0, 2.0)])
|
|
chain = np.concatenate([[0.0], np.cumsum(np.hypot(*np.diff(xy, axis=0).T))])
|
|
at = np.append(np.arange(0.0, chain[-1], 5.0), chain[-1])
|
|
return xy, chain, at
|
|
|
|
|
|
def test_곡선_측점은_확폭_직선은_없음():
|
|
xy, chain, at = _route()
|
|
rows = _widenings(xy, chain, at)
|
|
assert len(rows) == len(at)
|
|
on_curve = [row for a, row in zip(at, rows) if 64.0 < a < 80.0]
|
|
assert on_curve and all(row["curve_widening_m"] > 0 for row in on_curve)
|
|
assert max(row["curve_widening_m"] for row in on_curve) == curve_widening_m(15.0)
|
|
assert all(row["curve_outer_side"] in ("left", "right") for row in on_curve)
|
|
straight = [row for a, row in zip(at, rows) if a < 40.0]
|
|
assert all(row["curve_widening_m"] == 0 for row in straight)
|