Skip to content

Remove is_in_microsim checks from benefit variables #7331

@MaxGhenis

Description

@MaxGhenis

Summary

Following PR #7326 which moved all stochastic randomness to the data package, benefit variables no longer need special is_in_microsim handling for takeup.

Since takeup variables now have default_value = True, we can always multiply by takeup:

  • Individual simulation: takeup defaults to True (1), benefit unchanged
  • Microsimulation: data package sets actual takeup values

Files to update

snap.py still has:

is_in_microsim = hasattr(spm_unit.simulation, "dataset")
...
if is_in_microsim:
    return value * takes_up
else:
    return value

Should be simplified to:

return value * takes_up

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions