gendesign/backend/app/services/generative
Light1YT 94cf1f6217 feat(concept): house-type catalog + program-driven placement (#1965 Stage 3a)
Extend the concept generator so ConceptInput can carry an optional
building_program (list of typed houses from a catalog). When present,
placement lays out EXACTLY that program — for each item, place `count`
sections of the catalog footprint at the item's floors — instead of the
greedy max-FAR coverage-cap sweep. When absent, the existing greedy
behavior is unchanged (byte-for-byte backward-compatible).

- catalog.py: hardcoded HOUSE_TYPES (panel_econom, monolith_comfort,
  tower_business, lowrise_comfort, townhouse) — sane-default catalog,
  promote to DB later; get_house_type / available_section_types lookups.
- schema: additive BuildingProgramItem {section_type, floors, count} and
  ConceptInput.building_program (default None -> greedy). ConceptVariant
  gains optional placed_count / requested_count (partial-fit signal).
- placement: shared _Placer (collision/STRtree/setback machine extracted
  from greedy sweep, reused — no duplication); place_program +
  place_program_variant; branch in place_all_strategies on
  building_program. Mixed-floor TEAP via exact per-floor-group aggregation
  (GFA = sum(area_i * floors_i), no rounding drift).
- partial fit: when the parcel can't fit all sections, place as many as
  fit and report placed_count < requested_count (no hard-422); zero-fit
  still raises ParcelGeometryError (-> 422).
- API: validate program section_type keys against the catalog (unknown ->
  422) before placement.
- tests: catalog integrity, greedy backward-compat, exact 2-item program +
  TEAP reflection, over-packed partial placement, API program path.
- regenerate frontend api-types.ts (OpenAPI codegen gate stays green).
2026-06-28 01:29:04 +05:00
..
exporters feat(financial): ground-floor нежилое (office/commercial) tranche 2026-06-25 11:40:01 +00:00
__init__.py feat(generative): движок концепций Stage 1a/1b/1c (#54 #55 #56) 2026-06-13 21:32:32 +05:00
catalog.py feat(concept): house-type catalog + program-driven placement (#1965 Stage 3a) 2026-06-28 01:29:04 +05:00
financial.py feat(financial/dcf): dormant separate-index inflation capability (default OFF) 2026-06-25 12:12:02 +00:00
geometry.py feat(generative): calibrate finmodel sale price from Objective market data (epic #1881 PR-2) 2026-06-23 21:10:25 +05:00
placement.py feat(concept): house-type catalog + program-driven placement (#1965 Stage 3a) 2026-06-28 01:29:04 +05:00
teap.py feat(generative): LIVE financial recompute from massing program (#1965 Stage 2a) 2026-06-28 00:27:25 +05:00