{'fraction_non_alphanumeric': 0.04221870958471045, 'fraction_numerical': 0.011725822675671791, 'mean_word_length': 4.544295729764181, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Hybrid Optimization Approach to Demand Response Management for the Smart Grid

This paper proposes a hybrid approach to optimal day-ahead pricing for demand response management. At the customer-side, compared with the existing work, a detailed, comprehensive and complete energy management system, which includes all possible types of appliances, all possible applications, and an effective waiting time cost model is proposed to manage the energy usages in households (lower level problem). At the retailer-side, the best retail prices are determined to maximize the retailer's profit (upper level problem). The interactions between the electricity retailer and its customers can be cast as a bilevel optimization problem. To overcome the weakness and infeasibility of conventional Karush--Kuhn--Tucker (KKT) approach for this particular type of bilevel problem, a hybrid pricing optimization approach, which adopts the multi-population genetic algorithms for the upper level problem and distributed individual optimization algorithms for the lower level problem, is proposed. Numerical results show the applicability and effectiveness of the proposed approach and its benefit to the retailer and its customers by improving the retailer's profit and reducing the customers' bills.


I. INTRODUCTION
With the large-scale deployment of smart meters and twoway communication infrastructures, the benefits of demand response will be greatly enhanced. Among various demand response programs, time-differentiated pricing models are regarded as promising strategies to balance the load and supply, reduce the peak demands and increase the grid reliability [1]. One typical type of pricing among the time-differentiated pricing models is day-ahead pricing [2], in which customers receive the hourly prices for the next 24 hours.
The existing research on demand response and timedifferentiated pricing can be categorized into the following three directions. Firstly, [3]- [6] deal with how customers respond to the time-differentiated prices. Secondly, the work of [7]- [9] are concerned with how the retailers set the electricity prices, where they model the customers' energy consumption preferences in the form of utility functions. Thirdly, [10]- [16] deal with how the retailers determine the electricity prices based on the expected responses of customers where they model the interactions between a retailer and its customers as a Stackelberg game or bilevel problem. All of the above work and more unreferenced work have provided valuable findings in the demand response management area. Despite these contributions, there are still notable gaps or weaknesses in the existing approaches: From the customer modelling point of view, firstly the existing research has failed to model certain important type of appliances commonly used in most households. For example, all works given in [3]- [6] have not addressed the usage optimization modelling problem for curtailable appliances (such as air conditioning); secondly for interruptible appliances and non-interruptible appliances, the existing waiting cost model [3] [11] is a pure theoretic one, which is impossible for most ordinary customers to set up and use and therefore inapplicable; thirdly theoretic household utility functions rather than utility functions based on real home appliances are often used like in [7]- [9]. Although these theoretic models provide valuable insight for demand response management and pricing, this type of abstract model cannot be used by customers to find the best usage and scheduling scheme to minimize their bills or maximize their benefits. Noticing these shortcomings, the first motivation of our research is to propose a home appliances based utility function model that includes all possible applications and to develop an applicable and implementable optimal solution usable by ordinary customers to find the best usage and scheduling scheme.
From the retailer modelling point of view, the pricing optimization problems and models by the existing research are either oversimplified or unrealistic from an application point of view. For example, the pricing optimization problems and models only model one or two types of appliances in the customers' level problem [11] [13] [15] or fail to give the realistic and explicit form of customers' utility functions [10] [12] [14] [16]. In other words, such problem formulations and models are only partially or unrealistically modelling of a retailer's pricing optimization problem and therefore are insufficient. For this reason, the second motivation of our research is to develop a complete and comprehensive pricing optimization model that accurately and realistically represents the real pricing problem faced by retailers to enable the usability and applicability of the resulting models.
From the day-ahead pricing computation point of view, finding the best day-ahead pricing scheme often requires solving a bi-level optimization problem. In current bi-level optimization theory, the common solution is to cast bi-level optimization problems into equivalent single-level optimization problems by replacing the lower level problems with their KKT optimality conditions. Such a KKT approach has been used by the existing research such as [15] and [17] to solve the optimization problems faced by retailers. Unfortunately, this approach is infeasible in the large-scale applications when a retailer has thousands to millions of customers, where each customer may have several constraints at the lower-level optimization problems. When using KKT approach, it will result in far too many constraints for the resulting single-level problem which is infeasible to be solved by existing optimization software. Another important issue worth mentioning is the customers' privacy concerns. By replacing the lower level problem with its KKT conditions, the lower-level problem will be exposed to the retailer and may cause privacy problems for customers. For the above reasons, the third motivation of our research is to develop a hybrid optimization approach to solve the proposed bilevel problem in a distributed manner to overcome the above weaknesses.
By recognising the weaknesses in the existing methods and following the above three motivations, in this paper, we propose a hybrid approach to maximize customers' benefits and optimize retailers' day-ahead prices for demand response management within the smart grid.
The rest of this paper is organized as follows. The system model is proposed in Section II and the bilevel problem formulation is presented in Section III. In Section IV, the optimal bilevel solution is given. Numerical results are provided and discussed in Section V. The paper is concluded in Section VI.
II. SYSTEM MODELLING In this section, how the optimal day-ahead pricing for demand response management can be modelled as a bilevel optimization problem is described.
It is assumed that each customer is equipped with a smart meter. The interactions between the retailer and its customers are enabled through a two way communication infrastructure.
The decision processes of the retailer and its customers are: the retailer acting as the upper level decision agent firstly announces the selling price to its customers with the aim to maximize its profit. To solve this profit maximization problem, it is assumed that each customer (lower level decision agent) optimally reacts to the announced retail price, i.e. each customer (smart meter) determines the optimal energy consumption with the aim to maximize its benefits such as minimizing its bills.
Note that each customer's decision about electricity usage is independent from other customers' decisions. As a result, our considered optimization problem faced by the retailer can be seen as a bilevel optimization problem with independent customers.
The general formulation of a bi-level optimization problem with one upper level decision agent and N independent lower level decision agents can be represented as follows: max x,y1,...,yN In the above formulation, F represents the upper-level objective function and f i (i = 1, 2, ..., N ) represent the lowerlevel objective functions. Similarly, x is the decision vector of the upper level agent and y i is the decision vector of the i-th lower level agent. G represents the constraint functions at the upper level and g i represents the constraint functions of the i-th lower level agent. X are the bound constraints for the upper level decision vector and Y i are the bound constraints for the decision vector of the i-th lower level agent.
A solution (x * , y * 1 , ..., y * N ) which maximizes the above objective function F (x, y 1 , ..., y N ) subject to all the constraints is said to be a bilevel optimal solution.

III. BILEVEL PROBLEM FORMULATION
In this section, the mathematical representation of the considered two level decision making problems is provided. Firstly, our focus is to formulate the energy management problem in response to the day-ahead pricing in each household at the lower level. Secondly, we model the profit maximization problem for the retailer at the upper level who will offer the 24 hours prices to its customers.
In the following, we will firstly give the mathematical models for the different types of appliances. Furthermore, we propose a financial-incentive based waiting cost model for interruptible and non-interruptible appliances.
For each customer n ∈ N , we denote the set of all appliances in the household as A n , non-shiftable appliances as N S n , interruptible appliances as I n , non-interruptible appliances as N I n and curtailable appliances as C n .

1) Interruptible Appliances:
For each interruptible appliance a ∈ I n , a scheduling vector of energy consumption over the scheduling window H = {1, 2, ..., H} is defined as x n,a = [x 1 n,a , ..., x h n,a , ..., x H n,a ] where x h n,a ≥ 0 represents the n-th customer's electricity consumption of appliance a at time h. Furthermore, the scheduling window for each appliance a can be set by each customer according to his/her preference and is defined as H n,a {α n,a , α n,a + 1, ..., β n,a } [3]. Since the window H n,a is consecutive, one only needs to specify the beginning scheduling time α n,a ∈ H and end time β n,a ∈ H.
The model of the payment minimization problem for each interruptible appliance is given as follows: min J In(a) (α n,a : β n,a ) = min Constraint (3) represents that, for each appliance a, the total energy consumption to accomplish the operations within the scheduling window is fixed, which is denoted as E n,a . Constraint (4) represents that there is a minimum power level and a maximum power level for each appliance a within the scheduling window.
2) Non-interruptible Appliances: As the operations of each non-interruptible appliance a ∈ N I n are consecutive, we define the length of the operations L n,a . The customers can set the scheduling window H n,a {α n,a , α n,a + 1, ..., β n,a } by specifying the beginning scheduling time and end time.
The optimization problem is to find each appliance's optimal start time s * n,a to minimize the customer's payment. As a result, the model of the payment minimization problem for a non-interruptible appliance is given as follows: α n,a ≤ s n,a ≤ β n,a − L n,a , (7) γ min n,a ≤ x h n,a ≤ γ max n,a , ∀h ∈ H n,a .
Constraint (6) represents that the total energy consumption to accomplish the consecutive operations is fixed at E n,a . Constraint (7) indicates that the start time is bounded within the interval [α n,a , β n,a −L n,a ]. Constraint (8) shows that there is a minimum power level and a maximum power level for each appliance a within the scheduling window.

3) Waiting Time Cost Model:
We propose a financialincentive based waiting cost model that is straightforward and easy to use for interruptible and non-interruptible appliances. In real applications, firstly the customers need to set the financial thresholds that trigger different waiting lengths. For example, customers can input their financial thresholds via the interface between a laptop or mobile phone and the home energy management software integrated in a smart meter. Additionally such home energy management software can provide guidance and support in helping customers determine their financial thresholds by providing a questionnaire to customers. With the relevant information available, the customers can set the financial thresholds themselves easily. Secondly, by using our proposed waiting cost model, it will determine the optimal waiting length for each appliance. Example 1 is used to help describe the proposed waiting time scheme. Example 1. We assume that the original scheduling window for PHEV is [7PM -11PM] and the maximum waiting time length is 3 hours. Furthermore, the financial thresholds to trigger the waiting are 10 pence for 1 hour, 25 pence for 2 hours and 45 pence for 3 hours. Assume that the energy bills saved by different waiting hours are given in Table I. From the Table I, we can see that by waiting for 1 hour, it can save the bill by 12 pence, which is higher than the financial threshold (10 pence). As a result, the waiting time cost model will treat the current waiting length (1 hour) as a potential solution and then check the next waiting length (2 hours). Due to the same reason as before, the waiting length of 2 hours can also be treated as a potential solution. However, by waiting for 3 hours, it can only save the customer by 40 pence on the bill that is lower than the financial threshold (45 pence). As a result, the waiting length of 3 hours cannot be regarded as a potential solution. The above process is repeated until all the waiting lengths are checked. The optimal waiting time is one potential solution that achieves the maximal bill saving for the customer. In the above example, the optimal waiting time for the PHEV is 2 hours.
Based on the above analysis and illustration, the mathematical representations of the waiting time cost model are given below. To avoid repetition, we only deal with the waiting time cost model for interruptible appliances. However, the model also applies to non-interruptible appliances.
For each interruptible appliance a ∈ I n , we assume that the maximum waiting time is denoted as K n,a ≥ 1, which can be set by customers according to their preferences in advance.
Without any waiting time, the minimized energy bill model for each interruptible appliance is denoted as follows: With the waiting time of k n,a ∈ {0, ..., K n,a }, the minimized energy bill model is defined as: min J In(a) (α n,a : β n,a + k n,a ) = min where H n,a = {α n,a , α n,a + 1, ..., β n,a } is extended to {α n,a , α n,a + 1, ..., β n,a + k n,a }.
We define the Waiting Time Benefit Function, i.e., the energy bill saved by waiting k n,a hours, as follows: Furthermore, we define the Benefit Threshold Function as follows: if none of above satisfies (12) where the financial thresholds {C 1n,a , C 2n,a , ..., C Kn,a } are set by the customers as described above.
As a result, the optimal waiting time of interruptible appliance a for customer n can be obtained by solving the following optimization problem: max Similarly, the waiting time cost model for non-interruptible appliances can be represented as the following optimization problem: max 4) Curtailable Appliances: Similarly to the interruptible and non-interruptible appliances, the customers can set the valid scheduling window H n,a {α n,a , α n,a + 1, ..., β n,a }. However, compared with interruptible and non-interruptible appliances, the scheduling window of curtailable appliances should be more strict and accurate because the appliances will be 'on' for the whole window.
By the customers' behaviour analysis (i.e. some customers are price sensitive and some others are less price sensitive), there are two types of optimization models for curtailable appliances and a customer can choose one of them dependent on his/her preference. a) Minimize Bill Subject to an Acceptable Energy Consumption: This optimization scheme targets price sensitive customers. The proposed optimization model is given below: βn,a h=αn,a x h n,a ≥ U min n,a .
Constraint (16) shows that the energy consumption at each hour is within the minimum acceptable consumption level u h n,a and maximum affordable consumption level u h n,a , which can be set according to each individual customer's preferences. Constraint (17) indicates that the electricity consumed during the operation period should not be less than a minimum acceptable consumption level, i.e. there exists an energy consumption constraint for each curtailable appliance.
b) Maximize Energy Consumption Subject to an Affordable Financial Constraint: This optimization scheme aims at the less price sensitive customers who prefer a budget based energy consumption maximization model. The proposed optimization model is given as follows: maxJ2 Cn(a) (α n,a : β n,a ) = max βn,a h=αn,a Constraint (19) is same as constraint (16). Constraint (20) indicates that for each curtailable appliance, the money spent during the operation period should not exceed the given budget, i.e. there exists a financial cap for each curtailable appliance.
Since there are two types of optimization models for curtailable appliances, the optimization problem for customer n including all types of appliances has two different optimization objectives shown as Eqs. (21) and (22). The customers can choose one of them depending on their preferences.

B. Retailer-side Problem at the Upper Level
In this subsection, we model the profit of the retailer by using the revenue subtracting the energy cost imposed on the retailer.
We define a cost function C h (L h ) indicating the cost of the retailer providing electricity at each hour h ∈ H, where L h represents the amount of power provided to all customers at each hour of the day. We assume that the cost function C h (L h ) is convex increasing in L h for each h [4] [8]. In view of this, the cost function is designed as follows [4].
where a h > 0 and b h ≥ 0, c h ≥ 0 at each hour h ∈ H. As a result, the profit maximization model is given as follows: n∈N a∈An Constraint (25) represents that the prices the retailer can offer are greater than a minimum price, for example, the wholesale price at each hour, and less than a maximum price, for example, the price cap of the retail price due to retail market competition and regulation. Constraint (26) indicates that there usually exists a maximum supply capacity by the retailer or a maximum load capacity of power networks. Due to the in-elasticity of energy use, we add the revenue constraint (27) to improve the acceptability of the retailer's pricing strategies, i.e. there exists a total revenue cap, denoted as R max , for the retailer. Without such a constraint, the retail prices will keep going up to a level which is politically against the government, political parties, and energy regulators and financially unacceptable by customers.

IV. BILEVEL MODEL SOLUTIONS
In this paper, we propose a hybrid optimization approach to solve the bilevel optimization problem. Our approach determines the energy prices by interacting with the customers (smart meters) within the framework of a genetic algorithm for the upper level problem and individual optimization algorithm for the lower level problem.
In this section we will firstly prove the existence of an optimal solution to our bi-level model, secondly show the solution algorithm to the lower-level problem, and finally present the solution algorithm to the upper-level problem.

A. Existence of Optimal Solutions to the Bilevel Model
Note that each f i (x, y i ) (i = 1, ..., N ) in the objective function of the above lower level problem is independent from each other. Each constraint function g i (x, y i ) (i = 1, ..., N ) of the lower level problem is also independent from each other.
Further it is always assumed that the above considered bilevel optimization problem has at least one feasible solution.

Lemma 1. The bilevel model with one upper level agent and N independent lower level agents (Eq.(1)) is equivalent to the bilevel model with one upper level agent and one lower level agent (Eq.(28)).
The proof of Lemma 1 is given in Appendix A.

Lemma 2. Consider the bilevel model shown as Eq.(28), if
X is a finite space, then the optimal solutions to the bilevel model exist.
The detailed proof of Lemma 2 is given in Appendix B.

Theorem 1. Consider the bilevel model with one upperlevel decision agent (retailer) shown as Eqs.(24 -27) and
N independent lower-level decision agents (customers) shown as Eq. (21) or Eq. (22). Then an optimal solution to the bilevel model exists.
The proof of Theorem 1 is given in Appendix C.

B. Solutions to the Lower-level Problem
As the lower-level optimization problem is the sum of three separable sub-optimization problems corresponding to interruptible, non-interruptible, and curtailable appliances respectively, the lower-level problem can be solved by solving each sub-optimization problem separately.
1) Interruptible Appliances: The mathematical model of interruptible appliances is shown as Eqs. (2 -4) which is a typical linear programming problem and can be solved using the optimization software.
2) Non-interruptible Appliances: We firstly define the subproblem of the original model Eqs. (5 -8) for non-interruptible appliances as follows by fixing the start time at s ′ n,a ∈ [α n,a , β n,a − L n,a ]. x h n,a = E n,a , γ min n,a ≤ x h n,a ≤ γ max n,a , ∀h ∈ [s ′ n,a , s ′ n,a + L n,a ]. (29) Eq.(29) is a linear programming problem and can be solved by the optimization software. As a result, the original problem Eqs. (5 -8) can be solved in an iterative manner.
3) Curtailable Appliances: The optimization problems Eqs. (15 -17) and Eqs. (18 -20) for curtailable appliances are linear programming problems and can be solved by the optimization software.

C. Distributed Algorithms to the Upper Level Problem
Due to the existence of the starting time and waiting time in the lower-level problem, which makes the lower-level problem non-differential and discontinuous, in this subsection, we adopt GA based distributed optimization algorithms to solve the profit maximization problem at the retailer's side and show how the retailer finds the optimal electricity day-ahead prices by taking into account the customers' responses.
To avoid too much data passing between the retailer and the smart meters and reduce the number of generations for the GA (each generation needs to pass a new group of prices distributedly to all customers/agents to re-compute their optimal reactions which is very costly), we propose two strategies that improve the algorithms' performance : 1) use a larger population for the GA. This strategy is based on the observations that the local optimization problems (customers side) are simple and easy to compute, even with a very large population; 2) reduce corresponding GA generations to improve the algorithm efficiency as such a large population size can ensure the GA's convergence.
Instead of simply increasing the population size, we propose a multi-population GA method [20] to tackle the problem, i.e. a single population is divided into multiple sub-populations Algorithm 1 Multi-population GA based pricing algorithm to Eqs.(24 -27) executed by the retailer 1: Population Initialization, i.e. generating a population of N chromosomes randomly. 2: Produce C sub-populations, i.e. each sub-population has N/C individuals. 3: Each sub-population evolves in a traditional GA way shown as steps (4 -9). 4: for i=1 to N/C do 5: The utility company announces strategy i, i.e. it announces a set of 24-hour prices by decoding the ith chromosome to the smart meters (customers) via two way communication infrastructure. 6: Receive the optimal response of each customer n (smart meter) including the optimal energy consumption information to strategy i.

7:
Check the feasibility of strategy i to see if it satisfies all the constraints Eqs. (25 -27). If not, handle the invalid individuals by the approach proposed in [19]. Then, obtain the fitness value of strategy i. 8: end for 9: A new generation of chromosomes is created by using the selection, crossover and mutation operations. 10: Migrations between sub-populations. 11: Steps (3 -10) are repeated until the stopping condition is reached. 12: The retailer announces the final price vector to the smart meters (customers) via LAN at the beginning of the scheduling horizon. and each sub-population evolves in a traditional GA way. In addition, the individuals migrate from one sub-population to another from time to time, known as the island model [21] and we use the ring migration type topology where individuals are transferred between directionally adjacent subpopulations [22]. In the GA setting for each sub-population, binary encoding and deterministic tournament selection without replacement is adopted. For the crossover and mutation operations, we employ uniform crossover and bit flip mutation respectively. The constraints for the upper level problem are handled by the approach proposed in [19]. Finally, the multi-population GA based distributed algorithms are shown in Algorithm 1 and 2, which are implemented at the retailer-side and customer-side respectively.
At the end, the most profitable prices for the retailer and the best usage patterns and schedules with the maximized benefits for each customer are found.

V. NUMERICAL RESULTS
We simulate a neighbourhood consisting of 100 customers served by one energy retailer. It is assumed that each customer has 4 appliances: PHEV, dishwasher, washing machine and airconditioning. The scheduling horizon is set from 8AM to 8AM (the next day). We consider heterogeneous customers, i.e. the customers are different in terms of energy use and appliance settings. In the following, we give the parameter settings for both the lower-level model and the upper-level model.
Note that, in the following, α n,a and β n,a are uniformly distributed integers for all appliances settings.
For PHEV, recall from Eqs. (2 -4), E n,a is chosen from the uniform distribution on [9,11] kWh. Each γ min n,a is 0 kWh, and each γ max n,a is chosen from the uniform distribution on [2.5, 3.3] kWh. α n,a is chosen from the uniform distribution on [6,9] PM, and β n,a is chosen from the uniform distribution on [5,8] AM (the next day).
For dishwasher, E n,a is chosen from the uniform distribution on [2.3, 2.9] kWh. Each γ min n,a is 0 kWh, and each γ max n,a is chosen from the uniform distribution on [1.2, 1.7] kWh. α n,a is chosen from the uniform distribution on [8,11] AM, and β n,a is chosen from the uniform distribution on [6,9] PM.
For washing machine, E n,a is chosen from the uniform distribution on [1.8, 2.3] kWh. Each γ min n,a is 0 kWh, and each γ max n,a is chosen from the uniform distribution on [1.0, 1.5] kWh. α n,a is chosen from the uniform distribution on [6,9] PM, and β n,a is chosen from the uniform distribution on [5,8] AM (the next day). For the air-conditioning, for the purpose of simulations, we assume that all the customers choose the second optimization model, i.e. maximize energy consumption subject to an acceptable financial constraint. As a result, u h n,a is chosen from the uniform distribution on [0.5, 0.8] kWh, and u h n,a is chosen from the uniform distribution on [1.8, 2.2] kWh. α n,a is chosen from the uniform distribution on [4,6] PM, and β n,a is chosen from the uniform distribution on [9,11] PM (the next day). C max n,a is chosen from the uniform distribution on [70, 90] pence.
Furthermore, the upper bound of hourly energy consumption for each household E max n is chosen from the uniform distribution on [3.5, 4.5] kWh.
For the cost of the energy provided to customers by the utility company, we model this as a cost function shown as Eq. (23). We assume that b h = 0, c h = 0 for all h ∈ H. Also, we have a h = 5.5×10 −4 pence during the day, i.e. from 8AM to 12AM and a h = 4.0 × 10 −4 pence at night hours, i.e. from 12AM to 8AM (the next day).
In this section, firstly the convergence analysis of our proposed algorithms is given. Secondly, we show the benefits to the retailer by employing our proposed day-ahead pricing scheme, which is compared with a flat pricing scheme. Thirdly, we present the benefits to customers by adopting our proposed energy management scheme.

A. Convergence Analysis
In this subsection, we test the aforementioned two strategies (i.e. increasing the population and reducing the generation) in terms of convergence for the GA.
We conduct simulations to show the convergence speed of our proposed multi-population GA and the simple GA under different customer numbers (from 100 to 1000) as shown in Figure 1. It is worth mentioning that the convergence speed does not change much when customer numbers increase, which indicates our proposed distributed optimization algorithm is rather scalable with the number of customers and can significantly reduce the data communication between the retailer and the smart meters.

B. Benefits to the Retailer
In this subsection, we compare our proposed optimal dayahead pricing scheme with optimal flat pricing scheme. The parameter settings of our proposed multi-population GA are shown in Table II.
Since the customers have no incentives to change their energy consumption pattern when responding to flat pricing, we assume that, under the flat pricing, the customers start the operations of appliances right at the beginning of the scheduling window H a and the appliances work at their typical power levels. We assume that, for each hour h, 8.0 pence ≤ p h ≤ 14.0 pence holds. When calculating the optimal flat pricing, we use the same parameters and model as those of optimal day-ahead pricing.
The obtained optimal day-ahead prices and flat prices are given in Figure 2. Finally, the details of revenue, cost and profit under optimal day-ahead prices and flat prices can be found in Table III.
From Table III, we can see that, to make the same revenue (i.e. the total bills for all customers are the same), the cost of the retailer under optimal day-ahead pricing is 120.08 pounds and the cost under optimal flat pricing is higher (139.35 pounds). This is due to the increase of peak demand and thus the increase of peak-time cost. Furthermore, the profit under   optimal day-ahead pricing (134.92 pounds) is higher than the profit under optimal flat pricing (115.65 pounds). The example shows a very important potential for the day-ahead pricing and our proposed approach: the day-ahead pricing enables to increase the retailer's profit without increasing customers' expenses.

C. Benefits to Customers
In this subsection, we show the effectiveness of the proposed energy management scheme based on public day-ahead price data. We use the actual electricity prices data adopted by ISO New England from January 1, 2012 to January 31, 2012, which is available to the public on-line at [23]. Due to the space limitation, we only show the result of the first customer.
The simulation result is shown as Figure 3 where we can find that, after adopting the energy management scheme, the daily bill payment is significantly reduced. Furthermore, we show that by adopting our proposed financial incentive based waiting time scheme, the customers may get further benefits in terms of reducing their payments subject to acceptable life comforts.
VI. CONCLUSION In this paper, we model the interactions between the retailer and its customers as a bilevel optimization problem. Firstly, with energy management and waiting cost with energy management but no waiting cost none Fig. 3: Daily electricity payment of one customer over one month according to the load types, we categorize home appliances into interruptible, non-interruptible and curtailable appliances. For different categories of appliances, different appliance-level optimization models are given, which forms the lower level problem. As the common solutions to the bilevel optimization problem such as KKT transformations are not usable in our application setting, a hybrid optimization approach based on genetic algorithms and individual optimization solutions has been proposed to solve the bilevel problem. Since the numerical results show that both the retailer and its customers can benefit from the proposed model, it has great potential to improve the implementations of current energy pricing programs, help customers to reduce their increasing energy bills, and change their energy usage patterns. Based on the formulations of Eq.(1) and Eq.(28), this implies that they have the exact same objective functions and constraints and therefore these two bilevel optimization problems are equivalent and have the same optimal solutions. {F (x, y 1 , ..., y N ) : G(x, y 1 , ..., y N ) ≤ 0}.
Now denote (y * 1 , ..., y * N ) = R(x). As X is a finite set, there exists an optimal solution as follows Now we are going to prove [x * , R(x * )] is the optimal solution to the bilevel problem (28).
For any feasible solution (x, y 1 , ..., y N ) to the bilevel problem (28), from (30), (31), (32), we have As [x * , R(x * )] is a feasible solution to (28) based on (30), (31), (32), the inequality (33) implies that the objective function of the bilevel problem (28) takes its maximal value at [x * , R(x * )]. Therefore, [x * , R(x * )] is the optimal solution to (28). APPENDIX C PROOF OF THEOREM 1 Proof. Firstly, according to Lemma 1, our considered bilevel pricing optimization problem given in (21), (22) and (24)-(27) with one upper-level decision agent (retailer) and N independent lower-level decision agents (customers) is equivalent to the bilevel model with one upper-level decision agent and one lower-level decision agent. Therefore we only need to prove the existence of the optimal solution in the formation of the optimization problem as (28).
For each decision variable p h (h = 1, ..., 24) in decision variable vector P = p 1 , ..., p 24 at the upper level problem, it only takes finite values (in practice it is often one decimal after the small unit in a given currency), i.e., the price at each hour h can only take D h values, where D h is the number of possible price values within interval [p min h , p max h ]. As a result, D = 24 h=1 D h is a finite integer. We denote the space of all prices across 24 hours (i.e., P ) at the upper-level problem as U P . Noting the total number of elements of set U P is D, which is a finite integer, it is implied immediately that U P is a finite space. Therefore, based on Lemma 2, it is implied that the optimal solution to the considered bilevel pricing problem exists.