Optimal Configuration and Placement of PV Systems in Building Roofs with Cost Analysis