Optimizing rainwater harvesting systems in urban areas