  In this work we propose and investigate a new strategy of vaccination, which
we call "dynamic vaccination". In our model, susceptible people become aware
that one or more of their contacts are infected, and thereby get vaccinated
with probability $\omega$, before having physical contact with any infected
patient. Then, the non-vaccinated individuals will be infected with probability
$\beta$. We apply the strategy to the SIR epidemic model in a multiplex network
composed by two networks, where a fraction $q$ of the nodes acts in both
networks. We map this model of dynamic vaccination into bond percolation model,
and use the generating functions framework to predict theoretically the
behavior of the relevant magnitudes of the system at the steady state. We find
a perfect agreement between the solutions of the theoretical equations and the
results of stochastic simulations. In addition, we find an interesting phase
diagram in the plane $\beta-\omega$, which is composed by an epidemic and a
non-epidemic phases, separated by a critical threshold line $\beta_c$, which
depends on $q$. Wefind that, for all values of $q$, a region in the diagram
where the vaccination is so efficient that, regardless of the virulence of the
disease, it never becomes an epidemic. We compare our strategy with random
immunization and find that using the same amount of vaccines for both
scenarios, we obtain that the spread of the disease is much lower in the case
of dynamic vaccination when compared to random immunization. Furthermore, we
also compare our strategy with targeted immunization and we find that,
depending on $\omega$, dynamic vaccination will perform significantly better,
and in some cases will stop the disease before it becomes an epidemic.
