Lolp calculation

Part of https://github.com/quintel/etsource/issues/713.