  This paper is focused on the mathematical modeling and solution of the
optimal charging of a large population of identical plug-in electric vehicles
(PEVs) with mixed state variables (continuous and discrete). A mean field
assumption is formulated to describe the evolution interaction of the PEVs
population. The optimal control of the resulting continuity equation of the
mixed system under state constraints is investigated. We prove the existence of
a minimizer. We then characterize the solution as the weak solution of a system
of two coupled PDEs: a continuity equation and of a Hamilton-Jacobi equation.
We provide regularity results of the optimal feedback control.
