  Until a vaccine or therapy is found against the SARS-CoV-2 coronavirus,
reaching herd immunity appears to be the only mid-term option. However, if the
number of infected individuals decreases and eventually fades only beyond this
threshold, a significant proportion of susceptible may still be infected until
the epidemic is over. A containment strategy is likely the best policy in the
worst case where no vaccine or therapy is found. In order to keep the number of
newly infected persons to a minimum, a possible strategy is to apply strict
containment measures, so that the number of susceptible individuals remains
close to herd immunity. Such an action is unrealistic since containment can
only last for a finite amount of time and is never total. In this article,
using a classical SIR model, we determine the (partial or total) containment
strategy on a given finite time interval that maximizes the number of
susceptible individuals over an infinite horizon, or equivalently that
minimizes the total infection burden during the curse of the epidemic. The
existence and uniqueness of the optimal strategy is proved and the latter is
fully characterized. If applicable in practice, such a strategy would lead
theoretically to an increase by 30% of the proportion of susceptible on an
infinite horizon, for a containment level corresponding to the sanitary
measures put in place in France from March to May 2020. We also analyze the
minimum intervention time to reach a fixed distance from herd immunity, and
show the relationship with the previous problem. Simulations are provided that
illustrate and validate the theoretical results.
