  Compartmental epidemic models are among the most popular ones in
epidemiology. For the parameters (e.g., the transmission rate) characterizing
these models, the majority of researchers simplify them as constants, while
some others manage to detect their continuous variations. In this paper, we aim
at capturing, on the other hand, discontinuous variations, which better
describe the impact of many noteworthy events, such as city lockdowns, the
opening of field hospitals, and the mutation of the virus, whose effect should
be instant. To achieve this, we balance the model's likelihood by total
variation, which regulates the temporal variations of the model parameters. To
infer these parameters, instead of using Monte Carlo methods, we design a novel
yet straightforward optimization algorithm, dubbed Iterated Nelder--Mead, which
repeatedly applies the Nelder--Mead algorithm. Experiments conducted on the
simulated data demonstrate that our approach can reproduce these
discontinuities and precisely depict the epidemics.
