feat(simulation): road-graph hub refinement — scaled-cap hubs, co-location collapse, minor-attach edge split, RailHeadFacing (T-1076)
is_standalone_hq threaded through CityRecord/CityPlacement via corporations LEFT JOIN (both readers); hubs = top-cap by population among non-HQ settlements (HUB_SPACING_DIAG_PX=64, HUB_CAP_MIN=6); exact-name collapse keeping lowest city_id with loud warn; nearest-point-on-polyline snap (SNAP_MAX_PX=8) with Junction edge-split preserving from<to via norm_edge, else A*-spur to nearest hub; FoundingOrientation::RailHeadFacing{bearing_degrees} assigned at degree>=3 junctions (octant bearing toward dominant incident edge), consumed by skeleton_gen railhead_edge() through the D-234b flush-frontage machinery; believability reader now honours baked settlement_class (stale hardcode since T-1075). 11 new targeted tests; existing suites green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -410,6 +410,16 @@ pub enum FoundingOrientation {
|
||||
Cardinal,
|
||||
/// Arbitrary bearing (pioneer settlements on open terrain). `bearing_degrees`: 0–359.
|
||||
Free { bearing_degrees: u16 },
|
||||
/// Street grid faces the settlement's rail head (D-213 amended, T-1076 §4).
|
||||
/// Assigned POST-placement by the Layer-2 road-graph pass
|
||||
/// (`road_graph::assign_railhead_orientations`) — never by the attractor
|
||||
/// match — to settlements that are high-connectivity junctions
|
||||
/// (`RoadGraph::high_connectivity_junctions`, degree ≥ 3, per the D-213
|
||||
/// workshop source paula-round3.md). `bearing_degrees`: octant-snapped
|
||||
/// compass bearing (0–359, 0 = N, clockwise; integer octants only, D-010)
|
||||
/// from the settlement toward the dominant (longest) incident road/rail
|
||||
/// edge — the direction the freight frontage faces.
|
||||
RailHeadFacing { bearing_degrees: u16 },
|
||||
}
|
||||
|
||||
/// Who maintains an inter-settlement road/rail edge — readable in the road's
|
||||
|
||||
Reference in New Issue
Block a user