Compartmental models in epidemiology