The stochastic generalized bin packing problem