jackolney / CareCascade

CareCascade Model Repository
0 stars 0 forks source link

Improvement to interventions.cpp #27

Closed jackolney closed 9 years ago

jackolney commented 9 years ago

After calibration of the model, involving changing toolbox.cpp I need to update the values in interventions.cpp as care seeking rates / linkage rates are all based on the original value. As the "intervention script" is run for all individuals, if I just put in a ((1-x)/2)+x type function then each person reduces the value of the original.

Two potential solutions:

  1. Allow interventions to be global i.e. using a population pointer (not a person pointer), then randomly pick individuals to apply the intervention to - from the people .
  2. Alternatively, create an 'original' set of parameter values, and then each person uses a copy of that parameter value, so if halving a value, the original would always exist so the value wouldn't mess up.

Option two is easy but option one is much neater. Perhaps leave for development over Christmas.

jackolney commented 9 years ago

Updated. went with option 2 as the intervention startTime varies for individuals (as people born after the interventions start...)