Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up branch calculations by reimplementing neutralize #300

Open
nikhilwoodruff opened this issue Oct 29, 2024 · 0 comments
Open

Speed up branch calculations by reimplementing neutralize #300

nikhilwoodruff opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nikhilwoodruff
Copy link
Contributor

Currently, when a simulation branches, we can choose to either:

  • Clone the tax-benefit system (policy) to make it fully independent from the original TBS (at a cost of the TBS initialisation, often a few seconds)
  • Leave attached to the original TBS

For labour and capital gains responses, we need to create branches to measure marginal tax rates. In those branches, we have to neutralise the behavioural response variables (in order to avoid an infinite loop). Neutralisation is a change to the tax benefit policy, not the simulation data, so we need to clone the TBS. But we could implement an alternative neutralisation as a change to data not policy, by saying that instead of:

  • Neutralise(variable) -> adjust the simulation logic to always return 0
  • Neutralise(variable) -> set the simulation input data to include an array of zeros (size of entity population)

Then the LSR and CG branches wouldn't need to clone the TBS.

@nikhilwoodruff nikhilwoodruff added the enhancement New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant