Optimal storage for solar energy self-sufficiency