gendesign/backend/app/services/generative
Light1YT d38d5d43c5 feat(generative): LIVE financial recompute from massing program (#1965 Stage 2a)
Stage 2a of epic #1953: backend service + endpoint for live economic recompute
driven by the interactive 3D massing (Stage 2b debounced sliders).

- teap.py: add pure synthesize_teap_from_program(total_footprint_sqm, floors,
  site_area_sqm, housing_class, sections) — builds a TEAP from the SCALAR
  aggregate footprint × floors, mirroring synthesize_teap_from_buildability and
  reusing the same shared norm constants (_OFFICE_SHARE_OF_GFA / _EFFICIENCY_BY_CLASS
  / _AVG_APARTMENT_SQM / _PARKING_PER_APARTMENT) — single source of truth.
- schemas/concept.py: add MassingProgram (program contract, optional pre-resolved
  market_price_per_sqm + parcel_centroid_wkt) and MassingRecomputeOutput (teap + financial).
- api/v1/concepts.py: add POST /api/v1/concepts/recompute — synthesize TEAP → run
  the existing pure compute_financial. FAST path uses body market_price_per_sqm
  (no DB); else _lookup_market_price by centroid via run_in_threadpool; else class norm.
- tests: synthesize_teap_from_program (gfa math, parity with compute_teap, class
  efficiency, sections no-op) + endpoint (200, coherent output, price passthrough
  skips DB, DB fallback, class-norm default, floors validation).
2026-06-28 00:27:25 +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
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(finmodel): monthly DCF — real NPV/IRR/PBP, replace IRR-proxy (epic #1881 PR-3) 2026-06-23 21:52:04 +05:00
teap.py feat(generative): LIVE financial recompute from massing program (#1965 Stage 2a) 2026-06-28 00:27:25 +05:00