Strategic Behavior of Retailers for Risk Reduction and Proﬁt Increment via Distributed Generators and Demand Response Programs

: Following restructuring of power industry, electricity supply to end-use customers has undergone fundamental changes. In the restructured power system, some of the responsibilities of the vertically integrated distribution companies have been assigned to network managers and retailers. Under the new situation, retailers are in charge of providing electrical energy to electricity consumers who have already signed contract with them. Retailers usually provide the required energy at a variable price, from wholesale electricity markets, forward contracts with energy producers, or distributed energy generators, and sell it at a ﬁxed retail price to its clients. Different strategies are implemented by retailers to reduce the potential ﬁnancial losses and risks associated with the uncertain nature of wholesale spot electricity market prices and electrical load of the consumers. In this paper, the strategic behavior of retailers in implementing forward contracts, distributed energy sources, and demand-response programs with the aim of increasing their proﬁt and reducing their risk, while keeping their retail prices as low as possible, is investigated. For this purpose, risk management problem of the retailer companies collaborating with wholesale electricity markets, is modeled through bi-level programming approach and a comprehensive framework for retail electricity pricing, considering customers’ constraints, is provided in this paper. In the ﬁrst level of the proposed bi-level optimization problem, the retailer maximizes its expected proﬁt for a given risk level of proﬁt variability, while in the second level, the customers minimize their consumption costs. The proposed programming problem is modeled as Mixed Integer programming (MIP) problem and can be efﬁciently solved using available commercial solvers. The simulation results on a test case approve the effectiveness of the proposed demand-response program based on dynamic pricing approach on reducing the retailer’s risk and increasing its proﬁt.

• Providing a detailed mathematical formulation for retailers' decision-making problem, considering the possibility of the retailer to provide energy from forward contracts, spot electricity market, distributed generators, and demand response program; • Modeling dynamic pricing approach by retailers as a demand-side management technique to modify customers' load profile; • Considering the customers' welfare within the retailer's decision-making problem through bi-level programming in which the first level is the retailer's profit maximization, including the risk factor in the objective function, and the second level is customers' cost minimization. • Performing the proposed decision-making model on a test-case, considering the uncertainty of spot electricity prices and electricity demand, for a 1-week (168 h) period to show the effectiveness of the demand response program on the retailer's profitability and risk; After this introduction, Section 2 presents the mathematical model for retailers' decision-making problem, including the problem constraints, as well as the solution approach. In Section 3 the case study and the simulation results on the case study are provided and discussed. Finally, Section 4 provides the most important conclusions of the presented work.

Modeling the Retailer's Decision-Making Problem
In the previous section, the basic concepts related to the retailer problem have been introduced and a short literature review have been provided. Retailer needs to schedule its optimum involvement in the forward contracts and spot electricity markets, as well as the optimum selling price to its clients, in advance. The Conditional Value at Risk (CVaR) is selected as the measure of risk in this study to incorporate the risk aversion of the retailer into the model. In this section, first the decision-making problem of retailer is defined and the problem assumptions are presented. Then, the strategy of retailer for participating in forward electricity markets in a mid-term horizon, with the aim of making optimum contracts, through DRPs and dynamic pricing of electricity for end-use customers, will be determined. In what follows, a model for retailers' decision-making problem is proposed and the problem constraints, as well as solution approach, is provided.
The decision-making problem of this paper is based on the underlying assumptions regarding the retailer's condition and scheduling horizon, as follows.
The retailer is only responsible for supplying the electricity demand of its own customers; The retailer can provide the required electricity for its customers from either wholesale electricity market or the Distributed Generators (DGs) connected to the network; The retailer has the opportunity to make Bilateral Contracts, Put Options, and Call Options, in advance. These contracts are considered specified in the beginning of the scheduling horizon; Since the problem is defined for mid-term scheduling horizon, day-ahead, intraday, and real-time markets are combined and considered as one spot market in the model; The wholesale electricity spot market prices are assumed as the prices at the transmission node to which the retailer in connected. Hence, the transmission cost is included in the electricity prices.

Uncertainty Modeling
Retailers expose to variety of uncertainties in their decision-making process. These uncertainties can be divided into two general categories: (1) The uncertainties that are resulted by market transactions of retailers in the wholesale electricity markets, e.g., day-ahead and real-time electricity prices; (2) the uncertainties that are resulted by the interactions among the retailer and its customers, e.g., electricity consumption.
In this paper, the uncertainty of wholesale spot electricity prices and end-use electricity consumption are considered in the retailer's decision-making model. The total number of scenarios is calculated by multiplying the number of scenarios regarding hourly spot electricity prices into the number of scenarios for hourly electricity consumption level.
In the Equation (1), N ρ ω presents the number of price scenarios, N p ω presents the number of electricity consumption scenarios, and N ω is the total number of uncertainty scenarios. Accordingly, the number of total scenarios may reach a significantly high value which in turn increases the size and running time of the program. Therefore, the fast forward and backward scenario reduction method is implemented in this study to reduce the number of scenarios.
Similarly, the probability of each scenario is calculated by multiplying the probabilities of corresponding price scenario and electricity consumption scenario.
In the Equation (2), γ ρ ω and γ P ω represent the probability of each price scenario and consumption scenario, respectively. γ ω is the probability of the equivalent scenario.

Risk Aversion of Retailer
The risk of participating in electricity market is the most significant financial risk that a retailer confronts with. Occasionally, market participants employ forward and option contracts in order to confront the financial risks derived from uncertainty of spot market prices. In other words, applying forward and option contracts in forward electricity markets is the fundamental approach to control the risk of electricity producers and consumers in the market. These contracts in the proposed model include: Bilateral contracts, Put Option, and Call Option.
Under the bilateral contracts, contract correspondents compromise on providing a certain power quantity with a certain price during a certain time interval and both the seller and the purchaser ought to fulfill the contract [40]. Under the put option, contract correspondents compromise on providing a certain power quantity with a certain price during a certain period of time, as well. However, the seller has the option to make a decision on implementing the agreement or not, until a specific time before the contract time interval. The power provider makes this decision based on his anticipation of the sport electricity prices [41,42]. On the contrary, call option authorizes the purchaser to decide on implementing the agreement or not, before a predetermined time limit and based on his anticipation of the spot electricity market prices during the contract time period [43].

Problem Formulation
The decision-making problem of the retailer is modeled as a bi-level optimization problem. The first-level (leader's problem) objective function is comprised of two terms: profit term, and risk term.
In the second level, regarded as the follower's problem, demand response program along with dynamic pricing approach is implemented on the customers' side. For this purpose, it is assumed that the retailer provides the hourly retail prices to its customers based on the predefined contracted maximum, minimum and average prices and the customers use these price data to manage their hourly electrical energy consumption.

First-Level Problem
The first level, regarded as the leader's problem, aims at maximizing the retailer's profit and simultaneously minimizing the risks.

Profit Function
The profit function of the leader's problem (first level) presented by (3).
The first term of the profit function (3) denotes the revenue of the retailer which in general is obtained from selling active and reactive electrical power to its customers. Other six terms of the profit function correspond to the variable, semi-variable, and constant costs of the retailer. The constant and semi-variable costs of the retailer, denoted by C con , include personnel costs, cots of communication infrastructure expansion, selling costs, and etc. The variable costs of retailer include cost of providing energy through bilateral contracts C Bi , cost of providing energy from put options C PO , cost of providing energy through call options C CO , cost of generating electrical energy from the distributed generators C DG , and cost of buying energy from the spot market C SM .

REVENUE OF THE RETAILER
The retailer's revenue from selling active and reactive power is calculated in (4).
D P r,t (ω) and Q P r,t (ω) denote the Active and reactive power consumption of customer r at time period t under scenario ω, respectively The variable cost terms of the objective function (4) are presented as follows.

COST OF BILATERAL CONTRACTS
Bilateral contracts play an important role in providing the electrical power, especially base-load power, for the retailers. Equation (5) states the costs of bilateral contracts for the retailers.
The offer function of bilateral contracts is modeled as staircase function defined by a minimum power P Bi.min i and incremental power ∆P Bi i for each block of the offered power. Total offer blocks of each bilateral contract is denoted by M Bi i . Power transacted through bilateral contracts is enforced by (6). Figure 1 illustrates the staircase offer curve of bilateral contracts used to calculate the transacted power and the transaction price of each contract. Under these contracts, a constant price for each block of the transacted power is supposed to be paid by purchaser to the seller.
, ( ) and , ( ) denote the Active and reactive power consumption of customer at time period under scenario , respectively The variable cost terms of the objective function (4) are presented as follows.

COST OF BILATERAL CONTRACTS
Bilateral contracts play an important role in providing the electrical power, especially base-load power, for the retailers. Equation (5) states the costs of bilateral contracts for the retailers.
The offer function of bilateral contracts is modeled as staircase function defined by a minimum power . and incremental power ∆ for each block of the offered power. Total offer blocks of each bilateral contract is denoted by . Power transacted through bilateral contracts is enforced by (6).

COST OF PUT OPTIONS
The retailer's expected costs regarding electrical energy provision through call options is stated by (7). Put options are modeled by two prices regarding the fixed contract price

COST OF PUT OPTIONS
The retailer's expected costs regarding electrical energy provision through call options is stated by (7). Put options are modeled by two prices regarding the fixed contract price ρ f .PO j and the contract execution price ρ PO j .
The energy transacted through each put option is defined by block offers as presented by (8

COST OF CALL OPTIONS
The expected costs of providing energy through call options is calculated in a similar manner to the put options, as presented by Equations (9) and (10).

GENERATION COST OF DGs
DG units can provide both active and reactive power for the consumers and their total expected generation cost is presented by (11). ρ PDG g and ρ QDG g in (11) denote the average cost of generating one unit of active and reactive power by DG unit g, respectively.

COSTS OF PURCHASING POWER FROM SPOT MARKET
The retailer is supposed to purchase the deficit energy to supply the electricity demand of its customers from the spot electricity market or to sell the excess energy provided from forward contracts to the market. In addition to the required active power, reactive power requirement of its customers should also be provided by the retailer. The required reactive power of the retailer is determined and provided through its owned DG units or purchasing from spot market. The total expected costs of the retailer from transactions in the spot electricity market is presented by Equation (12) in which ρ P.SM t and ρ Q.SM t denote the expected hourly spot market price for active and reactive energy, respectively.
Energies 2018, 11, 1602 8 of 24 Finely the expected profit of the retailer can be given as: where Π t (ω) is the retailer's profit at time t under scenario ω.

Risk Model
Currently, the conditional value at risk (CVaR) is the most commonly used measure for modeling and quantifying risk in the decision-making problems. CVaR is usually added to the objective function with weighting factors which imply on the risk-taking or risk-averse behavior of the decision maker.
Generally, there are two methods for modeling risk in different problems: one is to model the risk separately and the other is to model the risk as a factor in the objective function. Under the first approach, the risk term itself is the objective function or one of the constraints in the optimization problem. Whereas, in the second approach the risk term is set as a factor into the objective function which itself is a profit or cost function. This factor indicates the risk aversion of the decision maker, e.g., a financial firm, and is dependent on the decision-making strategy of the firm's manager. In this paper, the second method for modeling risk is implemented. The retailer aims at reducing risk of its participation in the electricity market. Hence, in line with the literatures [44], the risk factor is added to the objective function of the maximization problem with a negative sign. The risk measure of the objective function is presented by (13). The term − ∑ N ω ω=1 γ(ω) Π t (ω) represents the loss function of the firm in each time interval, i.e., one hour in this study, and δ ω t is the weight factor of each time interval. The confidence level in which the risk is calculated is denoted by β − CVaR.
Finally, the first-level objective function is present as below.
where ρ RM is risk aversion factor.

Constraints
The constraints of the leader's optimization problem are presented by (15)- (21).
1 24 Energies 2018, 11, 1602 9 of 24 Constraints (15) and (16) stand for the minimum and maximum limit of the generated active and reactive power from DG units owned by the retailer. Constraint (17) enforces the maximum and minimum power transaction through bilateral contracts. The supply-demand balance constraint of active and reactive power are presented by (18) and (19), respectively [41]. Finally, the constraints of the retail prices of active power, set by the retailer, are denoted by (20) and (21). These constraints limit the revenue of the retailers from selling energy to its customers. In this study, dynamic pricing approach is implemented by the retailer to set electricity for the end-use consumers. In other words, as represented by (20) and (21), the retailer is supposed to offer its upper limit, lower limit, and average electricity price for a specific time interval, to its customers. Then, during the power-dispatching period, the hourly electricity prices will be calculated by the retailer and provided to the customers. The retail reactive power prices are considered as a constant value during the scheduling period.

Second-Level Problem
The second-level problem (Followers' problem) is the customers' optimization problem. Since the end-use electricity consumers play an active role in the decision-making problem of the retailer, their optimization problem is defined as a sub-problem inside the main problem. The objective function of this second-level problem is to minimize the cost of customers from buying their required active and reactive power from the retailer. The customers' objective function is presented by (22).
In this study, load-shifting is modeled to be performed by customers to reduce their consumption costs. For this purpose, the electrical demand of the consumers is divided into two parts. The first part of the electrical demand indicates the fixed load which must be supplied in each time interval, while the second part of the demand corresponds to the flexible loads which can be shifted from one time interval to other time intervals. However, the total deferrable demand of each customer is limited, as enforced by constraint (23).
In (23), the total electricity demand of each customer without performing demand response programs is denoted by D Total r,t . In this equation, drp Dec and drp Inc are factors indicating the maximum decrement and increment of the customer's load under demand-response program during time interval t. Furthermore, to avoid the reduction of customers' welfare, the total demand of each customer is supposed to be fully supplied during the day, as denoted by constraint (24).
The total energy consumption of each customer during a 24-h time interval is denoted by E i .

The Proposed Modeling Approach
Based on what presented in the previous sections, the proposed retailer's decision-making problem can be modeled as follows.
Maximize (14) Subject to ( The resulted optimization problem is a bi-level problem. To solve this kind of problems, one usual approach is to use the dual variable of the constraints for linearizing the problem and converting it to a single-level problem. One of the commonly used approaches is the Karush-Kuhn-Tucker (KKT) method [45] which is used in this study. This problem is modeled as mixed-integer programming (MIP) which is solved using CPLEX solver under the GAMS optimization software (GAMS 24.1.3, GAMS Development Corporation, Washington, DC, USA) on Intel(R) Core(TM) i7-Q740 @ 1.73 GHz, RAM 4 GB system (Sony VAIO VPCF136FG) [46].

Numerical Simulation and Case Study
In this section, the mathematical model presented in Section 2 is simulated on a case study by GAMS software and the simulation results are presented and discussed. Since the focus of our study is on the investigation of retailer's profit, four schemes for retailer's scheduling problem are considered and the resulted profit under each scheme are analyzed and compared. The schemes are presented as follows: First scheme-The retailer does not have access to forward contracts, distributed generators, and demand response programs. Hence, it provides all the required energy to supply its customers from the spot market; Second scheme-The retailer has access to distributed generation sources; Third scheme-The retailer has access to distributed generators and forward contracts; Fourth scheme-The retailer has access to distributed generators, forward contracts, and DRP.

Spot Market Data
The price data of the spot electricity market is extracted from the New York electricity market data from 2009 to 2015 [47]. The simulation time horizon is 168 hourly time units corresponding to one week. To model the uncertainty of the spot market prices, 10 price scenarios are considered for the study period. Figure 2 illustrates the hourly price profile of the spot market as the average price of the 10 price scenarios considered in this study. First scheme-The retailer does not have access to forward contracts, distributed generators, and demand response programs. Hence, it provides all the required energy to supply its customers from the spot market; Second scheme-The retailer has access to distributed generation sources; Third scheme-The retailer has access to distributed generators and forward contracts; Fourth scheme-The retailer has access to distributed generators, forward contracts, and DRP;

Spot Market Data
The price data of the spot electricity market is extracted from the New York electricity market data from 2009 to 2015 [47]. The simulation time horizon is 168 hourly time units corresponding to one week. To model the uncertainty of the spot market prices, 10 price scenarios are considered for the study period. Figure 2 illustrates the hourly price profile of the spot market as the average price of the 10 price scenarios considered in this study.

Load Data
The electricity consumption data corresponding to the retailer's clients is also extracted from the New York electricity market data during 2009-2015 [47]. In this case study, it is assumed that the retailer has retail contracts with only 10 customers and for each customer 5 load scenarios are considered. Figure 3 depicts the total electricity consumption of the retailer's customers during the one-week scheduling period. The probability distribution of the load scenarios is presented in Figure  4.
We consider a 0.9 lagging power factor for the electrical loads of the network. This assumption is made based on the fact that we focus on the small electricity users, mainly residential loads, and the largest share of the home appliances are inductive loads.

Load Data
The electricity consumption data corresponding to the retailer's clients is also extracted from the New York electricity market data during 2009-2015 [47]. In this case study, it is assumed that the retailer has retail contracts with only 10 customers and for each customer 5 load scenarios are considered. Figure 3 depicts the total electricity consumption of the retailer's customers during the one-week scheduling period. The probability distribution of the load scenarios is presented in Figure 4. We consider a 0.9 lagging power factor for the electrical loads of the network. This assumption is made based on the fact that we focus on the small electricity users, mainly residential loads, and the largest share of the home appliances are inductive loads.
The electricity consumption data corresponding to the retailer's clients is also extracted from the New York electricity market data during 2009-2015 [47]. In this case study, it is assumed that the retailer has retail contracts with only 10 customers and for each customer 5 load scenarios are considered. Figure 3 depicts the total electricity consumption of the retailer's customers during the one-week scheduling period. The probability distribution of the load scenarios is presented in Figure  4.
We consider a 0.9 lagging power factor for the electrical loads of the network. This assumption is made based on the fact that we focus on the small electricity users, mainly residential loads, and the largest share of the home appliances are inductive loads.

Distributed Generators' Data
It is assumed that there are five DGs connected to the distributed network from which the retailer can provide electricity. Technical limits of these DG units are presented in Table 1. It is assumed that price offers of DG units are provided to the retailer as block offers with staircase offer curves. Then, the retailer decides on purchasing electrical energy from these DG units based on their prices. In this case study, we assume that each DG owner submits three different power-price offer blocks to the retailer corresponding to low-load, mid-load, and peak-load periods, respectively. The offer price and quantity of the active power and reactive power of the DG units are extracted form New York electricity market data in [47] and tabulated in Tables 2-5.

Distributed Generators' Data
It is assumed that there are five DGs connected to the distributed network from which the retailer can provide electricity. Technical limits of these DG units are presented in Table 1. It is assumed that price offers of DG units are provided to the retailer as block offers with staircase offer curves. Then, the retailer decides on purchasing electrical energy from these DG units based on their prices. In this case study, we assume that each DG owner submits three different power-price offer blocks to the retailer corresponding to low-load, mid-load, and peak-load periods, respectively. The offer price and quantity of the active power and reactive power of the DG units are extracted form New York electricity market data in [47] and tabulated in Tables 2-5.

Contracts' Data
The contracts' data include contract type, contracted power quantity, number of steps, and operation time horizon of each forward contract. In this study, six contracts from three different contract type, i.e., bilateral contracts, call options, and put options, are considered. The data of these contracts are presented in Tables 6-8. Without loss of generality, we consider three steps for each contract with different offered power and price for each step. Moreover, similar to the DGs' offers, it is assumed that each contract consists of three price/quantity offer steps corresponding to the low-load, mid-load and peak-load hours of the day. The offer prices and offer power quantity of each step of different contracts are presented in Tables 7 and 8. The offered price/quantity steps are extracted from [47].

Other Required Input Data
Other supplementary input parameters needed to perform the simulation, including the risk parameter and selling price data of the retailer, are presented in Table 9. During the simulation, the retailer's selling price data may be changed by the authors, with the aim of analyzing the resulted profit of the retailer. As mentioned before, totally 50 uncertainty scenarios are considered for each hour, including 10 spot market price scenarios and five load scenarios. A retailer should purchase electricity through forward contracts or directly from centralized electricity markets and sell it through contracts, usually with constant price, to its customers

Results and Discussion
In this section, the simulation results on the test case are presented and discussed. As mentioned before, we consider four different schemes for retailer's decision-making problem. In the followings, the results of these schemes are compared in terms of retailer's profitability and risk. Finally, the effectiveness of using demand response programs by retailer on its performance is analyzed.

First Scheme: Without Forward Contracts, DGs, and DRP
Under this scheme, the profit of the retailer is −1,287,060$ and its risk is 59,746$ which implies on a highly risky and non-profitable strategy. The retailer needs to buy the whole required energy to supply its customers from the spot electricity market with volatile market prices. Therefore, to remunerate its costs and achieve a positive profit, the retailer needs to increase its selling price to the customers form the values presented in Table 9. Even through selling the electricity with the maximum proposed price (90 $/MWh) to its customers, the retailer cannot reach positive profit in this scheme. Furthermore, one should consider that the retail price increment would in turn decrease the number of retailer's customers in long term.

Second Scheme: With DGs but without Forward Contracts and DRP
Under this scheme, the possibility to access distributed generators increases the retailer's profit to −226,035$ and decreases its risk to 43,912$. However, the retailer still is not able to achieve positive profit without increasing its retail electricity prices. We increase the average selling price of the retailer from the predefined 63 $/MWh is Table 9 in short steps and execute the simulation for each price to achieve a positive profit. Under the average selling price value of 72 $/MWh, the profit becomes positive. Therefore, it is resulted that the retailer needs to increase its average retail prices to minimum 72 $/MWh. The simulation results in terms of retailer's profit, retailer's payment to DGs, and retailers' payment to spot market, under the two average selling prices are presented in Table 10.

Third Scheme: With DGs and Forward Contracts but without DRP
Under this scheme, the retailer's profit is −29,790$ and its risk is 24,638$. Comparing the results to the second scheme, it can be concluded that the ability of the retailer to make forward contracts increases its profit and reduces its risk. However, similar to the previous schemes, the retailer's profit is negative with 63 $/MWh average selling price. To achieve a positive profit, the retailer needs to increase its average retail price at least 2 $/MWh, to 65 $/MWh. The profit and costs of the retailer  Table 11. It can also be concluded that the possibility to make forward contracts enables the retailer to reach profitability with lower risk and lower average selling price which in turn increase its customers' satisfaction.  Figure 5 illustrates the willingness of the retailer to buy energy from different forward contracts, as introduced in Section 3.1.4. As can be seen in Figure 5, the bilateral contracts tend to be more compelling by the retailer, whereas the put options are the least pleasant contracts.   Figure 5 illustrates the willingness of the retailer to buy energy from different forward contracts, as introduced in Section 3.1.4. As can be seen in Figure 5, the bilateral contracts tend to be more compelling by the retailer, whereas the put options are the least pleasant contracts. It should be noted that the structure of the bilateral contracts impacts the strategy of the retailer on buying energy from these contracts during scheduling time horizon. In this example, we considered staircase price curve for the bilateral contracts with3 price steps corresponding to 3 power levels in each period. The energy purchased from the first bilateral contract (Bilateral 1) is shown in Figure 6. In case the offer curve of the bilateral contacts was 1-level instead of 3-level, which means that the price was the same for different energy levels, the energy purchased curve in Figure 6 would have only two levels meaning that the energy was either purchased from the producer or not.

Fourth Scheme: With DGs, forward Contracts, and DRP
Under the assumption of the retailer's accessibility to DGs, forward contracts, and DRP, the retailer achieves 94,043$ profit and 1548$ risk. Comparing the retailer's profit to the previous schemes, it can be concluded that only through implementing demand response program the retailer can achieve positive profit with the average selling price of 63 $/MWh, as the input parameter in It should be noted that the structure of the bilateral contracts impacts the strategy of the retailer on buying energy from these contracts during scheduling time horizon. In this example, we considered staircase price curve for the bilateral contracts with3 price steps corresponding to 3 power levels in each period. The energy purchased from the first bilateral contract (Bilateral 1) is shown in Figure 6. In case the offer curve of the bilateral contacts was 1-level instead of 3-level, which means that the price was the same for different energy levels, the energy purchased curve in Figure 6 would have only two levels meaning that the energy was either purchased from the producer or not.   Figure 5 illustrates the willingness of the retailer to buy energy from different forward contracts, as introduced in Section 3.1.4. As can be seen in Figure 5, the bilateral contracts tend to be more compelling by the retailer, whereas the put options are the least pleasant contracts. It should be noted that the structure of the bilateral contracts impacts the strategy of the retailer on buying energy from these contracts during scheduling time horizon. In this example, we considered staircase price curve for the bilateral contracts with3 price steps corresponding to 3 power levels in each period. The energy purchased from the first bilateral contract (Bilateral 1) is shown in Figure 6. In case the offer curve of the bilateral contacts was 1-level instead of 3-level, which means that the price was the same for different energy levels, the energy purchased curve in Figure 6 would have only two levels meaning that the energy was either purchased from the producer or not.

Fourth Scheme: With DGs, forward Contracts, and DRP
Under the assumption of the retailer's accessibility to DGs, forward contracts, and DRP, the retailer achieves 94,043$ profit and 1548$ risk. Comparing the retailer's profit to the previous schemes, it can be concluded that only through implementing demand response program the retailer can achieve positive profit with the average selling price of 63 $/MWh, as the input parameter in Table 9. Furthermore, thanks to the DRP, the retailer can decrease its risk up to 93.7% compared to the third scheme. From the customers point of view also this scheme is more preferable, since the retailer can offer the lower retail electricity prices to its customers, without threatening its profitability. Our simulation results indicates that the retailer can decrease its average daily retail prices up to 60 $/MWh during the scheduling horizon under this scheme while keeping its profit positive. Table 12 presents the retailer's profit and payments under the two average retail prices of 63 $/MWh and 60 $/MWh. Compared to the previous schemes, in this scheme the energy purchased from spot market by the retailer decreases which in turn reduces the retailer's risk.
The willingness of the retailer to provide energy from different forward contracts under the fourth scheme (with and without DRP) is shown in Figure 7. The results indicate that with or without the possibility to implement demand response programs, it is more beneficial for the retailer to buy energy from bilateral contracts. The energy purchased from the first bilateral contract (Bilateral 1) is depicted in Figure 8. the third scheme. From the customers point of view also this scheme is more preferable, since the retailer can offer the lower retail electricity prices to its customers, without threatening its profitability. Our simulation results indicates that the retailer can decrease its average daily retail prices up to 60 $/MWh during the scheduling horizon under this scheme while keeping its profit positive. Table 12 presents the retailer's profit and payments under the two average retail prices of 63 $/MWh and 60 $/MWh. Compared to the previous schemes, in this scheme the energy purchased from spot market by the retailer decreases which in turn reduces the retailer's risk. The willingness of the retailer to provide energy from different forward contracts under the fourth scheme (with and without DRP) is shown in Figure 7. The results indicate that with or without the possibility to implement demand response programs, it is more beneficial for the retailer to buy energy from bilateral contracts. The energy purchased from the first bilateral contract (Bilateral 1) is depicted in Figure 8.  The most remarkable impact which is expected from implementing DRP along with the dynamic pricing approach is to shift electrical load from peak-load hours to mid-load and low-load hours. The load shifting impact of DRP in our case study, during the 1-week scheduling horizon and a sample the third scheme. From the customers point of view also this scheme is more preferable, since the retailer can offer the lower retail electricity prices to its customers, without threatening its profitability. Our simulation results indicates that the retailer can decrease its average daily retail prices up to 60 $/MWh during the scheduling horizon under this scheme while keeping its profit positive. Table 12 presents the retailer's profit and payments under the two average retail prices of 63 $/MWh and 60 $/MWh. Compared to the previous schemes, in this scheme the energy purchased from spot market by the retailer decreases which in turn reduces the retailer's risk. The willingness of the retailer to provide energy from different forward contracts under the fourth scheme (with and without DRP) is shown in Figure 7. The results indicate that with or without the possibility to implement demand response programs, it is more beneficial for the retailer to buy energy from bilateral contracts. The energy purchased from the first bilateral contract (Bilateral 1) is depicted in Figure 8.  The most remarkable impact which is expected from implementing DRP along with the dynamic pricing approach is to shift electrical load from peak-load hours to mid-load and low-load hours. The load shifting impact of DRP in our case study, during the 1-week scheduling horizon and a sample  The most remarkable impact which is expected from implementing DRP along with the dynamic pricing approach is to shift electrical load from peak-load hours to mid-load and low-load hours. The load shifting impact of DRP in our case study, during the 1-week scheduling horizon and a sample 24-h horizon are shown in Figures 9 and 10, respectively. The figures show the difference between the electricity demand level and the actual electricity consumption per hour. As can be seen in Figure 10, in the first hour of the sample day, the customers consume almost 30 MW more than the expected demand, whereas during the 10th hour they decrease their consumption up to 45 MW compared to the expected demand. The customers' load shifting in turn enables the retailer to reduce its risk, as well as the retail average electricity price, compared to the other schemes and simultaneously increase its profit.
In general, decreasing the electricity demand during the peak-load hours by the customers and shifting this demand to the other hours of the day, as shown in Figures 9 and 10, helps the retailer to achieve its main objective, i.e., to decrease its risk and increase its profit. In other words, under this situation, the retailer can provide the total electrical energy demand of its customers with lower cost and gain more profit.  Figures 9 and 10, respectively. The figures show the difference between the electricity demand level and the actual electricity consumption per hour. As can be seen in Figure 10, in the first hour of the sample day, the customers consume almost 30 MW more than the expected demand, whereas during the 10th hour they decrease their consumption up to 45 MW compared to the expected demand. The customers' load shifting in turn enables the retailer to reduce its risk, as well as the retail average electricity price, compared to the other schemes and simultaneously increase its profit.   Retailer' profit and its risk under different schemes are represented in Figures 11 and 12, respectively. These figures provide a comprehensive and comparative view on the results obtained from the previous schemes, in order to analyze the impact of forward contracts, DGs, and DRP on the retailer's profit and risk. Figure 11 confirms that only through performing DRP, the retailer can achieve positive profit with the average selling price of 63 $/MWh. By comparing four schemes in Figure 12, it can be concluded that by applying DRP the retailer can also decrease its risk to the lowest value compared to the previous schemes.  In general, decreasing the electricity demand during the peak-load hours by the customers and shifting this demand to the other hours of the day, as shown in Figures 9 and 10, helps the retailer to achieve its main objective, i.e., to decrease its risk and increase its profit. In other words, under this situation, the retailer can provide the total electrical energy demand of its customers with lower cost and gain more profit.
Retailer' profit and its risk under different schemes are represented in Figures 11 and 12, respectively. These figures provide a comprehensive and comparative view on the results obtained from the previous schemes, in order to analyze the impact of forward contracts, DGs, and DRP on the retailer's profit and risk. Figure 11 confirms that only through performing DRP, the retailer can achieve positive profit with the average selling price of 63 $/MWh. By comparing four schemes in  Figure 12, it can be concluded that by applying DRP the retailer can also decrease its risk to the lowest value compared to the previous schemes.
It should be noted that the presented simulation results are dependent to the assumed offer price of the forward contracts and DGs. In case the offer prices from forward contracts and DGs increases, the retailer may decrease the power purchased form these sources and buy more power from the spot electricity market. On the contrary, if the offer prices of the forward contracts and DG units decrease and their offered power increase, the retailer would provide higher share of its customers' electrical demand from these sources and reduce its average selling price to the customers.

Conclusions
In this paper, the decision-making problem of the retailers under dynamic pricing approach for demand response integration have been investigated. The retailer was supposed to rely on forward contracts, DGs, and spot electricity market to supply the required active and reactive power of its customers. To verify the effectiveness of the proposed model, four schemes for retailer's scheduling problem are considered and the resulted profit under each scheme are analyzed and compared. The simulation results on a test case indicate that providing more options for the retailer to buy the required power of its customers and increase its flexibility in buying energy from spot electricity  Figure 12, it can be concluded that by applying DRP the retailer can also decrease its risk to the lowest value compared to the previous schemes.
It should be noted that the presented simulation results are dependent to the assumed offer price of the forward contracts and DGs. In case the offer prices from forward contracts and DGs increases, the retailer may decrease the power purchased form these sources and buy more power from the spot electricity market. On the contrary, if the offer prices of the forward contracts and DG units decrease and their offered power increase, the retailer would provide higher share of its customers' electrical demand from these sources and reduce its average selling price to the customers.

Conclusions
In this paper, the decision-making problem of the retailers under dynamic pricing approach for demand response integration have been investigated. The retailer was supposed to rely on forward contracts, DGs, and spot electricity market to supply the required active and reactive power of its customers. To verify the effectiveness of the proposed model, four schemes for retailer's scheduling problem are considered and the resulted profit under each scheme are analyzed and compared. The simulation results on a test case indicate that providing more options for the retailer to buy the required power of its customers and increase its flexibility in buying energy from spot electricity It should be noted that the presented simulation results are dependent to the assumed offer price of the forward contracts and DGs. In case the offer prices from forward contracts and DGs increases, the retailer may decrease the power purchased form these sources and buy more power from the spot Energies 2018, 11, 1602 20 of 24 electricity market. On the contrary, if the offer prices of the forward contracts and DG units decrease and their offered power increase, the retailer would provide higher share of its customers' electrical demand from these sources and reduce its average selling price to the customers.

Conclusions
In this paper, the decision-making problem of the retailers under dynamic pricing approach for demand response integration have been investigated. The retailer was supposed to rely on forward contracts, DGs, and spot electricity market to supply the required active and reactive power of its customers. To verify the effectiveness of the proposed model, four schemes for retailer's scheduling problem are considered and the resulted profit under each scheme are analyzed and compared. The simulation results on a test case indicate that providing more options for the retailer to buy the required power of its customers and increase its flexibility in buying energy from spot electricity market reduces the retailers' risk and increases its profit. From the customers' perspective also the retailers' access to different power supply sources may lead to a reduction in the retail electricity prices. Since the retailer would be able to decrease its electricity selling price to the customers without losing its profitability, with the aim of attracting more customers.
In this work, the conditional value at risk (CVaR) measure is used for considering and quantifying risk in the decision-making problems. Among all the possible option in front of the retailer to optimize its profit and risk, demand response programs are the most beneficial option for both retailer and its customers. The simulation results on the case study prove that implementing dynamic pricing approach on retail electricity prices to integrate demand response programs can successfully provoke customers to shift their flexible demand from peak-load hours to mid-load and low-load hours. Comparing the simulation results of the third and fourth schemes evidences the impact of DRPs and customers' load shifting on the reduction of retailer's risk, as well as the reduction of retailer's payment to contract holders, DG owners, and spot electricity market. Furthermore, the numerical results imply on the potential of reducing average retail prices up to 8%, under demand response activation. Consequently, it provides a win-win solution for both retailer and its customers.
Author Contributions: M.H.I. and S.Z. proposed the idea, conducted the simulation, analyzed the data and developed the methodology as well as wrote the paper. A.M. and S.S., verified the accuracy, and helped in the paper preparations, English corrections, and submission.

Conflicts of Interest:
The authors declare no conflict of interest.