This paper presents an unit commitment solution by a new modified particle swarm optimization (MPS algorithm. The proposed MPSO is in the framework of particle swarm optimization owning new mutation operator and selection mechanism inspired from the previous heuristic approaches. In other words, the positive characteristics of the previous heuristicapproaches are combined to create a new efficient stochastic search technique. Then, the proposed MPSO has been applied to solve the unit commitment problem for a 10-units system Furthermore, a new model of plug-in vehicles has been proposed to solve the unit commitment problem in the smart grid environment. This new model has been solved for a 10-units system with the participation of 50000 plug-in vehicles and a solar farm. Also, for more accurate models of the uncertainties of solar, Beta probability density function (BPDF) has been used Numerical results show that the MPSO method in conjunction with BPDF along a new model of plug-in vehicles is a very competent and comprehensive model for unit commitment in a smart grid environment in the compared with the other recently published methods