The longest distance between photovoltaic panels and batteries