Determine how many controls should be chosen from each stratum to minimize
the distance between the strata of the chosen controls and those that were desired.
Used within generate_qs().
presolve_EMD(S, desired_qs, max_s, strata_dist_flat)A named vector with names identical to those of desired_qs and
elements containing the number of controls to select from the given stratum.
the total number of strata.
a named vector containing the number of controls desired in each stratum with names matching the strata names.
a vector containing the maximum number of controls that should
be selected in each stratum. The order of the strata should match that of desired_qs.
a flattened distance matrix between the strata.