You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the Simulation/Report architecture to support household-level impact analysis, allowing users to run household simulations and compare baseline vs reform scenarios.
Summary
Extend the Simulation/Report architecture to support household-level impact analysis, allowing users to run household simulations and compare baseline vs reform scenarios.
Dependencies
Scope
Model Changes
Simulation model:
SimulationTypeenum (HOUSEHOLD, ECONOMY)simulation_typefield with default 'economy'dataset_idnullable (was required)household_idFK to householdshousehold_resultJSONB column for storing calculation outputReport model:
report_typefield (household_single, household_comparison, economy_single, economy_comparison)New Endpoints
POST /analysis/household-impact- Run household impact analysispolicy_idis None: single run under current lawpolicy_idis set: comparison (baseline vs reform)GET /analysis/household-impact/{report_id}- Get household impact resultsImpact Computation
Support all entity types for both countries:
Database
20260203000002_simulation_household_support.sqlKey Features
_calculate_household_uk()and_calculate_household_us()functionshousehold_resultJSONB on Simulation (not Dataset)Acceptance Criteria