Optimal Design of a Hybrid Solar PV/BG-Powered Heterogeneous Network