Adaptive Robust Optimization-Based Optimal Operation of Microgrids Considering Uncertainties in Arrival and Departure Times of Electric Vehicles

: The optimal operation of microgrids is challenging due to the presence of various uncertain factors, i.e., renewable energy sources, loads, market price signals, and arrival and departure times of electric vehicles (EVs). In order to incorporate these uncertainties into the operation model of microgrids, an adaptive robust optimization-based operation method is proposed in this paper. In particular, the focus is on the uncertainties in arrival and departure times of EVs. The optimization problem is divided into inner and outer problems and is solved iteratively by introducing column and constraint cuts. The unit commitment status of dispatchable generators is determined in the outer problem. Then, the worst-case realizations of all the uncertain factors are determined in the inner problem. Based on the values of uncertain factors, the generation amount of dispatchable generators, the amount of power trading with the utility grid, and the charging/discharging amount of storage elements are determined. The performance of the proposed method is evaluated using three different cases, and sensitivity analysis is carried out by varying the number of EVs and the budget of uncertainty. The impact of the budget of uncertainty and number of EVs on the operation cost of the microgrid is also evaluated considering uncertainties in arrival and departure times of EVs.


Introduction
Microgrids are generally composed of various distributed energy sources, such as distributed controllable generators (DGs), energy storage systems (ESSs), and renewable energy sources (RESs), along with local loads. With the increased use of electric vehicles (EVs), coordinated operation of microgrids with EVs is also gaining popularity [1,2]. The integration of EVs can provide additional storage to microgrids. EtaVs can be used to increase the utilization of RESs by absorbing excess power during peak generation intervals and releasing it during peak load intervals. Similarly, EVs can be charged by buying power from the grid during off-peak price intervals and can be discharged to feed local loads during peak price intervals. In this way, EVs can be utilized to reduce greenhouse gas emissions and reduce the operation cost of the microgrid. In addition, EVs can be used as a storage element to enhance service reliability, improve power quality, and assist participation in demand response programs [3,4].
However, microgrid operation is challenging due to the volatility in power demand, the intermittent nature of renewables, and fluctuations in market price signals. Similarly, the arrival and departure times of EVs are also uncertain, and this uncertainty poses more challenges to microgrid in the next step, and the values of continuous variables (output of DGs, ESS charging/discharging amount, and power trading with the grid) are updated accordingly. The conservatism of the solution is controlled by defining the budget for each uncertain parameter. The impact of uncertainties on the operation of microgrids is evaluated by considering three different cases. In each case, the trading amount with the utility grid, operation cost, and generation amount of DGs are analyzed. In addition, the impact of the budget of uncertainty and the number of EVs on the operation cost of microgrids is also analyzed.

Uncertainty Handling Methods in Microgrids
Various methods have been utilized in the literature to realize uncertainties in microgrids, and each method has its own merits and demerits. The most popular methods can be summarized as Bayesian analysis, sensitivity analysis, fuzzy-logic-based optimization, stochastic optimization, and robust optimization. A description of each method is presented in the following paragraphs.
Bayesian analysis is a probabilistic analysis method and is also known as Bayes nets or belief networks [10]. Bayesian analysis can be used even if some data is missing when forecasting uncertain parameters. However, this technique is not suitable when the domain of the problem is large.
Sensitivity analysis is a post-analysis technique. When parameters are uncertain in a model, it refers to analyzing how the result changes according to parameter changes by substituting all the possible values of the uncertain parameter. This technique is used to assess the impact of forecasting errors of uncertain parameters on microgrid operation and system security [9].
Fuzzy optimization utilizes a fuzzy membership function if uncertainties are best described qualitatively, such as hot and cold, dry and wet, high and low, clean and dirty, etc. Fuzzy membership functions can be used to quantify these factors. The results of fuzzy optimization will vary depending on the decision-maker's experience and are somewhat subjective [11].
Stochastic optimization and robust optimization are widely used to solve uncertainty problems. Stochastic optimization is a probabilistic technique. This technique needs probability distribution functions of uncertain parameters, which are not easy to obtain for all cases. In addition, the problem complexity increases with an increased number of uncertain parameters and size. Generally, this technique also uses scenario reduction techniques, which causes loss of information and only a probabilistic guarantee of feasibility is assured [12][13][14][15].
Robust optimization is a worst-case scenario based method, and it utilizes only deterministic bound sets of uncertain parameters. In addition, it provides guaranteed immunity against the worst-case realization of uncertainties, if the uncertainties lie within the bounds [16][17][18]. Originally, static robust optimization was proposed, but it needs the information of all uncertain parameters before solving the problem. In order to overcome the problems of static robust optimization, adaptive robust optimization is proposed [19][20][21][22][23][24].
Adaptive robust optimization solves the optimization problem by decomposing the original problem into two subproblems, inner and outer. The uncertain parameters are determined in the inner problem and on/off decisions of dispatchable generators are made in the outer problem. The amount of power trading with the utility grid and output of DGs are adapted in accordance with the revealed uncertainties in the inner problem [19][20][21][22][23][24].
Therefore, the two-step adaptive robust optimization method has gained popularity in microgrid operation, and is adopted to solve the problem in this study. The upper and lower bounds of uncertain parameters are required to solve the robust optimization method. The following two subsections show the bound realization method for both EVs and prevailing uncertainties utilized in this study.

Realization of Uncertainty in EVs
The uncertainties in arrival and departure times of EVs are subject to human behavior and are random. Therefore, the bounds of uncertainty are assumed to follow a normal distribution function in this study. Figure 1 shows the bounds of arrival and departure times of EVs using the normal distribution function. Figure 1 shows the probability of a particular EV arriving/departing within a given uncertainty bound. For example, the probability of an EV with forecasted arrival time of ta and standard deviation of v-hours to arrive between ta + v and ta − v is 68.2%. The same is the case with the departure time, as shown in Figure 1a. Lower standard deviation values for a particular EV indicate that the arrival/departure times are close to the forecasted values, based on the historic data, and vice versa for higher values of standard deviation. Similarly, higher standard deviation values indicate that the utilization of EV by the microgrid is reduced due to higher uncertainty in arrival and departure times. The forecasted values of arrival (ta) and departure (td) times are taken as the mean values, and standard deviation is varied to analyze the two possible cases. In the first case, where the value of standard deviation (v) is lower, the bounds of arrival and departure times of EVs do not overlap, as shown in Figure 1a. In the second case, where the standard deviation is higher, the arrival and departure bounds overlap, as shown in Figure 1b. Standard deviation refers to the budget of uncertainty parameter in this study. distribution function. Figure 1 shows the probability of a particular EV arriving/departing within a given uncertainty bound. For example, the probability of an EV with forecasted arrival time of ta and standard deviation of v-hours to arrive between ta + v and ta − v is 68.2%. The same is the case with the departure time, as shown in Figure 1a. Lower standard deviation values for a particular EV indicate that the arrival/departure times are close to the forecasted values, based on the historic data, and vice versa for higher values of standard deviation. Similarly, higher standard deviation values indicate that the utilization of EV by the microgrid is reduced due to higher uncertainty in arrival and departure times. The forecasted values of arrival (ta) and departure (td) times are taken as the mean values, and standard deviation is varied to analyze the two possible cases. In the first case, where the value of standard deviation (v) is lower, the bounds of arrival and departure times of EVs do not overlap, as shown in Figure 1a. In the second case, where the standard deviation is higher, the arrival and departure bounds overlap, as shown in Figure 1b. Standard deviation refers to the budget of uncertainty parameter in this study.

Uncertainty Bounds Calculation
In addition to the arrival and departure times of EVs, the load, renewables, and market price signals are also subjected to uncertainties in the microgrid system. The uncertainties in these parameters can be formulated by a polyhedron set [23] as given by (1) to assure the linearity of the model. The uncertainty sets can be generalized as in (1). The general set can be replaced with the corresponding uncertainty parameter, as shown in Equations (2)- (5). Additionally, the uncertainty set for arrival and departure times of EVs can be formulated as shown in Equations (6)

Uncertainty Bounds Calculation
In addition to the arrival and departure times of EVs, the load, renewables, and market price signals are also subjected to uncertainties in the microgrid system. The uncertainties in these parameters can be formulated by a polyhedron set [23] as given by (1) to assure the linearity of the model. The uncertainty sets can be generalized as in (1). The general set can be replaced with the corresponding uncertainty parameter, as shown in Equations (2)- (5). Additionally, the uncertainty set for arrival and departure times of EVs can be formulated as shown in Equations (6)

Problem Formulation
In order to solve the formulated problem via the adaptive robust optimization method, a deterministic problem is initially formulated. The deterministic problem is then transformed into a two-step robust optimization problem. The adaptive robust optimization is then decomposed into inner-and outer-level problems. The step-by-step problem formulation process is explained in the following sections.

Objective Function
The first term in the objective function of the deterministic model comprises the running cost, start-up cost, and generation cost of DGs. The second term comprises the price of buying electricity from the utility grid and profit gained by selling electricity to the utility grid, as shown in Equation (8).

Load-Balancing Equation and Constraints for Controllable Generators
The electric load demand must be balanced with the power generated from the DGs, renewables, the amount of power charged/discharged to/from EVs, and the amount of power traded with the utility grid, as represented by Equation (9). Equations (10)- (13) show the constraints of the distributed controllable generators. Equation (10) determines the start-up status (z t ) of DGs using the commitment status (y t ) information of respective DG units. Equations (12) and (13) represent the ramp-up/down limits for DG units.

Electric Vehicle Constraints
Equations (14)- (16) show the constraints of EVs. The charging/discharging amount is constrained by the maximum and minimum charging/discharging rates as defined in Equations (14) and (15), respectively. The acceptable State of Charge (SOC) limits during the presence of the EVs in the microgrid (between the arrival and departure times) are given by Equation (16). During the departure time, the SOC of EVs needs to be greater than or equal to the defined target SOC, as shown in Equation (17). If the EV is not present in the microgrid, it cannot be utilized for scheduling, as depicted in (18).

Adaptive Robust Optimization
The deterministic model explained in the previous section is subject to various uncertainties, i.e., loads, renewables, market prices, and arrival and departure times of EVs. The deterministic objective function can be divided into two parts in order to incorporate the uncertainties, which are the day-ahead decision part and the uncertainty-related part. The first term in Equation (19) indicates the day-ahead decision parameters, i.e., commitment and start-up status of DGs. The second term of Equation (19) shows the continuous variables, which are subject to uncertainty. These two parts are named outer and inner problems, respectively. Descriptions of inner and outer problems are given in the following sections. The output of DGs, charging/discharging of EVs, and power traded with the grid are adopted in accordance with the revealed uncertainties; therefore, this method is known as adaptive robust optimization.

Inner Problem
Inner Primary Problem: Equation (20) shows the objective function of the inner primary problem. The objective of the inner problem is to minimize the operation cost of the microgrid under the worst case of uncertainties. Therefore, this problem can be formulated as a max-min problem, as shown in Equation (20). However, this type of max-min problem is hard to solve.
Inner Dual Problem: In order to efficiently solve the max-min problem, it is transformed into its dual.
The dual transformation of (20) and (21) results in a maximization problem, as shown in (22) and (23). In order to transform the primal problem, dual variables are introduced. Dual variables for generation limits of DGs (λ d,t , π d,t ), ramp-up/down limit of DGs (ρ d,t , δ d,t ), load and renewables (ψ t ), and EVs (ε + e,t , ε − e,t , σ e,t , ξ + e,t , ξ − e,t ) are introduced [27], as shown in Equations (22) and (33). The values of uncertain parameters are determined by solving the dual problem, and these values are sent to the outer-level problem, which is explained in the following section.

Outer Problem
Outer Primary Problem: The outer problem is composed of Equations (34)-(36). The values of uncertain parameters revealed after solving the inner problem are utilized in the outer problem. The commitment status of DGs determined in this step are sent back to the inner problem. Both of these subproblems are solved until convergence is achieved. However, the conventional convergence process is time-consuming and needs several iterations. Therefore, different methods have been suggested in the literature to expedite the convergence process, as explained below.
The objective function (34) is also constrained by equations (9)- (18). Column and Constraint Cuts: Initially, Bender's decomposition was used to introduce cuts in the dual plane to expiate the convergence of the two-step robust optimization [26]. Recently, column and constraint cuts (C&CC) in the primary plane have been introduced, which reduce the convergence time and are more efficient than Bender's decomposition [18]. Therefore, in this study, C&CC are utilized as defined, as shown in Equations (37)-(41). These cuts are added after each iteration by analyzing the convergence of the inner and outer problems.

Solution Method
A summary of the solution method for the developed two-stage adaptive robust optimization model is shown in Figure 2. Initially, the input data, i.e., load, renewable power, market prices, and parameters of DGs, are obtained. Then, the upper bound (UB), lower bound (LB), tolerance level (ε), and iteration number (k) are initialized. A deterministic model is formulated at this stage, which is later transformed into the adaptive robust counterpart. Then, the deterministic model is decomposed into the inner and outer problems. The inner problem is transformed into a maximization problem using the duality method. The dual of the inner problem is solved first to determine the worst-case uncertainties in the uncertain parameters. The UB is updated as follows. , , , , ,

Solution Method
A summary of the solution method for the developed two-stage adaptive robust optimization model is shown in Figure 2. Initially, the input data, i.e., load, renewable power, market prices, and parameters of DGs, are obtained. Then, the upper bound (UB), lower bound (LB), tolerance level ( ), and iteration number (k) are initialized. A deterministic model is formulated at this stage, which is later transformed into the adaptive robust counterpart. Then, the deterministic model is decomposed into the inner and outer problems. The inner problem is transformed into a maximization problem using the duality method. The dual of the inner problem is solved first to determine the worst-case uncertainties in the uncertain parameters. The UB is updated as follows.   The revealed values of uncertain parameters are sent to the outer-level problem. Then, the outer problem is solved and LB is updated with the objective function value. The convergence of inner and outer problems is assessed by using the information of UB and LB. If these bounds do not converge, C&CC are added and the process is repeated until convergence is achieved.

Numerical Simulations
In this study, the test microgrid system was operated for a 24 h scheduling horizon with a time interval of 1 h. All the numerical simulations were coded in C++ in the Microsoft Visual Studio environment with the integration of IBM CPLEX 12.7.
Uncertainties in renewable resources, load, and market prices are considered in all the cases. In order to analyze the impact of uncertainty in arrival and departure times of EVs on the operation of microgrids, three cases are simulated in this study. The first case is the deterministic case, where the uncertainty in arrival and departure times is not considered. In the second case, uncertainty in arrival and departure times is considered with nonoverlapping uncertainty bounds. In the third case, uncertainty in arrival and departure times of EVs is considered with overlapping uncertainty bounds. Finally, the impact of the budget of uncertainty and the number of EVs on the operation of microgrids is analyzed.

Input Data
The day-ahead market price signals of real-time price (RTP) along with forecasted load and renewable output profiles are shown in Figure 3. The parameters related to DG and EV are listed in Table 1. In order to maintain the linearity of the problem, the generation cost of the DG is taken as linear, similar to [28][29][30]. In addition, being a day-ahead scheduling problem, the efficiency and fuel cost of DG are assumed to remain same for the scheduling day. The basic model of the tested microgrid system comprises a single DG and an EV. The parameters in Table 1 correspond to the parameters of the DG and the EV. However, in the discussion and analysis section, the number of EVs is increased to analyze the impact on the operation of the microgrid. The parameters of all the EVs are the same as those in Table 1. Electrical load uncertainty bounds were considered as ±20% of the forecasted values, uncertainty bounds of market prices were considered as ±10% of the forecasted values, and uncertainty bounds in renewable generation were taken from [16]. The revealed values of uncertain parameters are sent to the outer-level problem. Then, the outer problem is solved and LB is updated with the objective function value. The convergence of inner and outer problems is assessed by using the information of UB and LB. If these bounds do not converge, C&CC are added and the process is repeated until convergence is achieved.

Numerical Simulations
In this study, the test microgrid system was operated for a 24 h scheduling horizon with a time interval of 1 h. All the numerical simulations were coded in C++ in the Microsoft Visual Studio environment with the integration of IBM CPLEX 12.7.
Uncertainties in renewable resources, load, and market prices are considered in all the cases. In order to analyze the impact of uncertainty in arrival and departure times of EVs on the operation of microgrids, three cases are simulated in this study. The first case is the deterministic case, where the uncertainty in arrival and departure times is not considered. In the second case, uncertainty in arrival and departure times is considered with nonoverlapping uncertainty bounds. In the third case, uncertainty in arrival and departure times of EVs is considered with overlapping uncertainty bounds. Finally, the impact of the budget of uncertainty and the number of EVs on the operation of microgrids is analyzed.

Input Data
The day-ahead market price signals of real-time price (RTP) along with forecasted load and renewable output profiles are shown in Figure 3. The parameters related to DG and EV are listed in Table 1. In order to maintain the linearity of the problem, the generation cost of the DG is taken as linear, similar to [28][29][30]. In addition, being a day-ahead scheduling problem, the efficiency and fuel cost of DG are assumed to remain same for the scheduling day. The basic model of the tested microgrid system comprises a single DG and an EV. The parameters in Table 1 correspond to the parameters of the DG and the EV. However, in the discussion and analysis section, the number of EVs is increased to analyze the impact on the operation of the microgrid. The parameters of all the EVs are the same as those in Table 1. Electrical load uncertainty bounds were considered as ±20% of the forecasted values, uncertainty bounds of market prices were considered as ±10% of the forecasted values, and uncertainty bounds in renewable generation were taken from [16].

Uncertainty in Arrival and Departure Times of EVs
In order to analyze the impact of EV arrival and departure time uncertainty on the operation of the microgrid, the worst-case scenarios of renewables, loads, and market prices are considered. The worst-case scenario occurs when the loads and buying price have upper-bound values and the renewables and selling price have lower-bound values. The uncertainty in arrival and departure times of EVs are varied to analyze their impact on the operation of the microgrid. Given the worst-case scenario of the load, renewables, and market price signals, the worst-case scenario for the EV arrival and departure times is determined in this study. Three cases are considered by varying the arrival and departure time uncertainty bounds. In the first case, the width of uncertainty bounds is zero, i.e., arrival and departure times are in accordance with the forecasted values. In the second case, narrow bounds of uncertainty are considered, where the uncertainty bounds do not overlap. In the third case, a wider uncertainty bound is considered and the uncertainty bounds overlap. Details of all the three cases are presented in the following.
Case A: The predicted arrival and departure times of the EV are taken as 06:00 and 18:00, respectively. Due to the absence of uncertainty in this case, the arrival and departure times will remain the same as the predicted values. The operation results of microgrid components and SOC of EVs are shown in Figure 4. It can be observed from Figure 4a that, due to lower buying prices during intervals 1 to 6, electricity is bought from the utility grid. However, DG generates more power in intervals 5 and 6 due to ramp-up rate limitations to generate maximum power during peak price intervals. EVs are charged during these lower price intervals, as shown in Figure 4b. During peak price intervals, DG generates maximum power and excess power is sold to the utility grid. EV is also discharged to enhance the profit of the microgrid owner. However, the target SOC (70%) was achieved at departure time (18:00), as depicted in Figure 4b. EVs can only be utilized by the microgrid when they are in the microgrid, i.e., between their arrival and departure times. Therefore, it can be observed from Figure 4b that EVs were not utilized by the microgrid during intervals 1-5 and 19-24, i.e., charging, discharging, and SOC are all zero.

Uncertainty in Arrival and Departure Times of EVs
In order to analyze the impact of EV arrival and departure time uncertainty on the operation of the microgrid, the worst-case scenarios of renewables, loads, and market prices are considered. The worst-case scenario occurs when the loads and buying price have upper-bound values and the renewables and selling price have lower-bound values. The uncertainty in arrival and departure times of EVs are varied to analyze their impact on the operation of the microgrid. Given the worstcase scenario of the load, renewables, and market price signals, the worst-case scenario for the EV arrival and departure times is determined in this study. Three cases are considered by varying the arrival and departure time uncertainty bounds. In the first case, the width of uncertainty bounds is zero, i.e., arrival and departure times are in accordance with the forecasted values. In the second case, narrow bounds of uncertainty are considered, where the uncertainty bounds do not overlap. In the third case, a wider uncertainty bound is considered and the uncertainty bounds overlap. Details of all the three cases are presented in the following.
Case A: The predicted arrival and departure times of the EV are taken as 06:00 and 18:00, respectively. Due to the absence of uncertainty in this case, the arrival and departure times will remain the same as the predicted values. The operation results of microgrid components and SOC of EVs are shown in Figure 4. It can be observed from Figure 4a that, due to lower buying prices during intervals 1 to 6, electricity is bought from the utility grid. However, DG generates more power in intervals 5 and 6 due to ramp-up rate limitations to generate maximum power during peak price intervals. EVs are charged during these lower price intervals, as shown in Figure 4b. During peak price intervals, DG generates maximum power and excess power is sold to the utility grid. EV is also discharged to enhance the profit of the microgrid owner. However, the target SOC (70%) was achieved at departure time (18:00), as depicted in Figure 4b. EVs can only be utilized by the microgrid when they are in the microgrid, i.e., between their arrival and departure times. Therefore, it can be observed from Figure 4b that EVs were not utilized by the microgrid during intervals 1-5 and 19-24, i.e., charging, discharging, and SOC are all zero.  Case B: In this case, a narrow uncertainty bound is considered and the uncertainty bounds do not overlap. The operation algorithm will search for the worst-case arrival and departure times of the EVs within the specified uncertainty bounds. Figure 5 shows the operation results for this case along with the SOC of EVs. It can be observed from Figure 5b that EVs arrive at 09:00 and depart at 15:00. Under the allowed uncertainty bound, this period is the worst case for the microgrid owner. The market price is higher at these intervals and the EVs need to have an SOC level of 70% at the time of departure. Therefore, EVs were charged to the required level and could not benefit the microgrid owner due to the inability to discharge more power. Very limited power was discharged during time intervals 10 and 15, as shown in Figure 5b. The microgrid still had flexibility to choose the charging intervals from 10-15 due to lower uncertainty in the arrival and departure times of the EVs. Case B: In this case, a narrow uncertainty bound is considered and the uncertainty bounds do not overlap. The operation algorithm will search for the worst-case arrival and departure times of the EVs within the specified uncertainty bounds. Figure 5 shows the operation results for this case along with the SOC of EVs. It can be observed from Figure 5b that EVs arrive at 09:00 and depart at 15:00. Under the allowed uncertainty bound, this period is the worst case for the microgrid owner. The market price is higher at these intervals and the EVs need to have an SOC level of 70% at the time of departure. Therefore, EVs were charged to the required level and could not benefit the microgrid owner due to the inability to discharge more power. Very limited power was discharged during time intervals 10 and 15, as shown in Figure 5b. The microgrid still had flexibility to choose the charging intervals from 10-15 due to lower uncertainty in the arrival and departure times of the EVs. Case C: In this case, a wider uncertainty bound is selected and the uncertainty bounds overlap. The operation algorithm will select the worst-case arrival and departure times for EVs within the specified bounds. The operation results for this case are shown in Figure 6. It can be observed from Figure 6b that EVs arrived at a peak price interval and left at the beginning of the next interval. Compared to the previous case, where EVs were discharged in two intervals, in this case, EVs were never discharged. This is due to the limited stay of EVs in the microgrid and target SOC for their departure time. This is the worst possible case for the microgrid owner due to the inability to utilize EV batteries. In this case, EVs arrived in the microgrid with a minimum SOC, and due to higher uncertainty, EVs were only charged during one interval (16) to assure the required SOC target level (70%) before departure.

Budget of Uncertainty and Operation Cost
In order to analyze the impact of the budget of uncertainty on the operation cost of the microgrid, 10 cases were simulated in this study. The budget of uncertainty controls the conservatism of the problem. The higher the value of the budget of uncertainty, the higher the uncertainty in arrival and departure times of EVs. The highest maximum possible value for the budget of uncertainty is equal to the difference of the arrival and the departure time of EVs. The lowest possible value is zero, which indicates no uncertainty. The first case is the deterministic case, with the budget of uncertainty as zero. The operation cost will change if the change in the budget of uncertainty value results in a shift of EV arrival and/or departure time. It can be observed from Table 2 that with an increasd budget of uncertainty value, the operation cost of the microgrid increases. However, for some values, the operation cost remains the same. This is due to the unchanged arrival and/or departure times of the Case C: In this case, a wider uncertainty bound is selected and the uncertainty bounds overlap. The operation algorithm will select the worst-case arrival and departure times for EVs within the specified bounds. The operation results for this case are shown in Figure 6. It can be observed from Figure 6b that EVs arrived at a peak price interval and left at the beginning of the next interval. Compared to the previous case, where EVs were discharged in two intervals, in this case, EVs were never discharged. This is due to the limited stay of EVs in the microgrid and target SOC for their departure time. This is the worst possible case for the microgrid owner due to the inability to utilize EV batteries. In this case, EVs arrived in the microgrid with a minimum SOC, and due to higher uncertainty, EVs were only charged during one interval (16) to assure the required SOC target level (70%) before departure. Case C: In this case, a wider uncertainty bound is selected and the uncertainty bounds overlap. The operation algorithm will select the worst-case arrival and departure times for EVs within the specified bounds. The operation results for this case are shown in Figure 6. It can be observed from Figure 6b that EVs arrived at a peak price interval and left at the beginning of the next interval. Compared to the previous case, where EVs were discharged in two intervals, in this case, EVs were never discharged. This is due to the limited stay of EVs in the microgrid and target SOC for their departure time. This is the worst possible case for the microgrid owner due to the inability to utilize EV batteries. In this case, EVs arrived in the microgrid with a minimum SOC, and due to higher uncertainty, EVs were only charged during one interval (16) to assure the required SOC target level (70%) before departure.

Budget of Uncertainty and Operation Cost
In order to analyze the impact of the budget of uncertainty on the operation cost of the microgrid, 10 cases were simulated in this study. The budget of uncertainty controls the conservatism of the problem. The higher the value of the budget of uncertainty, the higher the uncertainty in arrival and departure times of EVs. The highest maximum possible value for the budget of uncertainty is equal to the difference of the arrival and the departure time of EVs. The lowest possible value is zero, which indicates no uncertainty. The first case is the deterministic case, with the budget of uncertainty as zero. The operation cost will change if the change in the budget of uncertainty value results in a shift of EV arrival and/or departure time. It can be observed from Table 2 that with an increasd budget of uncertainty value, the operation cost of the microgrid increases. However, for some values, the operation cost remains the same. This is due to the unchanged arrival and/or departure times of the

Budget of Uncertainty and Operation Cost
In order to analyze the impact of the budget of uncertainty on the operation cost of the microgrid, 10 cases were simulated in this study. The budget of uncertainty controls the conservatism of the problem. The higher the value of the budget of uncertainty, the higher the uncertainty in arrival and departure times of EVs. The highest maximum possible value for the budget of uncertainty is equal to the difference of the arrival and the departure time of EVs. The lowest possible value is zero, which indicates no uncertainty. The first case is the deterministic case, with the budget of uncertainty as zero. The operation cost will change if the change in the budget of uncertainty value results in a shift of EV arrival and/or departure time. It can be observed from Table 2 that with an increasd budget of uncertainty value, the operation cost of the microgrid increases. However, for some values, the operation cost remains the same. This is due to the unchanged arrival and/or departure times of the EVs or utilization of the same resource for charging EVs. For example, in cases 7 and 8, DG was used to charge EVs and was not discharged. Therefore, the operation cost remained the same for both cases. A maximum increase of 0.41% was observed for a single EV. The impact of an increased number of EVs on the operation of microgrids is elaborated in the following section.

Number of EVs and Operation Cost
In this section, the number of EVs in the microgrid was increased and their impact on the operation of the microgrid was analyzed. The number of EVs was increased by 5, 10, 25, 50, and 100 times and 1000 scenarios were simulated for each case. The arrival and departure times of each EV in each case were randomly selected, and the results are summarized in Table 3. The results of the simulated scenarios are presented in Figure 7a, and the average trend of the operation cost is shown in Figure 7b. It can be observed from Table 3 and Figure 7b that the operation cost increased with an increased number of EVs, following a linear trend. The difference of individual scenario values in each case with the average value were computed to determine the maximum and minimum deviation levels. It can be observed from Table 3 that the maximum deviation level increased with an increased number of EVs, while the minimum deviation level decreased. In contrast to the average values trend, where a linear trend was observed, the maximum and minimum deviation trends are nonlinear.

Conclusions
In this paper, an adaptive robust optimization model was developed considering both prevailing uncertainties in loads, renewables, and market price and uncertainties in arrival and departure times of EVs. The proposed solution method, especially the approximation technique to solve the outer problem, is not restricted to a set of the budget of uncertainty and can be applied to a general polyhedral uncertainty set. This approach reduces computational complexity to solve large mixed-integer problems for microgrids under uncertainty. The simulation results show that the operation cost increases when the bounds of uncertainty of arrival and departure time overlap, due to less useable time of EVs. It can also be observed from the results that as the budget of uncertainty increases, the usage time of EVs decreases. This results in increased operation cost of the microgrid. In addition, the operation cost of the microgrid increases with an increased number of EVs in a linear way. Similarly, the operation cost of the microgrid increases with increased randomness of arrival and departure times of EVs. Dual variables for EV unit e at t