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 19 forks source link

Variable uprating caused nan #235

Closed CalebPena closed 1 month ago

CalebPena commented 1 month ago

The following test fails for social_security_disability and social_security_retirement but not social_security_dependents and social_security_survivors because there uprating is commented out. The problem is that the if statement on line 661 of policyengine_core/simulations/simulation.py caused array to not be set.

- name: Test social security adds
  input:
    social_security_survivors:
      2024: 0
    social_security_dependents:
      2024: 0
    social_security_retirement:
      2024: 0
    social_security_disability:
      2024: 0
  output:
    social_security_dependents:
      2023: 0
    social_security_survivors:
      2023: 0
    social_security_disability:
      2023: 0
    social_security_retirement:
      2023: 0

@MaxGhenis I don't know how to test this in the core package, but I tested in policyengine-us and it fixed the problem.

Related to https://github.com/PolicyEngine/policyengine-us/issues/4835