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

Soft definition periods #118

Open
nikhilwoodruff opened this issue Oct 2, 2023 · 0 comments
Open

Soft definition periods #118

nikhilwoodruff opened this issue Oct 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nikhilwoodruff
Copy link
Contributor

Definition periods in PolicyEngine Core are fixed: each variable must have exactly one time period for which it can have distinct values. Policy in country models often involves mid-year parameter changes or other ways that more flexible time period management might be useful.

Core has some shortcuts for this (e.g. set_input_divide, options=[ADD, DIVIDE]) but a more elegant solution to reduce the development burden on country models would just be to simplify all this into more autonomous Simulation behaviour: e.g. if I said my employment income was £30,000 per year, calculate my income tax in March, we really shouldn't need any country-specific logic describing how the time periods interact with each other here. The only thing we need to specify at the country level is whether each variable is a stock or a flow, because this implies different behaviour is correct:

  • wealth in 2022 is 450k => wealth in 2022-01 is 450k
  • income in 2022 is 30k => income in 2022-01 is 2.5k
@nikhilwoodruff nikhilwoodruff added the enhancement New feature or request label Oct 2, 2023
@nikhilwoodruff nikhilwoodruff self-assigned this Oct 2, 2023
@nikhilwoodruff nikhilwoodruff removed their assignment Sep 25, 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