Optimal schemes are derived by minimizing conditional value-at-risk. The underlying integer nonlinear programming problem is stated and solved. The proposed risk management approach helps to avoid unacceptably large costs. Practitioners’ attitude towards risk is taken into account. Producer and consumer risks are also controlled in advance.