A partial Lagrangian approach to mathematical models of epidemiology.