get_stacking_weights function

Optimal stacking weights