  We develop a mathematical model for transferring the vaccine BNT162b2 based
on the heat diffusion equation. Then, we apply optimal control theory to the
proposed generalized SEIR model. We introduce vaccination for the susceptible
population to control the spread of the COVID-19 epidemic. For this, we use the
Pontryagin minimum principle to find the necessary optimality conditions for
the optimal control. The optimal control problem and the heat diffusion
equation are solved numerically. Finally, several simulations are done to study
and predict the spread of the COVID-19 epidemic in Italy. In particular, we
compare the model in the presence and absence of vaccination.
