Diffusion in the electrolyte and charge-transfer reaction at the platinum electrode in dye-sensitized solar cells