  We introduce a general system of ordinary differential equations that
includes some classical and recent models for the epidemic spread in a closed
population without vital dynamic in a finite time horizon. The model is
vectorial, in the sense that it accounts for a vector valued state function
whose components represent various kinds of exposed/infected subpopulations,
with a corresponding vector of control functions possibly different for any
subpopulation. In the general setting, we prove well-posedness and positivity
of the initial value problem for the system of state equations and the
existence of solutions to the optimal control problem of the coefficients of
the nonlinear part of the system, under a very general cost functional. We also
prove the uniqueness of the optimal solution for a small time horizon when the
cost is superlinear in all control variables with possibly different exponents
in the interval (1,2]. We consider then a linear cost in the control variables
and study the singular arcs. Full details are given in the case n=1 and the
results are illustrated by the aid of some numerical simulations.
