For the code here
if(maxSR | maxSTARR | CSMratio) cvxr_wts <- cvxr_wts / sum(cvxr_wts)
cvxr_wts <- as.vector(cvxr_wts)
cvxr_wts <- normalize_weights(cvxr_wts)
If the optimization ends up with weights that sum to near zero or zero the line that divides by the sum could cause NA or very large values. Would it be alright if I made a PR to add something like a stick breaking scheme (example here) that would avoid the division?