Infection model with vaccination and loss of immunity