PolicyEngine / policyengine-core

Core microsimulation engine for PolicyEngine models. Forked from OpenFisca-Core.
https://policyengine.github.io/policyengine-core
GNU Affero General Public License v3.0
14 stars 20 forks source link

`mark_as_modified` doesn't work correctly with scale parameters #232

Open anth-volk opened 2 months ago

anth-volk commented 2 months ago

For example, say I want to take an Alabama state income tax bracket and run the mark_as_modified() method upon it. It appears that gov.states.al.tax.income.rates[1] doesn't recognize gov.states.al.tax.income.rates as its parent, thereby preventing mark_as_modified() from recursing further up the tree.

The downstream impact of this is that, if I wanted to use cached values while calculating (assuming all other current issues we have with state-level caching were gone), the simulation wouldn't correctly recurse all the way to gov.states, thereby giving an erroneous output for household_state_income_tax.