  In this paper, we study an optimal control problem of a communicable disease
in a prison population. In order to control the spread of the disease inside a
prison, we consider an active case-finding strategy, consisting on screening a
proportion of new inmates at the entry point, followed by a treatment depending
on the results of this procedure. The control variable consists then in the
coverage of the screening applied to new inmates. The disease dynamics is
modeled by a SIS (susceptible-infected-susceptible) model, typically used to
represent diseases that do not confer immunity after infection. We determine
the optimal strategy that minimizes a combination between the cost of the
screening/treatment at the entrance and the cost of maintaining infected
individuals inside the prison, in a given time horizon. Using the Pontryagin
Maximum Principle and Hamilton-Jacobi-Bellman equation, among other tools, we
provide the complete synthesis of an optimal feedback control, consisting in a
bang-bang strategy with at most two switching times and no singular arc
trajectory, characterizing different profiles depending on model parameters.
