A Modiﬁed Coronavirus Herd Immunity Optimizer for the Power Scheduling Problem

: The Coronavirus herd immunity optimizer (CHIO) is a new human-based optimization algorithm that imitates the herd immunity strategy to eliminate of the COVID-19 disease. In this paper, the coronavirus herd immunity optimizer (CHIO) is modiﬁed to tackle a discrete power scheduling problem in a smart home (PSPSH). PSPSH is a combinatorial optimization problem with NP-hard features. It is a highly constrained discrete scheduling problem concerned with assigning the operation time for smart home appliances based on a dynamic pricing scheme(s) and several other constraints. The primary objective when solving PSPSH is to maintain the stability of the power system by reducing the ratio between average and highest power demand (peak-to-average ratio (PAR)) and reducing electricity bill (EB) with considering the comfort level of users (UC). This paper modiﬁes and adapts the CHIO algorithm to deal with such discrete optimization problems, particularly PSPSH. The adaptation and modiﬁcation include embedding PSPSH problem-speciﬁc operators to CHIO operations to meet the discrete search space requirements. PSPSH is modeled as a multi-objective problem considering all objectives, including PAR, EB, and UC. The proposed method is examined using a dataset that contains 36 home appliances and seven consumption scenarios. The main CHIO parameters are tuned to ﬁnd their best values. These best values are used to evaluate the proposed method by comparing its results with comparative ﬁve metaheuristic algorithms. The proposed method shows encouraging results and almost obtains the best results in all consumption scenarios. toward an optimal solution for the seven scenarios. The ﬁgure shows that CHIO converges towards the optimal solution better than the other algorithms in scenarios 1, 3, 4, 5, 6, and 7. This situation is due to CHIO’s robust performance in balancing exploitation and exploration when ﬁnding the optimal solution. In addition, the ﬁgure shows that the convergence rate of CHIO is lower than that of the other algorithms for the same scenarios.


Introduction
The traditional grids cannot fulfill the rapid growth of users' power demand because of their primitive equipment and distribution systems, which can lead to blackouts in residential areas. This is because of the gap between power production and power demand, particularly in peak periods. Therefore, an alternative approach on the basis of smart technologies is proposed to address these issues, called the smart grid [1,2].
Smart grids are an improved generation of the traditional grids, mainly constructed to enhance communication, control, distribution, and delivery systems. These features improve the interaction between power supply companies and users by sending users the power and receiving feedback. The users' feedback allows supply companies to predict the power consumption of upcoming periods and produce enough power. Using smart grid technologies the power consumed at some periods, such as peak periods, is still high, which obliges power supply companies to operate more power plants to address this issue and maintain power systems efficiently. Accordingly, the cost of producing power and electricity tariffs will be increased which increases the electricity bill (EB) for users [1,3].
Power supply companies propose a new approach based on dynamic electricity tariffs to dispraise the power consumed and to reduce it at peak periods. This new approach is proposed to motivate users to reschedule smart home appliances' operation time to be operated at off-peak periods. Such an approach is called a dynamic pricing scheme. The dynamic pricing schemes generate dynamic electricity tariffs in which the tariffs are high and low during peak and off-peak periods, respectively. The most common dynamic pricing schemes are block rate (IBR), real-time price (RTP), time-of-use price, and critical period price [1,4,5].
The problem of rescheduling the appliances' operation time based on a dynamic pricing scheme(s) is called the power scheduling problem in the smart home (PSPSH). The main benefits that can be obtained by power supply companies and users when solving PSPSH are maintaining the stability of the power system. This is achieved by reducing the ratio between average and highest power demand which is called peak-to-average ratio (PAR), and reducing EB while considering the user comfort (UC) level [1].
The PSPSH is modeled as an optimization problem to optimally achieve its objectives, including reducing EB and PAR and improving UC level. The formulation of PSPSH is proposed in two forms on the basis of the objective function: single objective and multiobjective functions [2,6]. The single objective formulation is proposed to reduce only EB by ignoring the other objectives, whereas the multi-objective formulation considers reducing EB and increasing UC. However, the PAR's effect was not seriously considered in addressing PSPSH and the optimization processes, where only a few studies recognized it in the problem formulation [7][8][9].
Recently, a large number of metaheuristic algorithms inspired by viruses' behavior in nature are proposed. These algorithms are corona virus optimization [39], coronavirus optimization algorithm [40], virus spread optimization [41], virus colony search [42], and coronavirus herd immunity optimizer (CHIO) [43]. These algorithms presented a good performance in addressing optimization problems, where CHIO is the most successful due to its dynamic and adjustable control parameters that allow it to investigate and explore search spaces efficiently [44][45][46][47].
In this paper, CHIO is adapted and modified to handle PSPSH and achieve its objectives efficiently. CHIO is inspired by the herd immunity strategy to tackle the spreading of coronavirus pandemics . CHIO's primary goal is to find the best protection for society against the disease by transforming the bulk of the susceptible community that is not infected by the virus to become immune. Due to the discrete nature of PSPSH, CHIO is adapted and modified to address the discrete PSPSH and to achieve its objectives efficiently. CHIO is used for PSPSH due to its powerful accomplishment in exploring rugged, constrained, and complex search spaces. In addition, it has a high ability to maintain the balance between exploitation and exploration in finding the optimal/near-optimal solution(s). Seven scenarios are used in the evaluation study to evaluate CHIO performance. Each scenario contains up to twenty-three smart appliances to be scheduled in accordance with a dynamic pricing scheme. The main CHIO parameters are tuned to find their best values. The results obtained by CHIO are statistically analyzed to evaluate and describe its performance clearly and carefully. In addition, CHIO's results are compared with that of five optimization algorithms, including genetic algorithm (GA), particle swarm optimization (PSO), grey wolf optimizer (GWO), wind-driven optimization (WDO), and differential evolution (DE).
The paper is structured as follows. Section 2 discusses PSPSH background and formulations in terms of a single objective and multi-objective. Sections 3 and 4 provide a comprehensive description of the inspiration and adaptation of CHIO for PSPSH, respectively. In Section 5, the experimental results of the proposed approach are presented and described. Section 6 concludes the paper.

Power Scheduling Problem in Smart Home
This section presents and discusses the most significant state-of-the-art studies that tackled PSPSH using metaheuristic algorithms. In addition, a general formulation for PSPSH including all its objectives is presented. Furthermore, PSPSH formulation in terms of single objective and multi-objective are modeled.

Related Work
According to [1] a massive number of optimization algorithms were adapted to address PSPSH including exact and metaheuristic algorithms. The metaheuristic algorithms are the most popular because they can explore rugged search spaces and find the best solutions. Accordingly, the most popular metaheuristic algorithms used to address PSPSH are reviewed in this section.
The work Aslam et al. [48] implemented three popular metaheuristic algorithms, including GA, cuckoo search, and crow search algorithm to handle PSPSH and find an optimal way to reduce PAR and EB. The proposed algorithms were tested in two scenarios, including 31 smart homes. Two of the most popular pricing schemes were used, including critical period price and RTP. The results showed the high performance of used algorithms in optimizing the values of PAR and EB.
A multi-objective approach was proposed to optimize UC and EB by Soares et al. [49]. GA was adapted for the proposed approach to achieve the optimal schedule for smart appliances. Six smart appliances were used within 36 h to calculate the power consumed. The results of the proposed method were presented and analyzed in different aspects. The proposed method achieved good results in reducing EB and improving the UC level considering the power system's stability.
Two metaheuristic algorithms were adapted to handle PSPSH and optimize its objectives by Rasheed et al. [50]. These algorithms are WDO and PSO. The authors used several scenarios to evaluate the performance of the adapted algorithms within 24 h. WDO shows better performance than PSO in obtaining the best schedules. GA for efficient scheduling in a smart home is applied in Zhao et al. [2]. The proposed approach combined two pricing schemes, including RTP and IBR, to achieve the best power system stability and EB. The problem was formulated as a multi-objective optimization problem to reduce EB and improve the UC level. In the simulation results, the proposed method significantly impacted the whole electricity system, where it obtained encouraging performance in achieving the objectives.
Two metaheuristic algorithms, including crow search algorithm and grasshopper optimization algorithm, were adapted to address PSPSH optimally by Ullah et al. [51]. The adapted algorithms were tested and evaluated within 24 h using several scenarios. The results proved that the grasshopper optimization algorithm obtains high performance as it achieved better results than crow search algorithm and other metaheuristics algorithms.
An efficient model that accumulates two residential areas within a smart grid via a wide area network was proposed by Rahim et al. [52]. The proposed model main objectives are to reduce PAR, EB, execution time, and user discomfort. EBs were calculated based on two pricing schemes, including time-of-use price and IBR. The authors formulated the objectives as a multi-objective optimization function. Three optimization algorithms, including GA, ant colony optimization, and binary PSO, were tailored and evaluated on 13 home appliances within 24 h. The results demonstrated that GA excels ant colony optimization and binary PSO concerning EB.
A new model is proposed in Muralitharan et al. [53] to balance the amount of power consumed over a time horizon by applying the concept of a threshold limit and using a multi-objective evolutionary algorithm. The primary benefit of achieving such a goal is to minimize EB and user discomfort. The experiments were performed on ten appliances to assess the performance of the proposed approach. The threshold limit concept is applied during the scheduling process by switching off several appliances once the used power amount is exceeded the threshold limit. The results demonstrated that the proposed approach provided a good compromise between EB and UC level.
The GWO is adapted as a multi-objective optimization approach in Makhadmeh et al. [8] to tackle PSPSH. The proposed approach seeks optimal scheduling that simultaneously reduces EB, PAR, and user discomfort. Seven scenarios were designed to evaluate the proposed approach's performance. RTP and IBR schemes were considered to calculate the EB because the IBR's mechanism solely caused dispersing power consumption over the time horizon that resulted from maintaining the power consumption in a certain limit for a specific time slot. The simulation results provide a comparison between GWO and GA on the basis of the datasets defined by the authors. GWO obtained better results than GA. GWO achieved significant savings in EB and PAR. Moreover, GWO compared against 19 stateof-the-art algorithms using the recommended settings related to the consumption profile considered in these algorithms. The results demonstrated that GWO nearly surpasses other algorithms in minimizing EB and PAR.
PSO was adapted to tackle PSPSH by Makhadmeh et al. [54]. The main target of PSO is to provide an adequate solution to PSPSH by minimizing EB and PAR and maximizing UC level. Unlike the previous studies, this research added new factors, namely smart batteries, to provide more efficient scheduling to the appliances. The simulation results demonstrated that the added smart battery is significantly improved the results in terms of EB, PAR, and UC level. Furthermore, the performance of PSO was compared against GA and the results showed that PSO surpasses GA in terms of trade-offs between PSPSH objectives.
Bacterial foraging optimization algorithm and strawberry algorithm were adapted to tackle PSPSH by Khan et al. [55]. Having optimal scheduling of power for the smart home appliances entails an optimal minimizing of EB and PAR. To make this goal possible, bacterial foraging optimization algorithm and strawberry algorithm examined the possible permutation solutions for PSPSH that efficiently minimize EB and PAR as much as possible.
The simulation results showed that both optimization algorithms reduced total EB and PAR by scheduling the load from peak hours to off-peak hours. Results also showed that bacterial foraging optimization algorithm reduced EB better than the strawberry algorithm.

PSPSH Formulation
This section elaborates on the mathematical modelling of PSPSH. The section starts with smart home appliances classification to model power consumption. Subsequently, EB, PAR, and UC parameters are formulated. Finally, a multi-objective model that combined all PSPSH objectives is presented.

Power Consumption
Any smart home can have shiftable appliances (SAs) and non-shiftable appliances (NSAs). SAs can work autonomously, but users can set their time parameters ahead of time, such as when and how long it will be operated. As an illustration, users could set such parameters for the cloth dryer to work during a suitable time. On the other hand, NSAs need to be operated manually, and users cannot set their time parameters. As an illustration, users have no means to set periods to start the TV ahead of time.
This study investigates how to satisfy the objectives of PSPSH through setting SAs at times that meet users' requests while NSAs functions manually.
Let us say S and NS are SAs and NSAs vectors, as shown in Equations (1) and (2).
where s 1 represents the first SA in S, s m is the last SA in S, ns 1 is the first NSA in NS, ns q is the last NSA in NS, and m and q are the total number of SAs and NSAs, respectively. In each smart home, the amount of consumed power of each SA can be modeled as follows: where ps j i is the amount of power consumed by s i when we have a time interval t j . t j is the time interval within the time boundary T which as shown in Equation (4). n is the total number of time intervals in T T = [t 1 , t 2 , . . . , t n ], As mentioned earlier, users can set the time parameters for SA. These time parameters the allowing period for SAs to be operated (OTP) and their operation cycle (LOC). Users can set the starting time (OTP s ) and the ending time (OTP e ) of OTP as shown in Equations (5) and (6).
where OTP s1 and OTP e1 symbolize the first appliance starting and ending time, respectively. On the other hand, OTP sm and OTP em is the last appliance starting and ending time, respectively. For the second time parameter, LOC of SAs is presented as follows: where l 1 symbolize the LOC of the first SA, and l m is the LOC of the last SA. Moreover, the vectors St and Et have starting and ending time of SAs operations, respectively, (see Equations (8) and (9)). The time parameters presented previously are illustrated in Figure 1.
where st 1   As discussed previously, users cannot set the time parameters for NSAs. As a result, the power consumption of NSAs (PNS) is modeled without taking into account T in the expression presented in Equation (10) PNS = [pns 1 , pns 2 , . . . , pns q ], (10) where pns 1 symbolizes how much power is consumed by ns 1 , and pns q is the power consumption of ns q .

Electricity Bill (EB)
Reducing EB is one of the main reasons that trigger users to optimize power consumption. Equation (11) can be used to calculate EB for SAs. It is worth mentioning that EB for NSAs cannot be calculated because their operations time is not available.
where pc j represents the electricity cost at the time interval j. In this paper, RTP is applied as a dynamic pricing scheme. The use of both RTP and IBR is followed because of the IBR efficiency in spreading the power consumption of SAs to preserve the stability of the power system [2]. The IBR have two levels of costs, including standard prices and high prices (see Equations (12) and (13)).
where a j is the standard price and b j is the high price. ps j is how much power is consumed by SAs during the period of time j, and C is a threshold between a j and b j .
where λ is the ratio between a j and b j and it is a positive number.

Peak-to-Average Ratio (PAR)
PAR is the percentage between the highest power consumption and the average power consumption in T. Ideally, PAR will be reduced to balance power consumption and keep the power system stable. PAR is calculated using the following formula: where where PS max represents the maximum power consumed by SA during T and PS avg symbolizes the average power consumed within the same period.

User Comfort (UC) Level
UC level can be enhanced by shortening the waiting time when running SAs (waiting time rate (WTR)) [2]. Another factor for enhancing the UC level is to increase the power available to run NSAs within C (capacity power limit rate (CPR)) [8]. Both of these parameters are considered for scheduling to decrease the waiting time for SAs and maximize the power available for NSAs.
The first UC parameter WTR is mathematically modeled as follows: To compute the average WTR for all SAs we can use Equation (16).
The second UC parameter CPR is mathematically modeled as follows: where ON A symbolize how many NSAs have operation power that is beyond the available power at the time j. It is mathematically modeled as follows: where AP j represents the available power to operate NSAs at time j. Please note that AP j is computed based on how much power is consumed by SAs at any time j and C using the formula: The computation of the mean of CPR for T is mathematically modeled as follows: Observe that the range of values for WTR avg and CPR avg is within the interval 0 and 1. As a result, the ratio of UC can be computed using the following formula:

Multi-Objective Function
In this study, the objective function of PSPSH is formulated as a multi-objective function by formulating PSPSH as a multi-objective optimization problem. The primary aim of this formulation is to optimize all PSPSH objectives, including EB, PAR, WTR, and CPR, simultaneously. As mentioned previously, all these objectives affect users and power supply companies at the same time, where users need to be motivated to schedule their appliances operations by minimizing EB and UC level, which contains WTR and CPR. There is a trade-off between optimizing EB and UC, where minimizing EB could decrease UC and vice versa. In contrast, power supply companies achieve benefits from the proposed formulation by optimizing PAR. PAR parameter is used to minimize the highest power consumption for users, accordingly, enhance power generation and distribution systems of the supply companies.
A non-Pareto scalarization approach, called the weighted sum, is used for the multiobjective function due to ineffectiveness of Pareto optimality to deal with problems contain more than three objectives, such as PSPSH [56][57][58]. The weighted sum method is used for PSPSH due to its easy implementation, simplicity, non-complexity, and wide use by PSPSH literature [59][60][61][62][63]. The formulation of PSPSH's multi-objective function is modeled based on Equations (11), (14), and (16) as follows: where A and B represent two positive numbers, and w 1 , w 2 , w 3 , and w 4 are weight parameters denoting importance of each objective function.

Coronavirus Herd Immunity Optimizer
Recently, a new natural-inspired human-based metaheuristic algorithm called CHIO has been proposed by Al-Betar et al. [43]. The idea is inspired by the herd immunity used as a mechanism to stop the Coronavirus pandemic. In herd immunity, most of the population must be infected and recovered from Coronavirus. This partial population will shield the remaining individuals from being infected where the immune individual stands as a firewall to prevent the infection of susceptible individuals. Such inspiration is formulated as an optimization algorithm and tested using various standard test functions and engineering problems. In this section, the inspiration of CHIO is illustrated, and its procedural optimization steps are provided.

Inspiration
In biology, the virus's replications and spreading are essential features where the host (infected) individual can easily transmit it to other individuals through direct communication. In December 2019, a novel respiratory Coronavirus (2019-nCov) was identified in Wuhan, China. Therefore, the World Health Organization announced the name of the new contagious disease to be Corona Virus Disease (COVID-19) [64]. The pandemic is very quickly spread worldwide and affects their economic, political, social sides. The incubation period of COVID-19 from the time individual caught the virus until the symptoms first appeared was estimated from 2 to 14 days. Currently, no antiviral treatment is yet recommended for the COVID-19 infection. The treatment depends on the immunity system of the infected individuals. Until discovering an approved vaccine as antiviral to COVID-19 infection, some countries protect their population by directing them to follow the health care standards such as wearing masks, committing to social distancing, lockdown, etc. Other countries, like the UK, preferred to implement herd immunity rules to yield a self-protected population and thus control the COVID-19 epidemic outbreak [65].
The social distancing strategy is recommended by World Health Organization to slow down the virus spreading. The COVID-19 can be transmitted from individual to individual through direct contact with the predefined distance estimated around 1.8 m or indirect contact through objects or surfaces around the persons. The transmitting media is essentially the small droplets from the mouth or nose when the infected person sneezes, coughs, or exhales. Social distancing is affected by the basic reproduction rate, which is the number of people that can catch COVID-19 from an infected person.The higher the basic reproduction rate the quicker the spreading of the virus; thus, the fatality rate will be increased. The fatality rate determines the percentage of the infected individuals to die. This is affected by the immunity systems of the individuals. Older people and those with chronic diseases have a higher fatality rate. Therefore, the population's average age is an essential factor for recovering or not [66].
In the herd immunity principle, the virus is transmitted from one individual to others until most of the population is infected and recovered. Therefore, the protected individuals' immunity systems can stop the spreading of COVID-19 from being transmitted to the susceptible individuals [67]. This is visualized in Figure 2, where the immune individuals can downsize the virus from spreading from infected individuals to the susceptible ones. The immune individuals shield the susceptible ones as a firewall against virus spreading. The herd immunity threshold is estimated by 60%, which determines the percentage of population individuals shall be immune to protect other susceptible individuals.
Normally herd immunity can be implemented as follows [65,67,68] : • A group of infected individuals infects a group of susceptible individuals. • The majority of the infected people recover and gain immunity against COVID-19, and a low rate are dying. • The immune individual will stop the virus from spreading; thus, the population is protected.

Step 1: Initialization
Initially, any problem must be modeled as an optimization problem to be addressed by optimization algorithms. In addition, two main parts should be identified, including the solution representation and the objective function. The solution of a constrained optimization problem can be formulated as a vector x = (x 1 , x 2 , . . . , x d ) of d decision variables. Each decision variable has its value range . where x min i denotes the minimum value range and x max o denotes the maximum value range. Accordingly, the objective function of the solution x can be formulated as follows: where f (x) is the objective function to measure the fitness of solution x. g b (x) = w b is the set of ath equality constraints while h z (x) = e z is the set of lth inequality constraints. CHIO has two types of parameters: algorithmic and control. The algorithmic parameters are maximum number of iterations (I), herd immunity population size (H IP), and C 0 which is the initial infected cases. CHIO also has two control parameters, including basic reproduction rate (BR r ) denotes the rate of transmitting the virus from individual to another and max age (Max Age ) which determines the status of infected individual according to its infection age.
Step 2: Initialize herd immunity population The herd immunity population (HIP) is a memory matrix of size d × H IP stored in CHIO individuals. These individuals are initialized normally concerning the equality and inequality constraints. HIP matrix is represented in Equation (24). The objective function values (or immunity rates) are computed for all initialized solutions using Equation (23).
To keep tracking the status of HIP individuals, the status vector ST = (ST 1 , ST 2 , . . . , ST H IP ) of size H IP is initialized by zeros as many as H IP − C 0 and ones as many as C 0 . Please note that zeros and ones refer to the susceptible and infected cases, respectively.
Step 3: Herd immunity evolution In this step, A new CHIO solution is generated based on three rules, which are discussed below.
Infected case: the decision variable o in the solution y, such as x y o (t + 1), will be modified based on social distancing calculated based on the difference between the current decision variable and a decision variable taken from any infected case with a probability r ∈ [0, 1 3 BR r ), such as: where where x c o (t) is selected from infected case x c whereby the status vector (ST c = 1). Susceptible case: the decision variable o in the solution y will be modified based on social distancing calculated the difference between the current decision variable and a decision variable taken from any susceptible case with a probability of r ∈ [ 1 3 BR r , 2 3 BR r ), such as: where where x h o (t) is selected from any susceptible case x h based on the status vector (ST h = 0). Immune case: the decision variable o in the solution y will be modified based on social distancing calculated the difference between the current decision variable and a decision variable from any immune case with a probability of r ∈ [ 2 3 BR r , BR r ) such as: where where x v o (t) is selected from the best immune case x v with regard to the status vector (ST) such that: f (x y ).
In summary, the operations of the three rules can be formulated as follows: Step 4: Updating HIP The fitness value (or immunity rate) of each generated solution f (x y (t + 1)) is computed using fitness function. The generated solution x y (t + 1) replaces the current one x y (t), when f (x y (t + 1)) < f (x y (t)). In case the replacement is done, the Age value of such solution is increment by one (i.e., A y = A y + 1) if the current solution x y (t) is infected case (S T y = 1).
In addition, CHIO updates the status vector (S T y ) for generated solution x y based on the herd immune threshold formulated in Equation (34) ST Please note that is_corona(x y (t + 1)) is a binary value set to one if x y (t + 1) inherited a value from any infected case. The f (x) is the fitness mean value of the individuals in HIP, such as ∑ H IP Step

5: Check Fatality
This step decides whether the infected cases (i.e., x y (t + 1) ∧ (S T y == 1)) are dead or immune. This is specified by the parameter Max Age . When the infected case's age exceeds the Max Age limit such that A y ≥ Max Age without any improvement, the infected case will be died (or be removed from the HIP) and it is regenerated from scratch. Furthermore, the A y and ST y are set to zero. This is the main operator for diversification.

Step 6: Stop condition
The evolution steps (Step 3 to Step 5) are repeated until the HIP is only contained in either susceptible or immune cases but not infected cases. Typically, the maximum number of iterations is used as a stopping criterion.

The Proposed CHIO-PSPSH
In this section, CHIO is modified and adapted to address PSPSH in terms of discrete search space. CHIO is used for PSPSH due to its high and robust performance in addressing large-scale search spaces like the one of PSPSH. CHIO proved its robustness when applied to tackle different research fields, such as travelling salesman problems [69], vehicle routing problems [44], feature selection problems [45], wheel motor design problems [70], intrusion detection systems [46], and others [47,71,72]. CHIO has achieved its popularity since its foundation due to its dynamic parameters that allow it to explore search spaces efficiently and find optimal solutions. In addition, CHIO contains two adjustable control parameters that enhance its searchability for better investigation.
The adaptation of CHIO for PSPSH contains several steps that describe its behaviour in finding optimal/near-optimal solutions. These steps are deeply discussed below.
Step 1: Initialize CHIO-PSPSH parameters The first step of adapting CHIO to handle PSPSH is initializing CHIO and PSPSH parameters. The main parameters of PSPSH that must be initialized are the home appliances S and NS, length of operation cycle LOC, time horizon T, power required by appliance PS and PNS, boundary of operation time periods OTPs and OTPe, and electricity prices pc.
where st y i denote st of SA i in solution y.

Step 3: Calculate fitness function
Each solution is evaluated based on Equation (22) in this step. After the evaluation, the best solution is assigned with the highest immunity rate (BestSol).

Step 4: Coronavirus herd immunity evolution
This step is the primary step of CHIO. The SA i in the solution y may be affected by social distancing or remain the same based on BR r using three rules as follows: Step 5: Update herd immunity population In this step, the fitness value of each PSPSH's generated solution st y i (t + 1) is calculated and replaced the current solution st y i (t) if achieved a fitter value, such that f (st y (t + 1)) < f (st y (t)). The age vector A y is also increased by one if ST y = 1. In addition, the status vector (S T y ) is updated for each solution using Equation (34).
As mentioned previously, the CHIO is modified to deal with discrete optimization problems. Therefore, in this step, once the PSPSH population is updated, all values in the population will be converted from continuous to discrete values.

Step 6: Fatality cases
This step decides whether the infected solution (i.e., st y (t + 1) ∧ (S T y == 1)) is dead or immune. This is specified by the parameter Max Age . When the Age of the infected solutions exceed the Max Age limit without any improvement, the infected solutions are removed from the population and regenerated. Furthermore, the age and ST y are set to zero.
Step 7: Stop criterion CHIO repeats Step 3 to Step 6 until reach the algorithm stop criterion. Figure 5 presents the flowchart of adapting CHIO for PSPSH. Table 1 shows the mapping between the components of PSPSH and CHIO in the optimization processes.

Experimental Results
In this section, the proposed CHIO-PSPSH method is experimentally examined to analyze and evaluate the CHIO performance in addressing PSPSH and achieving its objectives using seven different consumption scenarios. The main CHIO parameters are tuned to find their best values. CHIO-PSPSH performance is statistically evaluated to track its behaviour in obtaining the best schedules. CHIO-PSPSH's results are compared with that of five optimization methods, including GA, PSO, GWO, WDO, and DE, using the same consumption scenarios.

Experimental Design
The proposed CHIO-PSPSH is tested using seven different consumption scenarios and each scenario is evaluated separately. As mentioned previously, the dynamic pricing scheme used in this study is a combination scheme of the RTP and IBR schemes. The RTP scheme is adopted from Commonwealth Edison Company from 1st to 7th of June, 2016 (7 days). λ and C are used by the IBR scheme and are set to be 1.543 and 0.0333 per time slot, respectively, (Equation (12)) [2,7,54].

CHIO Parameters Analyzation
CHIO is analyzed and evaluated using seven consumption scenarios to show its performance in addressing PSPSH. As discussed previously, CHIO's sensitivity is based on two control parameters RB r and Max Age . Therefore, the two control parameters are studied and analyzed in this section to find their best values in achieving the proposed CHIO-PSPSH optimal schedules.
The effect of RB r and Max Age are studied using four values. These values are 0.005, 0.05, 0.1, and 0.5 for RB r , and 50, 100, 300, and 500 for Max Age [43]. Each value is evaluated using PSPSH objectives, including EB, PAR, WTR, and CPR, as shown in Table 6. The table  presents   The table proves the robust performance of CHIO when the values of its control parameters RB r and Max Age are 0.05 and 50, respectively. It obtained the best results six times including best PAR two times, best WTR one time, and best CPR 3 times. Table 7 shows the values of CHIO's control parameters that achieve the best reduction for each PSPSH objective in each scenario. For example, the best EB for the first scenario is achieved when RB r and Max Age are 0.05 and 500, respectively. Accordingly, the best control parameters' values that obtain the best PSPSH schedules are 0.05 and 50 for RB r and Max Age , respectively. Therefore, these values will be considered in the next stage of the experiment and evaluation.

Illustrative Example
For CHIO-PSPSH behaviour further explanation, an illustrative example of how CHIO components deal with PSPSH is presented in this section. As mentioned previously, adapting CHIO to deal and address PSPSH contains six main steps, as shown in Figure 5.
In the first step (Initialize CHIO-PSPSH parameters), all PSPSH and CHIO parameters are initialized. For PSPSH, the parameters are initialized as: T = 1440, PS and PNS = the power required for each SA and NSA, which are taken from Tables 2 and 3, respectively, S and NS = random number ∈ Z according to OTPs and OTPe which are initialized using Table 2, and pc = values extracted from Equation (12). For CHIO parameters, I = 100, HIP = 5, C 0 = 1, BR r = 0.05, and Max Age = 50.
In the second step (Initialize CHIO-PSPSH population), PSPSH's solutions are generated. The population contains five solutions (H IS), and each solution contains five elements (number of appliances), as shown in Equation (35).
In step 3 (Calculate fitness function), the solutions are evaluated based on the objective function presented in Equation (22). After the evaluation, the solution with the fittest value is assigned as the best solution (highest immunity rate).
Steps four (Coronavirus herd immunity evolution) and five (Update herd immunity population) modify the cases and update the solutions. There are three main cases in CHIO, including normal/susceptible, infected, and immune/recovered. These cases are determined and updated iteratively for each solution according to Equation (34). As mentioned previously in this example, the number of iterations I is set to 100. Therefore, the CHIO will update the solutions and their status 100 times to reach its optimal solution if the conditions in Equation (34) are achieved. The solutions and their cases for the 100 iterations are presented in Table 8. As shown in the table, in the first iteration, the solution with the fittest value is assigned as the best solution, which is 0.4117, and the normal, infected, and recovered cases are assigned by 4, 1, and 0, respectively. In iteration 8, CHIO found a better solution with a better fitness value, and the three cases are still the same. Furthermore, in iteration 14, the best solution is changed without changing the solutions cases. The solutions cases start changing in iteration 33, where the normal and infected solutions become 3 and 2, respectively. In iteration 39, the solutions cases are changed to 3, 1, and 1 for the normal, infected, and recovered solutions. A new solution is infected in iteration 58, and the best solution value becomes 0.4049. Another case of a solution is changed from infected to recovered in iteration 60, and the best solution is updated as well. The best solution is also updated in iteration 77. In iteration number 83, a solution dies, and a new solution is generated to update the best solution. The CHIO attempts to update the population is continued until iteration 100.
In the last step, the stop criterion is checked.

Experimental Evaluation
In this section, the effect of CHIO on EB, PAR, WTR, and CPR reduction is evaluated and compared with other five popular metaheuristics, including GA, PSO, WDO, DE, and GWO.

Algorithms Effect on EB
The algorithm's effect on EB value is presented and compared. In addition, the overall reduction is included in this comparison to present the best algorithm in reducing EB.
The average EB for seven scenarios is reduced to (55.6472), (56.1549), (57.5272), (57.7394), (56.8562), and (57.2460) using GA, PSO, WDO, DE, GWO, and CHIO, respectively. EBs obtained by these algorithms for the seven scenarios are compared in Table 9. The table shows a comparison between the algorithms in each scenario and their average EB. Please note that the PSO outperforms all other algorithms in six scenarios, including scenario numbers 1, 2, 3, 5, 6, 7, in reducing EB, whereas GWO performs better in reducing EB in the fourth scenario. In addition, PSO achieves the best overall reduction, where it obtains a better average EB than the other algorithms.

Algorithms Effect on PAR
This section presents PAR reduction on the basis of the considered algorithms. The PAR values obtained by all compared algorithms for seven scenarios are presented in Table 10.  The table presents   Notably, GA obtains the best PAR value in scenario number 6, whereas PSO outperforms the compared algorithms in the first and second scenarios. However, CHIO achieves the best PAR value in scenarios 3, 4, 5, and 7. In addition, CHIO performs better in reducing the overall PAR value, where it obtains the best average PAR value compared with the other algorithms.

Algorithms Effect on UC level
In this section, the effect of the compared algorithms on the basis of the two parameters of UC (i.e., WTR and CPR) is evaluated and compared to show their performance in improving the schedules in terms of UC enhancement.
Tables 11 and 12 present WTR and CPR values obtained by all compared algorithms for the seven scenarios. In addition, the average WTR and CPR for the seven scenarios are presented in the tables to investigate which algorithm can achieve a better overall reduction in terms of WTR and CPR.  Table 11 presents the CHIO's robust performance when compared with the other algorithms in reducing WTR, where it obtains the best WTR value in four scenarios. In addition, CHIO achieves the best average reduction when compared with all considered algorithms. In terms of reducing CPR value, WDO obtains the best results, where it achieves the best CPR values in scenario numbers 2, 3, 4, 5, and 7. In addition, it obtains the best average CPR reduction.

Performance and Statistical Evaluation
The obtained results show that some algorithms obtain good results in reducing EB but achieve the worst results in reducing WTR and CPR, as shown by GA and PSO results. In addition, CHIO outperforms all algorithms in reducing PAR and WTR, whereas DE achieves the best results in reducing CPR. Accordingly, finding the best overall reduction for all PSPSH objectives by all algorithms is necessary to show the algorithm with the best performance in obtaining the best solution in terms of all objectives. Table 14 shows the fitness values (FF) obtained by all algorithms with reduction for all objectives. The table proves that CHIO algorithm achieves high performance as it finds the best PSPSH schedules and it achieves the best FF for all scenarios except the second scenario. Figure 6 illustrates all algorithms performance using the convergence behaviour toward an optimal solution for the seven scenarios. The figure shows that CHIO converges towards the optimal solution better than the other algorithms in scenarios 1, 3, 4, 5, 6, and 7. This situation is due to CHIO's robust performance in balancing exploitation and exploration when finding the optimal solution. In addition, the figure shows that the convergence rate of CHIO is lower than that of the other algorithms for the same scenarios. (g) Figure 6. CB for the methods. A statistical comparison between the results obtained by all algorithms is presented in Table 15 to investigate any statistically significant difference that exists between the results obtained by CHIO and the compared algorithms. The CHIO's results are compared with the other algorithms due to its encouraging results. As it achieved the best FF in six scenarios. The Wilcoxon signed-rank test is used for this statistical comparison. The pvalue is used to estimate whether or not there is a significant difference between the results of the algorithms. A significant difference can be obtained if the p-value is lower than or equal to 0.05. Otherwise, the difference in the results is insignificant. Table 15 provides a statistical comparison based on the algorithms' FF. The table indicates that CHIO considerably decreases FF when it is compared to the other algorithms, with a meaningful difference in all cases. Please note that the p-value is not presented for DE and GWO in the second scenario because these algorithms obtained better FF than CHIO in this scenario.

Conclusions and Future Work
In power systems, scheduling the smart home appliances to proper operation periods concerning the dynamic pricing scheme(s) is known as PSPSH. This scheduling problem is essential to control the power for supply companies and their users to reduce PAR and EB and to ensure UC level. PSPSH is formulated as a constrained optimization problem with multi-objective features. Several optimization algorithms have been used to tackle PSPSH. Due to their impressive characteristics, metaheuristic algorithms are successful in tackling PSPSH. Quite recently, CHIO was established as a human-based optimization algorithm that imitates the herd immunity strategy to stop the spread of the COVID-19 disease. In this paper, CHIO is adapted to address PSPSH (CHIO-PSPSH) and achieve its objectives efficiently due to its ability in achieving the right balance of exploitation and exploration, thus finding the optimal/near-optimal solution(s).
The proposed CHIO-PSPSH is examined using a dataset that contains 36 home appliances and seven scenarios. The main CHIO parameters, including RB r and Max Age are tuned to find their best values. The results prove CHIO's robust performance when the values of its control parameters RB r and Max Age are 0.05 and 50, respectively. These best values are used in the evaluation of the proposed method by comparing its results with the other five metaheuristic algorithms, including GA, PSO, WDO, DE, and GWO. These methods are compared in terms of all PSPSH objectives (i.e., EB, PAR, WTR, and CPR) to show the best method in optimizing the problem. Generally speaking, the proposed CHIO shows the high performance when addressing PSPSH, where it obtains the best PAR and WTR results compared with the other methods. In addition, it achieves the best results and convergence for the multi-objective function reduction. However, in terms of EB and CPR, PSO and WDO achieve the best values. In addition, DE yields the best UC improvement results. A statistical comparison between the results obtained by CHIO against the compared methods is conducted to detect any statistically significant difference between the obtained results. The statistical comparison proves the significant difference in the results obtained favoring CHIO.
Possible future directions can be considered to improve the performance of the proposed method and the quality of the PSPSH solutions. The future directions are summarized as follows: • As mentioned previously, CHIO contains two adjustable control parameters, including BR r and Max Age , where their values are changing from an optimization problem to another. These parameters are tuned in Section 5.2 based on the recommended values suggested by Al-Betar et al. [43] (BR r = 0.005, 0.05, 0.1, 0.5, Max Age = 50, 100, 300, 500) to find their best values for PSPSH. However, such parameters best values for PSPSH may not one of the suggested values, for instance, BR r = 0.001 and Max Age = 30. Accordingly, new tuning experiments for such control parameters can be conducted to investigate and find better best values. More experiments required a more illustrative presentation approach. Therefore, visualizing the new conducted results in a graph could enhance the presentation of the results. • Due to the high constraints of the PSPSH that restrict the optimization processes of the algorithms, new power sources, such as storage systems and renewable energy sources, can be integrated with the smart home components to enhance the solutions and schedules of PSPSH. • Due to the weak performance of CHIO in optimizing EB, CPR, and UC level, the proposed CHIO can be hybridized with components of other efficient methods to enhance its performance and achieve better solutions.