Skip to content

Reconciliation

Romesh Abeysuriya edited this page Mar 20, 2018 · 2 revisions

This page is out of date, as the new reconciliation script has been merged

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 by asd()
  • 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

  1. Use regenerateAttributesDict to map the new_attributes array being optimized by ASD onto a dictionary with the same format as program attributes. The terminology is misleading because the attribute_dict contains unit costs and budget values as well, whereas in the context of a program, an attribute refers specifically to the local internal quantities used in the program's impact functions
  2. 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.
  3. 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 populates prog_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 in preCalculateProgsetVals.
  4. 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, in reconcileFunc() the simulation end year is changed to the reconcile_for_year so this corresponds
  5. The objective function is obtained by taking the sum of squared differences between the Parset values and the Progset values. An additional term is added which is the frac_dt_cov if frac_dt_cov > 1 - this serves to increase the value of the objective function if the program is overfunded.
Clone this wiki locally