  We propose a mathematical model with five compartments for the SARS-CoV-2
transmission: susceptible $S$, undetected infected asymptomatic $A$, undetected
infected symptomatic $I$, confirmed positive and isolated $L$, and recovered $
R$, for which we have a twofold objective. First, we formulate and solve an
inverse problem focusing mainly on the identification of the values $A_{0}$ and
$ I_{0}$ of the undetected asymptomatic and symptomatic individuals, at a time
$t_{0}$, by available measurements of the isolated and recovered individuals at
two succeeding times, $ t_{0}$ and $ T>t_{0}.$ Simultaneously, we identify the
rate standing for the average number of individuals infected in unit time by an
infective symptomatic individual. Then, we propose a control problem aiming at
controlling the infected classes by improving the actions in view of isolating
as much as possible the populations $ A$ and $ I$ in the class $ L$. These
objectives are formulated as minimization problems, the second one including a
state constraint, which are treated by an optimal control technique. The
existence of optimal controllers is proved and the first order necessary
conditions of optimality are determined. For the second problem, they are
deduced by passing to the limit in the conditions of optimality calculated for
an appropriately defined approximating problem. In this case, the dual system
is singular and has a component in the space of measures. The discussion of the
asymptotic stability of the system done for the case when life immunity is
gained reveals an asymptotic extinction of the disease, with a well determined
reproduction number.
