sample a subset of individuals who will receive treatment. The subset is allways smaller than the limit of treatments available minus those already receiving treatment

allocate_treatment(variables, need_treatment, treated_state, limit)

Arguments

variables

Model variables

need_treatment

a individual::Bitset of individuals who need treatment

treated_state

a list states for individuals receiving treatment

limit

the number of individuals who can receive treatment