*4.2. Dynamic Schedule Using PSO*

The PSO technique is used to perform optimal scheduling for minimizing the total electricity purchase cost. At the beginning of each timeslot, the charging schedule for the particular timeslot is executed to achieve the minimum electricity cost. The algorithm also determines the plan for the next timeslots. However, the schedule is revised for the upcoming timeslot depending upon the arrival of EVs in the next timeslot. The average time taken to complete the charging in each time slot is 33.40, 59.99, 59.95, 59.99,59.98, 54.30 min. The convergence curve of the PSO algorithm is shown in Figure 3. PSO's dynamic scheduling is given in Table 8, and the optimal allocation of power and resources is given in Table 9.

The EV demand is allocated to each time slot to achieve the minimum cost. The PSO's minimum cost is 2432.0 €ct, which is cheaper than the FIFS scheduling cost. As the grid's electricity cost in timeslots 7 and 8 is relatively high, PSO schedules the EVs in the first six timeslots to achieve the minimum charging cost.


**Table 7.** Dynamic scheduling using the first-in-first serve (FIFS) method.

**Table 8.** Dynamic scheduling using PSO.



**Table 9.** The optimal power and resources allocation using PSO.

*Energies* **2020**, *13*, 6384

EVs in the next timeslot. The average time taken to complete the charging in each time slot is 33.40, 59.99, 59.95, 59.99,59.98, 54.30 min. The convergence curve of the PSO algorithm is shown in Figure

**Figure 3.** Convergence curve of particle swarm optimization (PSO). **Figure 3.** Convergence curve of particle swarm optimization (PSO).

### **Table 8.** Dynamic scheduling using PSO. *4.3. Dynamic Schedule Using Shu*ffl*ed Frog Leaping Algorithm (SFLA)*

**ID Demand (kW) Timeslot 1 2 3 4 5 6 7 8** 1 16.19 0 16.19 0 0 - - - - 2 17.25 - 17.25 0 0 0 - - - 3 14.85 - - 0 14.85 0 0 - - 4 20.64 - - - 0 20.64 0 0 0 5 21.87 21.87 0 0 0 0 0 0 - The SFLA is used for the optimal scheduling of EVs to reduce the electricity purchase cost. For each slot the electricity cost is 226.1, 461.0, 444.5, 424.5, 424.5, 447.5 €ct. The total electricity purchase cost is 2428.47 €ct. The optimization techniques effectively utilize the low electricity price time slots for scheduling of EVs. Also, this shows that if the number of EVs arrives with prior booking, better scheduling is obtained to minimize the grid's charging cost. The convergence curve of the SFLA is shown in Figure 4. The convergence speed of SFLA is faster than the PSO. The scheduling results obtained by SFLA is given in Table 10. The optimal power and resource allocation are given in Table 11.


6 12.32 - - 0 12.32 - - - - 7 17.28 - 17.28 0 0 0 - - - **Table 10.** Dynamic scheduling using SFLA.


A denotes the allocated demand (kW), B represents the time (min), and C denotes the charger where FC denotes the fast charger, MC denotes the medium charger, and SC denotes the

slow charger.

**Table 11.** The optimal power and resource allocation using SFLA.

*Energies* **2020**, *13*, 6384

11.

The SFLA is used for the optimal scheduling of EVs to reduce the electricity purchase cost. For each slot the electricity cost is 226.1, 461.0, 444.5, 424.5, 424.5, 447.5 €ct. The total electricity purchase cost is 2428.47 €ct. The optimization techniques effectively utilize the low electricity price time slots for scheduling of EVs. Also, this shows that if the number of EVs arrives with prior booking, better scheduling is obtained to minimize the grid's charging cost. The convergence curve of the SFLA is shown in Figure 4. The convergence speed of SFLA is faster than the PSO. The scheduling results

*4.3. Dynamic Schedule Using Shuffled Frog Leaping Algorithm (SFLA)*

**Figure 4.** Convergence curve of shuffled frog leaping algorithm (SFLA). **Figure 4.** Convergence curve of shuffled frog leaping algorithm (SFLA). *Energies* **2020**, *13*, x FOR PEER REVIEW 17 of 25

**Table 10.** Dynamic scheduling using SFLA. **ID Demand (kW) Timeslot** Figure 5 shows that the optimization techniques provide a reduced charging cost compared to the FIFS charging algorithm. Figure 5 shows that the optimization techniques provide a reduced charging cost compared to the FIFS charging algorithm.

14 11.79 - - - - 0 11.79 - - 15 16.1 - - - 16.1 0 0 - - **Figure 5.** Cost comparison of FIFS, PSO, and SFLA. **Figure 5.** Cost comparison of FIFS, PSO, and SFLA.

16 12.04 - - 0 6.91 5.13 - - - 17 25.20 - - 0 0 25.20 0 0 0 18 14.18 - - - 0 0 14.18 - - 19 21.12 - 0 21.12 0 0 0 0 0 20 12.37 12.37 0 0 0 0 0 - - However, the charging cost of the PL is calculated without considering the microgrid (MG) scenario available with the PL. The microgrid power can be used to minimize the electricity purchase cost of the PL. The renewable energy sources provide significant potential that can benefit the CSs. When the microgrid power is supplied to the CS, the cost is reduced significantly. Compared to the grid cost, the MG cost in all the slots is cheaper, and hence it is utilized effectively [65,66]. The optimal use of renewable energy is not only beneficial for cost reduction but also supports However, the charging cost of the PL is calculated without considering the microgrid (MG) scenario available with the PL. The microgrid power can be used to minimize the electricity purchase cost of the PL. The renewable energy sources provide significant potential that can benefit the CSs. When the microgrid power is supplied to the CS, the cost is reduced significantly. Compared to the grid cost, the MG cost in all the slots is cheaper, and hence it is utilized effectively [65,66].

Total 28.56 61.50 61.50 61.50 61.49 61.33 0.00 0.00 the grid. By using the microgrid available in the PL, the cost savings are given in Table 12. Furthermore, the charging cost of EVs with uncertain arrival is examined in the next subsection and compared with the charging cost of EVs arriving with a prior booking. **Table 12.** Cost comparison of FIFS, PSO, and SFLA. The optimal use of renewable energy is not only beneficial for cost reduction but also supports the grid. By using the microgrid available in the PL, the cost savings are given in Table 12. Furthermore, the charging cost of EVs with uncertain arrival is examined in the next subsection and compared with the charging cost of EVs arriving with a prior booking.


**Considered Considered The Difference in Cost Table 12.** Cost comparison of FIFS, PSO, and SFLA.

**Microgrid (MG)**

**No Microgrid (MG)**

 Case 2: 15 EVs, out of 20 EVs, arrived with prior booking. Case 3: 10 EVs, out of 20 EVs, arrived with prior booking.

**Number Method**

times are randomly generated. In each case, the results are obtained using the SFLA and then compared with the PSO and FIFS scheduling algorithms. The dynamic system can determine a charging schedule at the beginning of each timeslot using all the EVs with and without booking, and

The arrival and departure times are randomly assigned within the eight timeslots. The users with prior booking need to provide the expected arrival time, departure time, and charging demand.
