The run() method takes the following arguments:
dataset which determines weights for the allocation.
control_totals that specifies the total amount to be allocated.
If it is not given, the value of outcome_attribute is taken.
control_totals on which the filtering
of the current year is done. Default is 'year'.
dataset specifying capacity for each member.
Default is None which means there are no capacity restrictions.
outcome_attribute exists in dataset,
the resulting values are added to the current values of
outcome_attribute. Default is False.
In addition to the year_attribute and control_total_attribute, the control_totals dataset
can contain other attributes that must be known to the dataset (such as a geography), here called 'common' attributes.
For each row of the control_totals that matches the current year,
the total amount is distributed among members of dataset that have the same values of all common attributes as the row.
The distribution is done using the given weights.
If the capacity_attribute is given, the algorithm removes any allocations that exceeds the capacity and
re-distributes it among remaining members. The resulting values are appended
to dataset as
outcome_attribute which is marked as primary.
If add_quantity is True, the resulting values are added to the current values of
outcome_attribute if it exists.
The outcome_attribute is then flushed to cache and the values are returned.