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
{{ message }}
Repository navigation
Household calculations and household reports apply a dynamic, and every simulation refuses another country's dynamic #1112
Household jobs and household reports always store dynamic_id as null, so a household calculation can't apply model assumptions: labour-supply elasticities, net-income definitions and the other parameters under gov.simulation. Economy simulations already apply them, by merging the dynamic's values into the policy's (combine_reforms).
API v1's revision 9d1d12a7ac58 (PolicyEngine/policyengine-api#4325, merged as 003ee4996) gives every dynamic a country. Sim's model of dynamics declares only id, so sim can't refuse a dynamic stored for another country. Its test helper insert_dynamic still writes dynamics.name, which that revision drops.
Done when:
POST /household-calculations takes a dynamic_id, stores it in household_jobs.dynamic_id, returns it in the job's state, and applies its values with the policy's.
Each side of a household report, and of its re-run, takes a dynamic_id. The side's simulation stores it, its key names it, and its values are applied with the side's policy.
Every simulation, economy and household alike, refuses a dynamic stored for another country as unknown_dynamic.
libs/policyengine-simulation-persistence/public-api-commit names 003ee49965a2190e0e5c78f7e946b4bb100c0f16, and the comparison with API v1's tables passes there.
Activity