-
Notifications
You must be signed in to change notification settings - Fork 0
Reconciliation
As described in Programs, when programs are active, between the program start and program end year, the programs system is responsible for supplying the link parameter values. There is a hard changeover at the program start time, when the link parameter switches from the original value computed from data, to the value computed by the programs based on spending, unit cost/coverage, and impact function. If there are any discrepencies in the original parameter value and the parameter value supplied by the programs, a discontinuity will occur that can lead to sharp changes in compartment size. The goal of reconcilation is to reduce/eliminate these discontinuities.
Reconciliation is able to update
- The unit cost
- The budget
- Program attributes
Reconciliation is performed by a single call to asd()
which optimizes reconciliationMetric()
. The arguments passed in for reconciliation are
-
new_attributes
- An array of values optimized byasd()
-
proj
- A project object -
parset
- A ParameterSet -
progset
- A ProgramSet parset_name
impact_pars
results
attribute_dict
reconcile_for_year
compareoutcome
prog_budget_alloc
constrain_budget
Changes to the simulation are accomplished via updateProgset
which inserts new values into the ProgramSet
as the optimization progresses. The contents of this function reflects the fact that
- The unit cost, budget, and attributes are the quantities available for optimization
- A subset of programs can be reconciled, but for each program being reconciled, all three variables are updated
- Optimization of budget and attributes takes place only for a single year. Note that the unit cost is reconciled in its entirety, which makes it look like the unit cost is always a single number (although the databook allows input of a time-varying unit cost, so it is also possible that this situation has not yet been encountered when running reconcilation)
The process in reconciliationMetric
is
- Use
regenerateAttributesDict
to map thenew_attributes
array being optimized byASD
onto a dictionary with the same format as program attributes. The terminology is misleading because theattribute_dict
contains unit costs and budget values as well, whereas in the context of a program, anattribute
refers specifically to the local internal quantities used in the program's impact functions - If the budget is constrained, then this means that the total amount of money spent on all programs is fixed. Check this - it looks like the amount of money that is conserved is the amount of money allocated to the programs that are being optimized. So this normalization does not affect programs that are not contributing to the parameter in question.
- Ultimately, we have an updated
ProgramSet
object which then goes through a copy of the coverage decomposition calculation, which is only performed for the year in question. Ultimately this populatesprog_attributes[popkey][par_label]['Coverage Cap Impact Value']
with the value of the impact parameter for a given population and parameter. Note that['Original Impact Value']
corresponds to the impact value for complete coverage that would normally be computed inpreCalculateProgsetVals
. - The corresponding parameter attributes dictionary is also filled by interpolation etc. of the data parameters in
ParameterSet
. Note that while the last entry in the interpolated parameters is used, inreconcileFunc()
the simulation end year is changed to thereconcile_for_year
so this corresponds - The objective function is obtained by taking the sum of squared differences between the
Parset
values and theProgset
values. An additional term is added which is thefrac_dt_cov
iffrac_dt_cov > 1
- this serves to increase the value of the objective function if the program is overfunded.