25 lines
1015 B
Python
25 lines
1015 B
Python
"""问题二候选集 K1 的统一构造(三个方法共用同一输入,保证配对公平)。
|
|
|
|
K1 = Ω ∩ W(s, θ ± δ_eff) ∩ B(s, 1500),δ_eff = 题设 1° + 示向度舍入裕量。
|
|
生产实现用"圆盘外切多边形 ∩ 半平面"的保守外包(``CandidateRegion``),
|
|
圆盘用外切多边形严格外包,保证真源不丢。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from mcm26b.belief import CandidateRegion
|
|
from mcm26b.config import ProblemConfig, Vec2
|
|
|
|
from project.common import problem_config
|
|
|
|
|
|
def first_bearing_region(case: dict,
|
|
config: ProblemConfig | None = None) -> CandidateRegion:
|
|
config = config or problem_config()
|
|
field, search = config.field, config.search
|
|
half_angle = field.bearing_error_half_deg + search.bearing_rounding_margin_deg
|
|
station: Vec2 = (case["station"][0], case["station"][1])
|
|
region = CandidateRegion.initial(station, config)
|
|
region.clip_wedge(station, case["bearing_deg"], half_angle)
|
|
return region
|