simulate_infections function

Simulate infections using the renewal equation