Local electricity market designs for peer-to-peer trading: The role of battery flexibility