Optimal scenario set partitioning for multistage stochastic programming with the progressive hedging algorithm