Part of new implementation of Loss of Load Probability calculation

See https://github.com/quintel/etsource/issues/713.