Aiming at the problem of aggregated scheduling and consumption of distributed energy resources, the paper proposes a virtual power plant scheduling optimization method. Considering constraints such as power loss, voltage support and line congestion, the combination of units and controllable load scheduling in the system is optimized based on stochastic mixed integer linear programming with the objective of profit-in-maximization. The concept of virtual power plant is applied to study the technical and economic impacts of different distributed energy sources. The contribution of distributed energy sources to the system benefits is quantified, and the distribution mechanism in cooperative game theory is utilized to distribute the benefits in a fair and efficient manner. In addition, the impact of electric vehicles (EVs) and commercial heating-ventilation-air conditioning (HVAC) systems on system flexibility is analyzed under different operating strategies, as well as the feasibility of EVs as mobile energy storage systems to assist power grid operation during sudden drops in renewable energy generation. A case study is conducted on a test system. The results show that EVs have the highest marginal contribution to the virtual power plant, followed closely by solar power generation. The results also show that the proposed methodology improves the economic return of the system, as well as a number of technical operational indicators, validating the effectiveness of the proposed methodology.