A comparative study of optimization of solid state dye sensitized solar cell technologies for power grid integration and off-grid operation