Skip to content

Commit

Permalink
Allow weight update in reforms
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainipp committed Dec 11, 2024
1 parent 70b6d36 commit 686dd55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openfisca_survey_manager/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def __init__(self, simulation, target_margins, period, target_entity_count = Non
self.filter_by = numpy.array(1.0)

assert weight_name is not None, "A calibration needs a weight variable name to act on"
weight_variable = simulation.tax_benefit_system.variables[weight_name]
weight_variable.unit = ""
self._initial_weight_name = weight_name + "_ini"
self.initial_weight = initial_weight = simulation.calculate(weight_name, period = period)

Expand Down

0 comments on commit 686dd55

Please sign in to comment.