Optimal Allocation Model of Virtual Power Plant Capacity considering Electric Vehicles

To push forward the development of electric vehicles while improving the economy and environment of virtual power plants (VPPs), research on the optimization of VPP capacity considering electric vehicles is carried out. In this paper, based on this, this paper first analyzes the framework of the VPP with electric vehicles and models each unit of the VPP. Secondly, the typical scenarios of wind power, photovoltaic, electric vehicle charging and discharging, and load are formed by the Monte Carlo method to reduce the output deviation of each unit.,en, taking the maximization of the net income and clean energy consumption of the VPP as the objective function, the capacity optimal allocationmodel of the VPP considering multiobjective is constructed, and the conditional value-at-risk (CVaR) is introduced to represent the investment uncertainty faced by the VPP. Finally, a VPP in a certain area of Shanxi Province is used to analyze a calculation example and solve it with CPLEX. ,e results of the calculation example show that, on the one hand, reasonable selection of the optimal scale of EV connected to the VPP is able to improve the economy and environment of the VPP. On the other hand, the introduction of CVaR is available for the improvement of the scientific nature of VPP capacity allocation decisions.


Introduction
ough electric vehicles enjoy a rapid development with the support of national policies, they are confronted with the challenges, such as the increase of the peak-valley difference of the system and the decrease of power quality due to their characteristics of centralized charging [1]. e virtual power plant integrates distributed energy, energy storage systems, and controllable loads with refined control and demand response methods, which can effectively solve the problems brought by the centralized charging of electric vehicles. erefore, at present, reasonable planning and utilization of virtual power plant have become the focus of research in this field [2,3].
In planning of a virtual power plant, the rational allocation of distributed energy units, conventional energy units, and energy storage systems forms the basis for the coordination of investment and income. In terms of capacity configuration, Chen et al. [4,5] used game theory to study the capacity planning schemes of various distributed power sources. Li et al. [6] constructed a model of random optimal allocation of microgrid power capacity by generating a confrontation network to simulate a large number of scenes of wind and solar output and using K-medoids clustering to reduce the scenes. Xue et al. [7] used the Latin hypercube scene generation method and scene reduction technology to generate random scenes and combined robust optimization to modify the microgrid configuration scheme. In addition to the configuration of distributed power sources and microgrids, there are also works of the literature on the capacity configuration of integrated energy systems. Zhang et al. [8] proposed a planning model of IES electric-gas combined operation to determine the optimal switching time and capacity configuration of generator sets, electricto-gas, gas boilers, and other equipment. Zhang et al. [8,9] used the improved k-means algorithm and Monte Carlo algorithm to reduce wind power scenarios and built a comprehensive energy system capacity configuration model with the minimum total system cost as the objective function. Regarding the annualized cost of the system as the objective function and taking into consideration the electric energy interaction between multiple networks, Lin et al. [10,11] optimized the selection and capacity of system equipment. Based on the single-tier optimal configuration, some works of the literature have constructed a double-layer optimal configuration model of the system. Considering the uncertainty of wind and solar, Yao et al. [12,13] constructed a double-layer collaborative optimization configuration model. e upper layer is used to determine the equipment selection with the lowest annualized total cost, while the lower layer is utilized to determine the equipment capacity with the highest annual average utilization rate of the equipment, thereby realizing simultaneous optimization of system economy and utilization efficiency. Xiao et al. [14] constructed a two-stage capacity allocation model considering the planning and operation of the integrated energy system. e first stage achieves the lowest economic cost, and the second stage designs the optimal operation plan. Taking into account the uncertainty of demand response, Liu et al. [15][16][17] constructed a double-layer capacity optimal allocation model. Fan et al. [18] proposed a two-tier optimal configuration model for the multiregion integrated energy system. From the perspective of capacity allocation subjects, most of the existing researches focus on the distributed energy and integrated energy systems, but there are few studies on the capacity allocation of VPP. In terms of uncertainty analysis of capacity allocation, existing research studies mainly analyze the uncertainty of wind power, photovoltaics, and demand response, but there is no literature on the impact of the uncertainty of electric vehicle charging on the capacity allocation results. On the other hand, no attention was paid to the income uncertainty faced by the investors. For capacity allocation goals, though environmental protection goals need to be fully considered in the context of today's carbon neutrality and environmental protection, existing research studies mainly consider the economy.
Given the uncertainty of income faced by the investors, many methods are commonly used, including the value-at-risk (VaR) method [19], the profit variance method [20], and the conditional value-at-risk method (CVaR) [21]. Among them, CVaR presents the conditional value-at-risk, and the average loss of the portfolio, reflecting the "tail risk" related to VaR, is often used in systematic risk management. Shi et al. [22] introduced the CVaR method to optimize the heat storage and power storage capacity of the multienergy complementary system. Zheng et al. [23] used CVaR to characterize the severity of economic risks and verified that it is reasonable to use this method with an example. Guo et al. [24] applied CVaR to the optimal dispatch of microgrids in the spot market to reflect the uncertainty of real-time electricity prices. Wang et al. [25,26] utilized CVaR to deal with the uncertainty of wind power output and established the optimal dispatch model of the power system while taking CVaR into account the integrated energy system. Yang et al. [27,28] equivalently converted the difficult part of VaR in CVaR into a relatively simple function and used Monte Carlo and other sampling simulation methods to convert CVaR into linear programming, thereby reducing the difficulty of solving. Wei et al. [29] used CVaR as an indicator of risk measurement based on which the influence of risk preference on the power capacity configuration of virtual power plants was analyzed. Wang et al. [30,31] used CVaR theory to measure the risk of system uncertainty to the scheduling in the virtual power plant scheduling process, thereby constraining the uncertainty risk to obtain the maximum benefit of the virtual power plant under acceptable conditions. e existing literature studies show that CVaR can effectively characterize economic risks. In order to further analyze the necessity of this study, this study is compared with other studies, as shown in Table 1.
Compared with existing research studies, this paper constructs a virtual power plant capacity optimization configuration model that takes into account electric vehicles. e innovations are as follows: (1) Innovatively propose a capacity allocation model of virtual power plant that takes into account electric vehicles; on the one hand, it fills the gaps in the research of virtual power plant capacity configuration. On the other hand, it generates a set of typical scenarios and determines the optimal scale of electric vehicle access to VPP considering the uncertainty of electric vehicle charging load, thus enriching the research subject of capacity allocation, and pushing forward the development of electric vehicles. (2) Innovatively propose to maximize the net income of VPP and clean energy consumption, thereby achieving the multiobjective capacity allocation. At the same time, it takes into account the environmental protection and economy of the virtual power plant, reduces the emission of pollutants, and responds to the goal of achieving carbon neutrality as soon as possible. (3) In addition to the consideration of wind power, photovoltaics, and load uncertainty, the innovative introduction of CVaR that can effectively quantify risk characterizes the uncertainty faced by virtual power plant investors and improves the scientificity of virtual power plant capacity allocation. e rest of the paper is organized as follows: Section 2 designs a virtual power plant framework with electric vehicles, which is followed by the modeling of each unit in the virtual power plant. In Section 3, to maximize the net income of VPP and the consumption of clean energy, a multiobjective capacity optimization configuration model is established. Section 4 designs a multiobjective solution process. Section 5 takes Shanxi Province, China, featuring the rapid growth of electric vehicles, as an example to conduct empirical analysis, thus verifying the validity of the model.

Nomenclature.
e summary of parameters and variables is shown in Table 2.

Framework of VPP with EVs.
In addition to renewable energy, such as wind power and photovoltaics, VPP can also gather resources, such as EVs and user-side controllable loads. However, there are uncertainties in the controllable load of renewable energy, EVs, and users. To maintain the balance between supply and demand, thermal generators, energy storage systems, and other equipment are installed in the VPP to reduce the uncertainty, with the specific framework of the VPP shown in Figure 1.
Taking a day of a year in a virtual power plant as an example, the wind power generation, photovoltaic power generation, thermal power generation, electric vehicle charging, and discharging and load are predicted at 7 : 00 on the day before the actual operation. Compare the output and load at 7 : 30. When the output is greater than the load demand, judge whether the multimargin exceeds the maximum energy storage of the energy storage system at 8 : 00 before the day-ahead market starts (assuming that the day-ahead market starts at 9 : 30). If the answer is positive, the energy is first stored in the energy storage system to its maximum extent, and the remaining energy is then sold to the grid at a price lower than the current market price; otherwise, the surplus is stored in the energy storage system. When the output is less than the load demand, judgement on whether the shortfall exceeds the maximum discharge energy of the energy storage system will be initiated. If the answer is positive, the energy storage system will discharge energy first, and the remaining shortfall will be Research on the optimal scheduling strategy of the commercial virtual power plant with electric vehicle charging stations: the optimal operation of the virtual power plant is based on the optimization of the economic benefits of the virtual power plant. Virtual power plants composed of wind power and electric vehicles participate in the multiagent game of the market: this paper studies the multiagent bidding optimization of virtual power plants composed of wind power companies and electric vehicles in the mode of cooperation and joint venture to participate in the power market. Collaborative optimization control strategy of electric vehicle and temperature control load virtual power plant: the collaborative optimization control strategy of electric vehicle and temperature control load is constructed with the goal of minimum economic control cost.
In this paper, the economic and environmental protection of virtual power plant are considered at the same time, and the net income maximization and the highest clean energy consumption rate are taken as multiobjective to configure each unit of virtual power plant.
rough the study of this paper and other paper, we can find that (1) other papers mainly focus on the optimal scheduling of electric vehicles connected to the virtual power plant and participating in market bidding, while this paper focuses on the optimal configuration of electric vehicles connected to the virtual power plant. (2) most papers only consider the economy of virtual power plant, but in the case of increasingly serious environmental pollution, the environmental protection of virtual power plant also needs to be considered.
Research on capacity allocation Literature 8,15,16,17,18,and 19: the integrated energy system as the main body of optimal allocation. is paper focuses on the optimal configuration of electric vehicles connected to virtual power plant. rough comparative analysis, it is concluded that the existing research focuses on the optimal allocation of the integrated energy system, but does not involve electric vehicles, and does not quantitatively analyze the impact of the scale of electric vehicles on a certain system.
Research aspects of uncertainty in systems Literature 6, 7, and 25: the uncertainty of electricity price in wind power, photovoltaic, and market is studied.
is paper not only analyzes the uncertainty of the source end and load end of the virtual power plant but also considers the uncertainty of the investment decision of the virtual power plant investors.
On the basis of the existing uncertainty research, the uncertainty of investment of virtual power plant investors is increased.
purchased from the grid at a price higher than the previous market price; otherwise, the shortfall energy is discharged by the energy storage system. Among them, the bidding process of the VPP in the dayahead market is shown in Figure 2.
It can be seen from Figure 2 that the Market Control Center announced the bidding information before 9 : 30 on the bidding day. From 9 : 30 to 10 : 00, power is submitted by each wind power, photovoltaic power generating unit, and thermal power generating unit. In the meantime, the user submits the load demand, and the VPP operator submits the declaration to the control center based on the output and load. At 10 : 30 on the bidding day, the day-ahead market clearing will be carried out to form the day-ahead market-clearing price. Besides, the real-time clearing is carried out in 15 minutes within the operating day.

Unit Modeling of VPP with EV
(1) Wind turbine: the output of the wind turbine generator mainly depends on the wind speed. Specifically, when the wind speed is less than the cut-in wind speed, or greater than the cut-out wind speed, the output of the wind turbine is 0, while in the case that the wind speed is between the cut-in wind speed and the rated wind speed, the output of the wind turbine generator is positively related to the wind speed. e specific output is shown in the following equation [32]: where P j wpp,t refers to the output of the j-th wind turbine at time t; P j wpp,e represents the rated output wpp,e are the cut-in wind speed, cut-out wind speed, and rated wind speed of the j-th wind turbine, respectively.
(2) Photovoltaic panels: the output of the photovoltaic panel depends on the light intensity and the area of the photovoltaic panel, as shown in the following equation [33]:

Mathematical Problems in Engineering
where P j pv,t refers to the output of the photovoltaic panel at time t; λ j pv represents the photoelectric conversion efficiency; S j pv denotes the area of the photovoltaic panel, and E t is the light intensity.
(3) ermal power generating set: the output of thermal power generators depends on the amount of coal burned and the conversion efficiency, as shown in the following equation: where P j DG ,t refers to the output of the j-th thermal power generating unit at time t; λ j DG represents the conversion efficiency of the j-th thermal power generating unit; and m DG ,t denotes the amount of coal burned by the thermal power generating unit at time t. (4) Controllable load: controllable load is also called a flexible load, which includes the transferable load and the interruptible load. Among them, the transferable load depends on the transferred load and the load transferred from the rest of the time; the interrupted load depends on the ratio of the interrupted load, as shown in the following equations, respectively: where P Tl,t refers to the transfer load at time t; z Tl,t represents a Boolean variable, which indicates whether the load is transferable or not during t; in the case that the load can be transferred in the period of t, z Tl,t � 1, otherwise, z Tl,t � 0; P load,t represents the load before the transfer of the load, and the load is not reduced at time t; λ Tl,t denotes the transfer ratio at time t; P rl,t is the load reduction at time t; and λ rl,t refers to the reduction ratio at time t. (5) EV charging load: after considering the access of electric vehicles to the virtual power plant, the charging and discharging of electric vehicles are random and subjective, which aggravates the overall uncertainty of the virtual power plant. erefore, the accurate analysis of electric vehicle charge and discharge load is the key.
EVs mainly include taxis, private cars, and electric buses. Among them, taxis and electric buses cannot be charged for a long time due to their operating hours; therefore, fast charging is mainly used. In contrast, private cars are mainly used for driving from home-workplace-home, which makes the long charging time acceptable; in that case, slow charging is mainly adopted. e selection of the charging strategy for EV in each period is related to the EV's state of change which is closely related to the EV's driving distance. e mileage of EVs obeys a normal distribution, as shown in the following equation [34]: where μ D k and σ D k refer to the mean and standard deviation of mileage, respectively. Since the state of charge of an electric vehicle at every moment is constrained by the minimum state of charge, that is, when the electric vehicle is not charged at time t, the charge value at time t minus the power consumption at time t + 1 still needs to meet the minimum state of charge. Combining mileage accordingly, the EV's state of charge is judged by equation (7). If equation (7) is satisfied, the EV does not need to be charged at time t; otherwise, the EV is charged [35]: where SOC t,k refers to the k-th EV's state of charge at time t; g k represents the power consumption of the k-th EV per kilometer; C k denotes the k th EV capacity; and SOC min is the minimum value of the EV's state of charge; D t+1,k and D t−1,k are the mileage of the k-th electric vehicle at time t + 1 and t − 1, respectively. According to the EV's state of charge, the charging time of the EV is calculated based on where t k refers to the charging time of the EV; t s,k represents the parking time of the k th EV, and t EV,k denotes the charging time of the EV; P EV,k,t is the charging power of the k th electric vehicle at time t: By continuously updating the EVs' state of charge, the cumulative charging load of EVs P EV,t can be obtained. P EV,t is the accumulation of the charging power P EV,k,t at time t of 6 Mathematical Problems in Engineering three types of electric vehicles: taxis, private cars, and electric buses, as shown in where P EV,t refers to the cumulative charging load of EVs; k � 1, 2, 3 represents taxis, private cars, and electric buses, respectively.

Capacity Optimal Allocation Model of VPP considering Multiple Objectives
e investment and construction model of VPP is the BOT model, namely, build operation transfer. e VPP service provider shall invest in construction and operation, and after the operation expires, the VPP service provider will transfer the VPP to the government.
Because wind power generation, photovoltaic power generation, controllable load, and electric vehicles all have uncertainty and randomness, they are a random problem. In the process of solving, the random problem needs to be transformed into a deterministic problem. e Monte Carlo method is used to form the output scenario set of wind power generation, photovoltaic power generation, electric vehicle charging load, interruptible load, and reducible load. Due to the space limitation, the Monte Carlo method is no longer described, mainly in reference [36]. s w � w i , i � 1, 2, . . . , n w , p � p j , j � 1, 2, . . . , n pv , e � e k , k � 1, 2, . . . , n EV , t � t m , m � 1, 2, . . . , n Tl , and r � r s , s � 1, 2, . . . , n rl are considered to reduce the load. e total number of scenes is n total � n w · n pv · n EV · n Tl · n rl .

Objective Function.
EV may have a certain impact on the load curve by its charging load when connecting to a VPP. From the economic point of view, the goal of the VPP is to maximize the net income; while for social benefit, the VPP also pursues the largest consumption of clean energy; therefore, it is necessary to construct a VPP capacity optimization configuration model that considers multiple objectives.

Maximize Net Income.
e net income of the VPP is the difference between the total system revenue and the total system cost. At the same time, wpetr is used to represent the values of variables in scenes w i , p j , e k , t m , and r s , respectively, as shown in where R net refers to the net income of the VPP; R , and C wpetr ESS are VPP investment and construction cost, operation and maintenance cost, thermal power generation cost, interruptible load compensation cost, transferable load cost, environmental cost, power purchase cost from the grid, and energy storage system cost, respectively: (1) Investment and construction cost Investment and construction costs mainly refer to the costs incurred in purchasing and installing each unit: where N denote the number of fast-charging piles and slow-charging piles, respectively; C Inv,w , C Inv,pv , C Inv,DG , C Inv,qEV , C Inv,sEV , and C Inv,ESS are the unit investment and construction costs of unit wind turbines, photovoltaic panels, thermal power generators, fast-charging piles, slow-charging piles, and energy storage systems, respectively; r is the discount rate; and T refers to the operating life of the system.
(2) Annual operation and maintenance cost e annual operation and maintenance cost depends on the output of each unit and the operation and maintenance rate, as shown in where η wpp,t , η pv,t , η qEV,t , η sEV,t , and η DG ,t refer to the operation and maintenance rates of wind turbines, photovoltaic panels, fast-charging piles, slowcharging piles, and thermal generating sets, respectively; C op,w , C op,pv , C qEV,w , C op,sEV , and C op,DG represent the unit operation and maintenance costs of wind turbines, photovoltaic panels, fast-charging piles, slow-charging piles, and thermal generating sets, respectively.
where a, b, and c refer to the power generation cost coefficients. (4) Interruptible load compensation cost where C rl refers to the unit interruptible load compensation cost.
where C Tl represents the unit transferable load compensation cost.
where n e denotes the type of pollutant; H e refers to the total discharge of pollutants e; F e denotes the fine's magnitude of the pollutant e; and v e is environmental value.
where p grid,b refers to the unit price of electricity purchased from the grid.
where u wpetr ESS start ,t is a Boolean variable, u wpetr ESS start ,t � 1 indicates that the energy storage system is started, and u wpetr ESS start ,t � 0 indicates that the energy storage system is not started; C wpetr ESS,start and C wpetr ESS,stop are the start and stop cost of energy storage system; δ wpetr ESS cha,t is also a Boolean variable, δ wpetr ESS cha,t � 1 indicates that the energy storage system is charged, and δ wpetr ESS cha,t � 0 indicates that the energy storage system is not charged; η ESS,t is the operation and maintenance rate of the energy storage system; C op,ESS is the unit operation and maintenance cost of the energy storage system. (9) Electricity sales revenue: the electricity sales revenue of the VPP includes the charging fee paid by the EV owner, the energy usage fee paid by the general user, and the revenue obtained by selling electric energy to the grid: R wpetr sale � 8760 t�1 P load,t − P Tl,t − P rl,t · p use + P grid,s,t · p grid,s + P EV,t · p EV ,

Mathematical Problems in Engineering
where p use refers to the user energy unit price; p grid,s represents the unit price of energy sold to the grid; and p EV denotes the charging price of EVs.
To effectively measure the uncertainty risk of wind turbines, photovoltaic panels, EV charging loads, and controllable loads, CVaR is introduced and multiplied by the investor's risk preference B to represent the risk r risk . e degree of investor's risk preference indicates the investor's attitude towards risk, and its value range is B ≥ 0. When B is smaller than 0.1, it means that investors are risk preference type. Investors want to exchange for higher returns with greater risks. When B is larger than 0.5, it means that investors are risk averse and their investment strategies are conservative. Investors should choose the risk preference coefficient according to their risk preference. As shown in where α refers to the VaR value and β represents the confidence coefficient.
Combined with the degree of risk, the objective function for maximizing net income can be obtained based on

Maximize Clean Energy
Consumption. e consumption of clean energy is characterized by the ratio of clean energy output to the total output of the VPP (including the output of clean energy and the output of thermal power units), as shown in

3.2.
Restrictions. e constraints of the multiobjective capacity optimization configuration model include unit output and climbing constraints, EV constraints, controllable load constraints, energy storage system constraints, grid interaction constraints, power balance constraints, and scenario probability constraints [37,38].
(1) Unit output and climbing constraints: the output and climbing constraints of wind turbines, photovoltaic panels, and thermal generators are shown in equations (24) and (25), respectively: (2) EV constraints: EV constraints include charging power constraints and capacity constraints, as shown in where P max EV,k refers to the maximum charging power of the kth EV; z EV,k represents the Boolean variable of the k-th EV's charging state, and z EV,k � 1 means that the electric car is being charged; otherwise, it is not being charged. And C max k is the maximum capacity of the k-th EV.
(3) Controllable load constraint: controllable load constraints include transferable load constraints and interruptible load constraints: where P max Tl and P max rl refer to the maximum values of transferable load and interruptible load, respectively.
(4) Energy storage system constraints: energy storage system constraints include balance constraints and energy discharge limit constraints, as shown in where Q ESS,t refers to the capacity of the energy storage system at time t; λ ESS,cha and λ ESS,dis represent the energy storage and release efficiency of the energy storage system, respectively; Q max ESS denotes the maximum capacity of the energy storage system; and z ESS,cha is the Boolean variable of the energy storage state of the energy storage system. When z ESS,cha � 1, the energy storage system stores energy; otherwise, it releases energy. P cha,max ESS and P dis,max ESS are the maximum value of energy storage and release of energy storage system, respectively.
Mathematical Problems in Engineering (5) Grid interaction constraints: the grid interaction constraint means that the VPP cannot exceed the maximum value when purchasing from and selling electricity to the grid: where P max grid refers to the maximum power that the VPP exchanges with the grid.
(6) Power balance constraint: power balance constraint refers to the balance between supply and demand in each period: (7) Scene probability constraints: the scene probability constraint means that the sum of the probabilities of each scene is 1, as shown in

Model Calculation and Solution
To coordinate the multiobjective strategy for maximizing the net income of VPP and the clean energy consumption, the specific solution is as follows: (1) Step 1: transform the maximization of net income and clean energy consumption into that of objective functions. Let h 1 � −f 1 and h 2 � −f 2 , and the transformation result is shown in the following equations:

Basic Data.
Because of the rapid development of EVs and renewable energy in Shanxi Province, a certain area in Shanxi Province is taken as the example for empirical analysis. Specifically, select the wind speed, light intensity, EV charging load, interruptible load, and reduced load in the past three years from 2017-2019 to prepare 3 typical scene setsn w � n pv � n EV � n Tl � n rl � 3, and all the scene probabilities are set at 0.33. e specific situation is shown from Figures 2-6 [39,40].  Figure 7 shows the average load from 2017 to 2019. e axis represents the number of hours in a year, with a total time of 8760 hours. e ordinate corresponds to the load at different times. e prices for EV charging and user energy are based on time-of-use electricity prices, as shown in Table 3 [41]. e fine quantity set and environmental value of each pollutant are shown in Table 4 [42]. e specific parameters of wind turbines, photovoltaic panels, thermal generators, energy storage systems, and various types of EVs are shown in Table 5 [43].
Set the compensation cost of the transferable load at 0.0122 $/kW · h, and the compensation cost for interruptible load at 0.0183 $/kW · h. e VPP purchases electricity from the grid at the price of 10.1986 $/kW · h and sells it to the grid at the price of 0.1604 $/kW · h. e coal price is 71.8160 $/ton, the discount rate is 8%, and the degree of risk appetite is 1. e weight coefficients for the maximization of net income and that of clean energy consumption are 50% and 50%, respectively. ere are a total of 8,000 EVs for which electric taxis, electric buses, and electric private cars account 40%, 20%, and 40%, respectively.

Analysis of the Impact of EV Access on Capacity Allocation Results.
To study the impact of EVs on the VPP's optimal configuration, the impact of different EV access scales on VPP capacity configuration is first analyzed, which is followed by the analysis of each unit.
(1) Analysis of the impact of different EV access scales on capacity allocation results: when 100% of EVs are connected to the VPP, a total of 8,000 vehicles will be set, and the connection ratio varies between 50% and 120%. And through CPLEX to optimize the solution, with 1 hour as the step size for simulation, the simulation results stabilized after 48 iterations, and the optimized calculation time was 10.4 seconds. e capacity configuration optimization results are shown in Table 6.
As shown in Table 6, with the continuous increase of the scale of EV access, the net income, clean energy consumption value, and comprehensive objective function value of VPP all increase first and then decrease. is is due to the fact that the increase in the scale of EV access has led to an increase in the charging load demand of EVs. To maintain the balance between supply and demand, the VPP has to increase its output and the number of units configured. When the scale of EV access is [50%, 80%], the wind turbines and photovoltaic panels are increased to meet the requirements of the increased charging load, and the clean energy consumption rate will increase at this time. At the same time, because the increase in charging load is greater than the increased cost of the VPP, the net income of the VPP increases.
In the case that the scale of EV access is [80%, 100%], the increase in wind turbines and photovoltaic panels is less, and that in thermal power generation and energy storage systems is greater. e increased charging load is mainly met by thermal power generating sets and energy storage systems.
is is because that the greatly increased demand for EV charging has greatly increased the risk of disorderly charging. To ensure the safety and reliability of power supply, the selected output is more reliable for the thermal power generating units and energy storage systems to meet. erefore, on the one hand, this reduces the consumption rate of clean energy. On the other hand, due to the high investment and construction cost of the energy storage system, the net income of the VPP is reduced.
It can also be seen from Table 4 that the number of fastcharging piles is higher than that of slow-charging piles. e reason is that electric buses and taxis usually use fastcharging methods due to the operating hours, while private cars usually use slow-charging methods. e proportions of various types of EVs are 40%, 20%, and 40%, respectively, which means that the scale of electric buses and electric taxis is larger than that of private cars. erefore, in the VPP capacity configuration results, the number of fast-charging piles is greater than that of slow-charging piles.
From Table 6 and related analysis, it can be seen that when the scale of electric vehicles is 80%, the net income and clean energy consumption rate of the virtual power plant are the highest, and the maximum comprehensive objective function value is 0.4988.
erefore, under the current conditions, the optimal ratio of electric vehicles connected to the virtual power plant is 80%.
When the access scale of electric vehicles exceeds 100%, the net income and clean energy consumption rate of the virtual power plant will decrease compared with the scale not exceeding 100%. is is because the scale of more than 100% will lead to an increase in charging and discharging power, and more standby units need to be configured in the virtual power plant to ensure the safe and stable operation of the virtual power plant. However, if these electric vehicles can be guided in an orderly way, the net income and clean energy consumption rate may exceed the scenario that the scale of access is less than 100%.
(2) Result analysis of VPP output: when selecting a typical day of 2592-2615 h and analyzing the EV access ratio of 80%, the output of each unit of the VPP is shown in Figure 8.
According to Figure 8, the time frames from 1-5 h to 13-14 h refer to the low electricity consumption period, the output is greater than the energy consumption, and the interruptible load is 0. e energy storage system is called first to store energy; however, the thermal power generation unit shows less output which maintains at around 400 kW.
e remaining power is sold to the grid. e time frames from 9-14 h to 18-22 h represent the peak electricity consumption period when the output is less than the energy consumption, and the energy storage system is given the    priority to discharge, thereby satisfying the load demand. On the one hand, part of the load is interrupted and transferred to the valley period; besides, the interrupted load is maintained at about 134 kW. In the meantime, the output of thermal power generator sets is increased from 400 kW in the valley period to about 1000 kW. And the shortfall is purchased from the grid.

Analysis of Capacity Allocation Results under Different Risk Preferences.
e EV access ratio is set at 80%, and the risk preference coefficient varies between [0. 25, 1.50]. e result of capacity optimization configuration is shown in Figure 9.
As shown in Figure 9, as the risk preference coefficient increases from 0.25 to 1.50, the CVaR value gradually decreases, reflecting the increase in investors' aversion to risk. In another word, when the risk preference coefficient is relatively small, while the number of wind turbines and photovoltaic panels is large, thermal power generation sets are mainly used to reduce the uncertainty of renewable energy output. Since the cost of energy storage technology is relatively high and the cost of VPP can be reduced through thermal power generation units, the configuration optimization results include more thermal power generation units and less energy storage systems. However, when the degree of risk preference is large, to reduce the uncertainty of the system, the number of wind turbines and photovoltaic panels is reduced. On the other hand, to meet the load demand, the energy storage system and thermal power generator set are required to meet the demand of the shortfall load. At this time, the number of energy storage systems and thermal power generator sets is large.

Considering the Influence of Multiobjective and Electric
Vehicle Access on VPP. In order to further analyze and consider the impact of multiobjective and electric vehicle access on the VPP, this paper sets four scenarios as shown in Table 7 for example analysis.
It can be seen from Table 6 that scenario 2 and scenario 3 configure the capacity of the virtual power plant with a single objective; scenario 1 and scenario 4 configure the capacity of the virtual power plant with multiple objectives. e objective function values of virtual power plants under different scenarios are shown in Table 8.
According to Table 7, compared with the single objective, the optimal solution can be obtained by considering the optimal configuration of multiobjective virtual power plant compared with the single objective. e comprehensive effect is 0.4988. However, scenario 3 with the highest clean energy consumption rate has the lowest comprehensive target value of 0.4702. e equivalent load curve and output of each unit under different scenarios are further analyzed, as shown in Figures 10-13 . e equivalent load curve of virtual power plant is the superposition of total output and total load of virtual power plant.
As can be seen from Figures 10-13, scenario 2 only considers the maximization of net income. At this time, because the output of conventional thermal power units is stable, it will increase the output of conventional thermal power units and reduce the consumption of clean energy. For scenario 3, which only considers the maximum clean energy consumption, in order to maximize the clean energy consumption, the output of thermal power generation units will be reduced. However, in order to ensure the security and stability of the system, more reserve capacity needs to be configured, which reduces the economy of the system. Compared with scenario 4, the equivalent load of virtual power plant in scenario 1 is steeper. e peak-valley difference of scenario 1 is 175.5 kw, which is much larger than that of scenario 4. e increase of peak-valley difference leads to the increase of operation and maintenance cost of     virtual power plant, which reduces the net income of virtual power plant. It shows that the peak-valley difference can be effectively reduced when the electric vehicle is connected to the virtual power plant and guided orderly.

Sensitivity Analysis of the Influence of Different Target Weight Coefficients on the Capacity Allocation Results.
e weight coefficient for maximizing net income and clean energy consumption is changed for sensitivity analysis. When the weight coefficients reach 50%, it means that the ratio of the importance for maximizing net income and clean energy consumption is 1. Allowing the importance of the two to change between [0. 5,5], the sensitivity analysis results are shown in Figure 14.
As shown in Figure 14, as the ratio of the importance of maximizing net income to maximizing clean energy consumption increases, the value of net income first increases and then decreases, while the proportion of clean energy consumption continues to decline. is is because that as the importance ratio increases, the VPP based on the economic net income value will increase the proportion of thermal power generation output and reduce the uncertainty of clean energy output. At this time, the proportion of clean energy consumption will decrease. However, when the importance ratio increases to 3, the output of thermal power generating units will account for a relatively high proportion, leading to a faster increase in environmental costs, and exceeding the benefits it brings in. In the meantime, the net income begins to decline at this time. e results of this optimized configuration show that the requirements of economy and environmental protection should be coordinated according to the requirements of the country's external policy environment, thus maximizing the comprehensive income value of the VPP.

Results and Conclusions
To enrich the research results of capacity configuration, this paper first takes the VPP capacity configuration as the research object, including EVs, which is followed by the modeling of each part of the VPP. Aiming at the reduction of the uncertainty of wind power generation, photovoltaic power generation, EV charging, and load, the problem of uncertainty is transformed into that of certainty with the scene generation method. To take into account the economics and environmental protection of VPP, and the uncertainty of investors' income, conditional value-at-risk was introduced, thereby constructing a multiobjective capacity optimization model with net income and clean energy consumption maximization. Meanwhile, Shanxi Province is taken as an example for the analysis of the calculation example, and the results are as follows: (1) For VPP that includes EVs, the optimal scale of EV access should be selected reasonably to achieve the highest comprehensive income of VPP. As the scale of EV access increases, on the one hand, the demand for EV charging increases, leading to the increase of the revenue of VPP. On the other hand, the security of VPP and the cost of capacity allocation are reduced. erefore, it is necessary to select the scale of access reasonably to achieve a balance between benefits and costs. (2) e risk aversion of decision-makers increases with the increase of the risk preference coefficient. erefore, when the risk preference coefficient is relatively small, the number of wind turbines and photovoltaic panels becomes relatively large. In contrast, when the risk preference is relatively large, the number of energy storage systems and thermal power generating sets becomes relatively large.
(3) As the importance ratio of maximizing net income to maximizing clean energy consumption increases, the value of net income first increases and then decreases, while the proportion of clean energy consumption continues to decline. erefore, decisionmakers should fully consider the country's external environmental requirements and coordinate the balance between the economy and environmental protection of VPP.

Data Availability
e basic data used to support the findings of this study are included in the paper.