A Novel Integrated Proﬁt Maximization Model for Retailers under Varied Penetration Levels of Photovoltaic Systems

: In contemporary energy markets, the Retailer acts as the intermediate between the generation and demand sectors. The scope of the Retailer is to maximize its proﬁts by selecting the appropriate procurement mechanism and selling price to the consumers. The wholesale market operation inﬂuences the proﬁts since the mix of generation plants determines the system marginal price (SMP). In the related literature, the SMP is treated as a stochastic variable, and the wholesale market conditions are not taken into account. The present paper presents a novel methodology that aims at connecting the wholesale and retail market operations from a Retailer’s perspective. A wholesale market clearing problem is formulated and solved. The scope is to examine how different photovoltaics (PV) penetration levels in the generation side inﬂuences the proﬁts of the Retailer and the selling prices to the consumers. The resulting SMPs are used as inputs in a retailer proﬁt maximization problem. This approach allows the Retailer to minimize economic risks and maximize proﬁts. The results indicate that different PV implementation levels on the generation side highly inﬂuences the proﬁts and the selling prices.


Introduction
The gradual liberalization and development of a single and competitive energy market has been one of the main pillars of the European Union (EU) energy policy, in the context of the wider changes in the energy sector in past few years [1]. The creation of a liberalized electricity market was considered a key priority by the EU institutions, as it was considered that is an important step towards the completion of the internal energy market, more efficient production, transmission and distribution of electricity, enhancing the security of electricity supply and strengthening the competitiveness of the European economy in conjunction with the protection of the environment [2]. For the last 20 years, the EU has sought a methodical opening of the energy market by distinguishing between competitive, e.g., electricity supply to consumers and non-competitive e.g., grid operation activities, third-party access to their infrastructure, the liberalization of electricity supply activity, the gradual lifting of restrictions on consumer choice of retailer, and the establishment of independent market regulators [3][4][5].
Formerly, the organization of energy companies under the status of legal monopoly, with vertically integrated enterprises, identified the multilateralism of generation, transmission, and distribution activities with the one-sidedness of only one provider of all of these services. With the liberalization of energy markets, an accelerating polymerization manifested into the competing activities of generation and distribution. Commonly, the transition from the monopolizing energy industry in the liberalized energy market is done without the activities of the industry to change numerically, but establishing now the possibility of changes in the number of energy actors in the generation and distribution sectors. The result of these changes was an increase of competitive activities, and the that provide different fixed prices. In [24], the Markowitz theory is regarded to optimize Retailer's portfolio. The scope is to determine the optimal price per consumer categories, namely, residential, industrial, street lighting, small and large commercial. The results show that the retailer, by being more realistic in choosing consumers to its portfolio, can offer more competitive tariffs to key consumers and keep the portfolio optimal and stable in relation to the risk-return ratio. In [25], the aim is to define the optimal selling price. The Retailer owns a hydrogen storage system containing an electrolyzer, hydrogen storage tanks, and fuel cell. Demand and prices are modeled via a series of scenarios. The power unit, together with the storage, are used as additional mechanisms to cover the demand. In [26], prices and loads are stochastic variables and are extracted through a SARIMA model. The initial 500 scenarios are reduced to 100. Apart from CVaR, the authors examine the application of minimax regret and chance-constrained measures.
It should be mentioned that most of the previous studies consider a fixed selling price. A more accurate pricing mechanism that is able to transfer the costs of generated electricity to the end consumers is real-time pricing (RTP) [27]. RTP is a concept that belongs to the family of price-based demand response (DR) methods. Contrary to an incentive-based DR, the consumers participation and response in a price-based DR is not mandatory [28]. The RTP scheme is examined considering various price/demand functions in [29]. The authors examine the influence of the selection of different functions in the profits. Load profiling information is used in [30,31]. The general approach of these studies is: A clustering is applied to a group of consumers, and clusters of consumers with similar characteristics are formed. The profit maximization problem per cluster is solved, and the selling price per consumer clusters is defined.
Based on the previous literature overview, the main conclusions that can be drawn are: (i) All the studies concerned with the Retailer profit maximization problem do not involve wholesale market clearing problems. The wholesale operation is not examined, and thus potential changes in the electricity generation mix are not validated in terms of retail market conditions. More specifically, there is little evidence in the literature on how increased capacity of renewably energy influences the cost of electricity and the RTP offered to the consumers that reflect this cost. (ii) The pool market prices are simulated as stochastic variables through a scenarios based approach. By incorporating stochastic programming simulations in mixed-integer linear problems, the overall complexity of the optimization problem increases. (iii) The topic of dynamic pricing has not received considerable attention. In the majority of the studies the selling price is fixed and not time-variant.
In the present study, the focus is to replace the stochastic programming approach by providing a market-clearing solution on the wholesale side. An integrated profit maximization model is proposed. The term integration refers to the connection between wholesale and retail markets. The proposed model includes a wholesale side and a retail side models. A market-clearing problem is solved to extract the SMP for various photovoltaics (PV) implementation scenarios. More specifically, the market-clearing problem is solved hourly for a full year. The scope of the scenarios is to assess how the implementation of different renewable generation capacity of an energy system influences the Retailer actions and the selling price limits. Based on the DR model that simulates the consumers' behavior on the price, the final selling price is derived and sent to the consumers. It is assumed that the consumers react rationally and modify their load accordingly. Then, the profitability, i.e., the ratio of revenue to income is calculated. The proposed model is flexible; different wholesale market conditions can be simulated in detail; different procurement mechanisms can be exploited together with various types of dynamic pricing.

General Framework
The schematic representation of the proposed model is shown in Figure 1. Apart from the generation mix, interconnections interchanges, and others, the outputs of the cost- optimal market-clearing problem include the hourly SMPs for a full year. The number of SMP time series equals the number of PV implementation scenarios. Two procurement mechanisms are regarded, namely the future market and pool market. The outputs of the profit maximization problem include the RTPs transferred to the consumers.

General Framework
The schematic representation of the proposed model is shown in Figure 1. Apart from the generation mix, interconnections interchanges, and others, the outputs of the cost-optimal market-clearing problem include the hourly SMPs for a full year. The number of SMP time series equals the number of PV implementation scenarios. Two procurement mechanisms are regarded, namely the future market and pool market. The outputs of the profit maximization problem include the RTPs transferred to the consumers.

Mathematical Formulation of the Wholesale Market Optimization Model
This part deals with the cost-optimal market-clearing of a power system, considering the power units' operational constraints and interconnections with neighboring power systems. The examined period is a daily one, with an hourly time step . The power units taken into consideration include thermal power ones ℎ, nuclear , hydroelectric ℎ, and renewable energy ones . Thermal power units, along with nuclear power ones, are commonly referred to as type-units. Additional sources of supply are the electricity imports from neighboring power systems, while electricity exports can also be carried to the same systems. Both supply and consumption entities offer/bid specific quantities at certain prices. Each offer/bid is also divided into a number of blocks with a non-decreasing (increasing) order for offers (bids). In particular: • price ( , , )-quantity ( , , ) pair for the energy supply of type-power units, • price ( , , )-quantity ( , , ) pair for the energy supply of electricity imports , • price ( , , )-quantity ( , , ) pair for the energy consumption of electricity exports , and • price ( , , )-quantity ( , , ) pair for the energy consumption of electricity demand bids .
A specific cost ( , ) is assigned with the cleared electricity supply from hydroelectric units, which is dependent on the assumed hydrological conditions of the specific date ( ), and the hourly availability of each hydroelectric unit ℎ ( , ). Concerning the renewable energy units , a certain cost ( , ) is associated with the cleared electricity supply from renewable energy units, based on the assumed meteorological conditions for each type of resource and time period ( , ), and the installed capacity of each renewable energy source ( ). Each energy supply unit is characterized by a specific technical maximum ( ) and minimum ( ) for their operation. Specific limits exist in their ability to increase (up) or decrease (down) their outputs, commonly referred to as ramp-up ( ) and rampdown limits ( ). Moreover, type-units are identified based on their minimum uptimes ( ) and downtimes ( ).

Mathematical Formulation of the Wholesale Market Optimization Model
This part deals with the cost-optimal market-clearing of a power system, considering the power units' operational constraints and interconnections with neighboring power systems. The examined period is a daily one, with an hourly time step t. The power units taken into consideration include thermal power ones th, nuclear nu, hydroelectric h, and renewable energy ones r. Thermal power units, along with nuclear power ones, are commonly referred to as type-l units. Additional sources of supply are the electricity imports m from neighboring power systems, while electricity exports x can also be carried to the same systems. Both supply and consumption entities offer/bid specific quantities at certain prices. Each offer/bid is also divided into a number of blocks with a non-decreasing (increasing) order for offers (bids). In particular: • price (C unit l,bl,t )-quantity (CB l,bl,t ) pair for the energy supply of type-l power units, • price (C imp m,bl,t )-quantity (CB m,bl,t ) pair for the energy supply of electricity imports m, • price (C exp x,bl,t )-quantity (CB x,bl,t ) pair for the energy consumption of electricity exports x, and • price (C dm d,bl,t )-quantity (CB d,bl,t ) pair for the energy consumption of electricity demand bids d.
A specific cost (C hr h,t ) is assigned with the cleared electricity supply from hydroelectric units, which is dependent on the assumed hydrological conditions of the specific date dt (E hyd dt ), and the hourly availability of each hydroelectric unit h (P max h,t ). Concerning the renewable energy units r, a certain cost (C hr r,t ) is associated with the cleared electricity supply from renewable energy units, based on the assumed meteorological conditions for each type of resource r and time period t (AV r,t ), and the installed capacity of each renewable energy source r (P max r ). Each energy supply unit l is characterized by a specific technical maximum (P max l ) and minimum (P min l ) for their operation. Specific limits exist in their ability to increase (up) or decrease (down) their outputs, commonly referred to as ramp-up (RU l ) and ramp-down limits (RD l ). Moreover, type-l units are identified based on their minimum uptimes (T UT l ) and downtimes (T DT l ). When they provide secondary reserve, they should operate under Automatic Generation Control (AGC), in which they have other technical maximums (P max,AGC l ) and minimums (P min,AGC l ). Type-l units can also provide reserves to the systems that can be primary-up and -down, secondary-up and -down, and tertiary upward spinning and non-spinning. This reserve supply has a specific cost based on the type of reserve, the type of supplier l, and the time period t, namely, C 1up l,t , C 1dn l,t , C 2up l,t , C 2dn l,t , and C 3 l,t for primary-up, for primaryup, R 1dn l for primary-down, R 3s l for tertiary spinning, and R 3ns l for tertiary non-spinning reserve. The maximum level for the provision of the secondary-up and -down reserve is related to the ramp-up (RU AGC l ) and down limits (RU AGC l ) of each unit l when operating under AGC. Two other cost components are associated with the start-up (C stu l ) and the shut-down (C shd l ) decision making of each type-l unit. Furthermore, the cases of unmet energy (C ue t ) or inability to cover part of reserve requirements per type have been assigned with specific cost penalties (C ur t ). The system's requirements for each reserve type include: secondary-down reserve requirements (DR 2dn t ), and • tertiary reserve requirements (DR 3 t ).

Objective Function of the Wholesale Market Optimization Problem
The mathematical model's objective function refers to minimizing a given power system's daily energy and reserves cost as provided by the following relationship (1).

Energy Demand Balance
This section provides the mathematical set-up of the energy demand balance.
Equation (2) states that the total energy supply from all types of suppliers, including thermal th, nuclear nu, hydroelectric h, renewable energy units r and imports m plus the amount of unmet demand must meet the cleared demand bids d and energy exports x in each time period t.

Operational Constraints
This set of constraints refers to operational limits. The available capacity of each energy supply entity l, m, and consumption entity x and d is divided into a number of blocks bl, each of which has a unique price-quantity pair. b l,bl,t ≤ CB l,bl,t ∀ l, bl, t The cleared energy supply of each supply entity l (m) in each block bl and time period t has the upper limit of the corresponding offered quantity, according to constraints (3) and (4). Constraints (5) and (6) defines that the cleared energy exports to each interconnected power system x (demand bids d) in each block bl and time period t must not exceed the corresponding available quantity. Equations (7) and (8) set that the total cleared energy supply from each entity l (m) in each time period t amounts to the sum of all blocks of the respective cleared energy supply. The total cleared electricity exports to each interconnected power system x (demand bids d) in each interval t amount to the sum of all blocks of the corresponding cleared energy exports (demand bids), according to Equations (9) and (10). Constraints (11)-(14) model the operational limits, upper ( (11) and (13)) and lower ( (12) and (14)) respectively, of each unit l in each interval t, also considering their reserve provision capabilities (primary-up, primary-down, secondary-up and -down, and tertiary spinning).

Reserve Provision Limits
This section provides the mathematical set-up of the reserve provision limits.
Energies 2021, 14, 92 This set of constraints (15)-(22) models the reserve provision limits of each reserve supplier l in each time period t, by imposing upper limits for each reserve type, subject to the entity's dispatch (x l,t ) or not (1 − x l,t ), and operation under AGC or not (x AGC l,t ). More specifically, constraint (15) puts an upper bound on the primary-up reserve supply, constraint (16) on the primary-down reserve supply, constraint (17) on the secondary-up reserve supply, constraint (18) on the secondary-down reserve supply, constraint (19) on the tertiary-spinning reserve supply, and constraints (20)-(22) on the tertiary non-spinning reserve supply. Constraints (23) and (24) define the ramp-up (RU l ) and -down (RD l ) limits, for each entity l in each interval t, namely the rate at which a supplying entity can increase (up) or decrease (down) its output.

System's Reserve Requirements
This section provides the mathematical set-up of the system's reserve requirements.
The following group of constraints (25)-(29) defines the system-wide requirements for each reserve type, primary-up (25), primary-down (26), secondary-up (27), secondarydown (28), and tertiary spinning and non-spinning (29), respectively, which can be provided by hydrothermal units ht, namely hydroelectric and thermal power units plus the amount of unmet demand per reserve type.

Renewable Energy Generation
This section provides the mathematical set-up of renewable energy generation.
Equation (30) imposes that the energy supply of each renewable energy technology r in each interval t (p r,t ) plus the amount of the corresponding curtailed energy (nr r,t ) has an upper bound related to the availability of each renewable energy technology r in each interval t (AV r,t ) multiplied with its installed capacity in each interval t (CC r,t ).

Hydroelectric Power Generation
This section provides the mathematical set-up of hydroelectric power generation.  (32) states that the daily maximum must not exceed the total available installed capacity.

Time-Related Constraints
This section provides the mathematical set-up of the time-related constraints.
Constraint (33) models the minimum uptime of each supply unit l, based on which it must be online in each interval t (x l,t = 1) if and only if it has started-up (y l,t = 1) during the previous (T UT l − 1) intervals. Analogously, Constraint (34) defines the minimum downtime of each supply unit l, according to which it must remain offline in each interval t (x l,t = 0) if it has been down (z l,t = 1) during the previous (T DT l − 1) intervals. Moreover, Equation (35) formulates the logical relationship between start-up (y l,t ) and shut-down (z l,t ) decisions of each supply entity l in each time period t. Furthermore, a supply entity l can operate under AGC if and only if it operates in the dispatch phase, according to Constraint (36).

Net Electricity Trading
This section provides the mathematical set-up of the net electricity trading.
Constraint (37) states that net electricity imports (p m,t − p x,t ) of each interconnection (imports) m in each time periodt, also considering their reserve supply capability, must not exceed the corresponding interconnection capacity (∑ bl b m,bl,t ). Further, Constraint (38) sets the same condition for net electricity exports (p x,t − p m,t ).
The overall problem is formulated as a mixed-integer linear programming (MILP) problem, involving the cost minimization objective function (1), and subject to Constraints and Equations (2)-(38).

Mathematical Formulation of the Retail Market Optimization Model
The decision making actions of the Retailer are classified into medium-term and shortterm actions. The medium-term actions determine the electricity purchased from the future market via forwards contracts (FCs). After this decision, the short-term actions define the amount purchased from the pool market and the selling price. Below the formulation of the retail market optimization model is analyzed.

Future Market
In order to form the FCs structure, it is necessary to categorize the 24 h period into various intra-day periods, according to the following: Period#3 refers to peak hours while the remaining to off-peak hours. Based on these periods five FCs are considered, which differ intra-day wise. Each FC is composed of five blocks that correspond to each power amount that differ in the price. The block limits are 20, 40, 60, 80, and 100 kW. Let f = 1, 2, . . . , F be the number of FCs and j = 1, 2, . . . , N j the number of blocks. The cost C F t that is related to the FCs in period t is calculated by where λ F f jt and P F f jt are the price and amount purchased from f -th contract and N j -th block, respectively, at period t = 1, 2, .., T. Parameter P F f jt,max denotes the block size. Equation (40) sets a limit of the amount to be purchased of each block. The term refers to the maximum power offered by the specific FC, i.e., it refers to the block size. Equation (41) refers to the total power of each contract P F f jt which is given as the sum of the powers of each block.

Pool Market
After the solution of the market-clearing problem, the SMPs are available. Let λ P t be the price in the pool market at period t = 1, 2, .., T. The cost of energy purchased from the pool C P t is expressed as where E P t is the energy purchased for the pool at period t.

Demand Response
It is considered that the Retailer serves one group of consumers of the same type. The responsiveness of the consumers to the selling price is modeled through a linear price/demand function. This means that when consumers are offered a high selling price, they linearly decrease their demand.
Initially, the consumers are charged with a nominal selling price r o at period t = 1, 2, .., T. After the solution of the retail optimization problem, a new price is offered that maximizes Retailer's profit. Let r(t) be a random selling price at period t = 1, 2, .., T after the solution of the problem. Due to the nominal price r o the consumers' nominal demand is indicated as d o . The demand response of the consumers to the selling price r(t) is denoted as d(t). The linear price/demand function is expressed as The parameter that controls the level of the demand variation is the elasticity β.

Demand Balance
To reach out into a feasible solution to the problem, an energy balance constraint should be imposed. For each time instant t the demand of the consumers E D t should be covered by two procurement mechanisms: To correspond to formulation of the problem, Equation (43) is rewritten as where E D ot is the nominal demand, λ D ot is the nominal selling price and λ D t is the selling price at period t = 1, 2, .., T.

Selling Price Limit
Theoretically, the higher the offered price the higher the profits will be. In order for the Retailer to become competitive and follow the rules of the market set by the regulatory authorities, a price limitation is needed. If the consumers elasticity would be extremely low, the selling price would correspond to unrealistic high values without price limitation. The price limitation is given by the following equation: where λ D max is the upper limit of the selling price.

Expected Profit and Network Access Costs
The expected profit is obtained by the difference between the revenues and the costs. The revenues R t refer to the product between the selling price and the consumers' load: Apart from the costs related with the electricity procurement, the retailer is charged with transmission and distribution system access tariffs C N : where λ et and λ pt are the energy and power elements of the network access tariff, respectively and P t Is the contracted power. The Retailer's profit RP is expressed as The profit function is composed of elements that refer to incomes and expenses.

Objective Function of the Retail Market Optimization Problem
The profit maximization problem is formulated as

Results
Both the cost-optimal market-clearing and profit maximization problems are formulated as mixed-integer nonlinear problems and are solved by commercial software [32]. The proposed methodological framework for the wholesale market clearing problem has been assessed on an illustrative case study, the key characteristics of which are provided in Tables 1 and 2. Table 1 summarizes the studied power system's economic data, and Table 2, the key technical data. The examined power system includes four LIGnite-fired units (LIG), six Natural Gas Combined Cycle (NGCC) units, two Natural Gas-fired Gas Turbines (NGGT), and hydroelectric units. It additionally includes wind turbines and solar panels, each of which with a capacity of 1 GW. The available interconnection capacity for both imports and exports is assumed to be 2 GW. The Hellenic energy system serves as the test system where both models are applied [33]. A general test case with a Retailer covering the demand of 84 residential consumers is regarded. The load series refer to the aggregated load of the consumers, and the network access tariffs correspond to the ones of the Hellenic system. The nominal electricity selling tariff r o is obtained by the sum of the SMP, transmission, and distribution network access tariffs increased by 10%. Following this approach, the Retailer charges the consumers an amount of 10% higher than the nominal, i.e., initial costs related to the pool market. This amount is considered in order to cover some of the operational expenses of the Retailer. The elasticity parameter is β = −1.50. Hence, it is considered that all consumers are very elastic in modifying the demand for small price changes. For simplicity reasons, it is considered that the elasticity is the same for all hours of the day and that all consumers are characterized by the same elasticity. It is assumed that the Retailer is a limited portfolio, i.e., its decisions in the retailer market do not influence retail and wholesale markets operation and conditions.
To fully examine the influence of various implementation rates of PV capacity in the wholesale market, eight scenarios are regarded, denoted as S s , s = 1, 2, . . . , 8. Table 3 shows the solutions of the market-clearing problem for a full year. It is shown the amount of annual PV installed capacity. Scenario S1 refers to 1000 MW while S8 to 8564 MW. Due to these different PV capacity mixes, there are visible variations in the capacities of the other technologies and the imports/exports balance. As the PVs shares in the electricity mix increases, thermal units are displaced. More specifically, there is a decrease in the generation of lignite and NG fueled units. Moreover, for 3000 MW generation and higher RES curtailments appear. RES technologies, apart from PVs, include onshore wind turbines and small hydroelectric plants. The last row of the Table presents the annual average SMP. It can be noticed that from S1 to S8, the mean SMP is decreased by 32.60%, i.e., from 49.17 €/MWh to 33.14 €/MWh. While expensive technologies are displaced, the cost of electricity decreases. It is assumed that the PV generation is compensated by a feed-in-tariff mechanism, i.e., all the generated amount is fed into the grid covering a specific part of the demand. The variations of the daily average SMPs time series are depicted in Figure 2. The figure presents the mean annual SMP per scenario.   The scope of the FC is to decrease the economic risks associated with the fluctuations of the SMP in the day-ahead market. It is a bilateral agreement between a potential producer and the Retailer to purchase future amounts of electricity at a fixed price. According to Table 4, each FC applies on four different intra-day periods. Prices among those periods differ. The higher prices are noticed at the period 19:00-22:00 h corresponding to the evening peak. As block size decreases, prices become higher. For instance, a producer that establishes a FC with the Retailer motivates the latter to buy high amounts of power. Additional amounts of the same block size is slightly more expensive. Each FC refers to different block sizes and the number of blocks is 5. The electricity purchase from one FC to another refers to higher prices. To thoroughly investigate the influence of the various PV generation shares on the Retailer's profits and the levels of electricity rates to the end-consumers, four cases are taken into account. The retail market optimization problem is solved for four different days in the year, one per different season, namely for 2 January 2019, 25 April 2019, 14 August 2019, and 9 October 2019. The first test day, i.e., 2 January 2019, is the next day to New Year Day. This means that it is close to an official bank holiday in Greece. Many professional activities are in halt during this day, and thus, it corresponds to low consumption, especially in the commercial and industrial sectors. This is also the case for 25 April 2019 and 14 August 2019. They refer to previous days of two official bank holidays in spring and summer, respectively. Day 9 October 2019 is a working day. Therefore, the selection of days allows the user to examine the profit maximization problem in working days and days with special conditions. Every scenario is examined for each test day, leading to a total number of 32 test cases. Figure 3 presents the SMP series for the various test cases as extracted by the execution of the cost-optimal market-coupling solution. It can be noticed that in periods with large PV generated capacity the SMP is zero. For instance, in 9 October 2019 and S8, the SMP is zero in 10:00-14:00 h. Because of the increased daylight in the noon hours, the PV generation is high leading to low generation costs. Thus, the nominal price r o is low in the specific period and includes only the network access costs increased by 10%.
to Table 4, each FC applies on four different intra-day periods. Prices among those periods differ. The higher prices are noticed at the period 19:00-22:00 h corresponding to the evening peak. As block size decreases, prices become higher. For instance, a producer that establishes a FC with the Retailer motivates the latter to buy high amounts of power. Additional amounts of the same block size is slightly more expensive. Each FC refers to different block sizes and the number of blocks is 5. The electricity purchase from one FC to another refers to higher prices.    The scope of the FC is to decrease the economic risks associated with the fluctuations of the SMP in the day-ahead market. It is a bilateral agreement between a potential producer and the Retailer to purchase future amounts of electricity at a fixed price. According to Table 4, each FC applies on four different intra-day periods. Prices among those periods differ. The higher prices are noticed at the period 19:00-22:00 h corresponding to the evening peak. As block size decreases, prices become higher. For instance, a producer that establishes a FC with the Retailer motivates the latter to buy high amounts of power. Additional amounts of the same block size is slightly more expensive. Each FC refers to different block sizes and the number of blocks is 5. The electricity purchase from one FC to another refers to higher prices.
The income, profit, and profitability for 2 January 2019, 25 April 2019, 14 August 2019, and 9 October 2019 are presented in Tables 5-8, respectively. The highest profits are met in January. During winter, the PV production is minimal; thus, generation costs are increased. This fact leads the Retailer to offer high prices to the consumers. As the PV generation increases between the Scenarios, the profits reduce. Contrary to the decreased generation costs, and thus lower prices, August refers to increased profits. This is due to the fact that in the summer months, the annual demand peaks of Hellenic system are observed. There are no great changes in the profitability between the scenarios of the same test day. The profitability provides information regarding the relationship between the obtained revenues and real profits. While the upper threshold of selling price to the consumers is limited from market regulation to keep the retail market competition robust, the Retailer, in order to increase the profitability ratio, needs to establish more favorable FCs with the producer.         According to the results, both the initial price, i.e., the initial RTPs and final RTPs obtained by the solution of the profit maximization problem, follow the trends of the hourly generation cost as expressed by the SMP. Considering a linear relationship between the offered price and the demand response, an increment of price increase results According to the results, both the initial price, i.e., the initial RTPs and final RTPs obtained by the solution of the profit maximization problem, follow the trends of the hourly generation cost as expressed by the SMP. Considering a linear relationship between the offered price and the demand response, an increment of price increase results in a demand set by the regulation authority. The deviations between the nominal and final demand are analogous to the deviations of prices.
The linear price/demand function is expressed as a straight line with a negative slope. The elasticity expresses the slope. In order to examine the influence of the elasticity variation in the profit, different values are considered for a sensitivity analysis. The elasticity values under consideration are { 0.50, 0.75, 1.00, 1.50}.
For the analysis, test day 2 January 2019 and S1 are used. This test case refers to the highest profit and profitability compared to the others. Table 9 presents the respective results. Values near zero correspond to high inelastic behavior. It can be noticed that the inelastic demand pattern corresponds to profit and profitability increments. As consumers become more elastic, they take advantage of the low electricity prices and adjust their demand accordingly.    Figure 13 present the initial and final demands per elasticity value. For extreme selling prices, large reductions are expected. Table 10 presents an example of the contribution of the two procurement mechanisms for the 24 h period. Test day 2 January 2019 is regarded and scenarios S1 and S8. The scope is to compare the deviations in the demand coverage between the two extreme scenarios. During early morning hours the cost of electricity is low and thus, all demand is covered by the pool market. The two scenarios differ in the period 11:00-16:00 h. Since this period usually corresponds to high solar irradiation and hence, PV generation, the SMP is lower. In the case of scenario S8 all electricity is purchased from the pool market. nisms for the 24 h period. Test day 2 January 2019 is regarded and scenarios S1 and S8. The scope is to compare the deviations in the demand coverage between the two extreme scenarios. During early morning hours the cost of electricity is low and thus, all demand is covered by the pool market. The two scenarios differ in the period 11:00-16:00 h. Since this period usually corresponds to high solar irradiation and hence, PV generation, the SMP is lower. In the case of scenario S8 all electricity is purchased from the pool market.    The RTP scheme leads to total energy demand reduction. In a theoretical case, where the Retailer is obliged by the system operator to reduce the demand of its clients, a RTP scheme can be applied. Additionally, it is assumed that the initial demand is known. For instance, this information can be obtained by a short-term load forecasting routine.
As mentioned before, it is assumed that the same elasticity value characterizes all consumers. According to the figures, the selling prices series follow the nominal ones. The observed deviations from the nominal price depend on the procurement mechanism and the selling price limitation. While the Retailer does not influence the wholesale market price determination and the upper limit of the selling price limitation in the retail market, the only parameter for open negotiation is the FCs. The selling price limitation is usually set by the regulation authority. The deviations between the nominal and final demand are analogous to the deviations of prices.
The linear price/demand function is expressed as a straight line with a negative slope. The elasticity expresses the slope. In order to examine the influence of the elasticity For the analysis, test day 2 January 2019 and S1 are used. This test case refers to the highest profit and profitability compared to the others. Table 9 presents the respective results. Values near zero correspond to high inelastic behavior. It can be noticed that the inelastic demand pattern corresponds to profit and profitability increments. As consumers become more elastic, they take advantage of the low electricity prices and adjust their demand accordingly.  Figure 12 shows the RTPs per elasticity value. For β = −0.50 and β = −0.75 selling prices are very high. This fact may lead to the consumers' dissatisfaction with the pricing policy. Figure 13 present the initial and final demands per elasticity value. For extreme selling prices, large reductions are expected.     1 0 (S1) 0 (S8) 100 (S1) 100 (S8) 100 13 100 (S1) 0 (S8) 0 (S1) 100 (S8) 100   Table 10 presents an example of the contribution of the two procurement mechanisms for the 24 h period. Test day 2 January 2019 is regarded and scenarios S1 and S8. The scope is to compare the deviations in the demand coverage between the two extreme scenarios. During early morning hours the cost of electricity is low and thus, all demand is covered by the pool market. The two scenarios differ in the period 11:00-16:00 h. Since this period usually corresponds to high solar irradiation and hence, PV generation, the SMP is lower. In the case of scenario S8 all electricity is purchased from the pool market. Table 10. Contribution of the two procurement mechanisms for S1 and S8.

Conclusions
This paper presented a methodology that is built in two optimization models. The methodology aims at integrating the two competitive markets; the scope is to study the influence of the wholesale market conditions in the retail market, both for the Retailer and consumers. In the literature, the SMP is obtained through a set of scenarios. In this paper, the SMP is obtained by the solution of a market-clearing problem. Therefore it is based on actual data in the generation side and not extracted via a simulation based approach. Moreover, the CVaR method is not necessary for modeling stochastic processes in the proposed methodology.
The main conclusions drawn by the study can be summarized in the following: the different PV implementation shares on the generation side highly influences the profits and the levels of the selling prices. An increased PV capacity results in lower generation costs due to the fact that expensive marginal units are displaced. This eventually leads to lower profits since the RTPs are directly connected with the SMPs. Lower selling prices can be witnessed not only between the seasons but also between the periods of the day. When daily PV generation is high, the SMP can be zero. To overcome this effect, it is proposed to form a basic fixed selling price is related to network access costs. This approach prevents the Retailer from having negative profits. Moreover, the higher the deviation is between SMPS and RTP, the higher profits can be accomplished. This finding is based only on a predefined value of the elasticity parameter. When the demand becomes inelastic, the prices are increased together with profits. This is due to the fact that the Retailer needs to increase the prices in cases of low demand so that to obtain profits.
The contribution of the paper can be summarized in the following: • The methodology of the paper unifies the wholesale and retail market operations through two optimization models. The first one refers to a market-learning price problem where the objective is to minimize electricity generation cost. The decision variables of the problem are the schedules of the power plants and interconnection exchanges. The retail market model aims at the maximization of the Retailer's profit.
Here the decision variables are the procurement mechanism and the real-time selling prices to the consumers.

•
The unified consideration of the two markets minimizes the Retailer's economic risks and allows more robust and reliable strategic decisions of the Retailer in the competitive retail market. Wholesale market prices are not modeled as stochastic variables but are a product of the solution of the wholesale market operation. • Both models are flexible in terms of further expansions and additions. In particular, the retail market model can take into consideration different price/demand function, elasticity values, and electricity tariff structures.

•
The methodology of the paper quantifies and evaluates how different PV penetration levels affect the selling prices to the consumers. RTPs are implemented in the model in order to connect wholesale market conditions to the retail market. The actual electricity costs are transferred to the consumers. By modeling the consumer's response to the selling prices, load management techniques can be manifested, leading to benefits on the retail side, e.g., lower electricity costs for consumers, and on the wholesale side, e.g., congestion management in the transmission and distribution levels and others.
Future expansions of the methodology will regard different types of price/demand functions and different schemes of load management. Through the RTPs developed in the paper, total demand reduction is feasible. The set-up of the retail market problem can be modified to include other schemes like peak clipping or valley filling. Finally, other RES technologies implementation scenarios will be investigated.
Author Contributions: I.P.P. performed the research, developed the retail market optimization model and wrote the paper. N.K. provided guidance for the research and developed the wholesale market optimization model. G.C.C. provided guidance for the research and revised the paper. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

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

Nomenclature
Sets l ∈ L Set of thermal and nuclear power units h ∈ H Set of hydroelectric units hr ∈ HR Set of hydroelectric and renewable energy units ht ∈ HT Set of hydrothermal units bl ∈ BL Set of blocks of energy supply and consumption functions d ∈ D Set of demand entities m ∈ M Set of interconnection for energy imports nu ∈ NU Set of nuclear units r ∈ R Set of renewable energy sources t ∈ T Set of time periods th ∈ TH Set of thermal units x ∈ X Set of interconnection for energy exports Parameters