Optimization of The Energy Systems of Residential Buildings Using PV, Heat Pump and Battery Technology