Bi‐level equilibrium of energy retailer–smart energy hub game in integrated energy market

Aras Sheikhi, Sharif Energy Research Institute, Teymoori St., Tehran, PO. Box: 11365‐11155 Iran. Email: asheikhi@sharif.edu Abstract An integrated view of energy markets has led to the introduction of new market participants named energy retailers (ERs). Competition among ERs in an integrated market greatly improves market performance in areas such as sustainability, supply security, and environmental awareness. ER performance is evaluated in an integrated market with emission penalty reduction in the objective function. Bi‐level programming is used to model an ER game, and the equilibria of different configurations are compared. In the game's first level, ERs offer various energy carrier selling prices to optimise profits. In the second level, consumers respond by switching from the retail market to minimise their energy bills. This complex problem is simplified utilising a discretisation method based on Nash theory. The configuration scenarios include different structures, components, and ER–user transactions. The effectiveness of the proposed configuration scenarios is validated by their implementation in an illustrative case study. Energy retailers purchase energy from various sources including bilateral contracts with energy suppliers, wholesale market participation, and self‐generation. Electricity retailers explicitly represent the difficulties of energy procurement and bidding strategies. Simulation results for the proposed energy system model indicate better performance than that of the base case and a noticeable increment in retailer profit.


| INTRODUCTION
Environmental concerns have led researchers to a current focus on sustainability challenges associated with health protection, security of supply, and economic and social aspects [1,2]. Sustainability is defined as development that meets present needs without compromising the ability of future generations to meet their own energy needs [3]. Sustainability within the energy market is categorised in four dimensions: availability and security of supply, affordability and reliability, energy and economic efficiency, and environmental stewardship [4]. The availability and security of supply consist of three metrics including energy import dependency, the Shannon-Wienerdiversity index, and supply adequacy [5]. The electric power loss ratio, rural electrification rate, and residential consumption ratio are three metrics belonging to affordability and reliability. In addition, electricity per gross domestic product and electric power consumption per capita are two metrics of energy and economic efficiency. The environmental stewardship dimension has only one metric, namely, fossil fuel dependence.

| Motivation
With realisation of the smart grid (SG) within power grids, the development of SG concepts for other energy infrastructures such as gas and district heating networks has become inevitable [6]. Energy hubs (EHs) have been introduced to manage smart energy systems with various energy carriers. The EH is a generic model where different energy carriers are converted, stored, and distributed to meet energy demands. The presence of EHs and advances in SG technologies have motivated system planners to deploy intelligent multi-carrier energy systems called smart energy (SE) hubs.

| Literature survey
Several approaches have recently been implemented to effectively manage energy flow in modern energy systems using the mentioned metrics. Moghateli et al. in [7] illustrated the impacts of load-uncertainty aspects on the operational cost, reliability, and self-adequacy of microgrids. For this purpose, two approaches were utilised based on probabilistic simulation using Monte Carlo simulations. In [8], a methodology was presented to study multi-carrier urban energy systems. The study aimed to find more optimal sustainable energy solutions for urban areas and employed intelligent energy networks striving for high onsite-generated energy shares. Another target was to employ cost-minimising system planning baselines for given boundary conditions. A new method for energy scheduling and cost minimisation in a real-time electricity pricing environment was proposed in [9]. The proposed scheme was suggested as a benchmark for real-time electricity pricing. Mbungu et al. in [10] designed a new model predictive control to minimise utilisation of the utility grid for electricity usage in the industry in the presence of renewable energy resources. Renewable energy resources such as wind turbines, solar panels, and smart energystorage systems were used in [11] to maximise microgrid profitability for 24 h. In that work, a new smart energy management system was proposed for domestic load with energy-storage capability. A dynamic distributed energy-storage strategy (DDESS) for smart energy coordination of an autonomous residential home was proposed in [12]. To investigate the performance index of a system through a real-time electricity pricing scheme, an optimal control approach was formulated under a closed-loop algorithm based on the DDESS. A twostage operating mechanism was proposed in [13] to improve the utilisation of distributed renewable energies and the profit of a microgrid. Ref. [14] introduced a three-step approach that replaced fossil fuels with renewable energy resources, enhanced sustainability, and reduced carbon emissions in a small village in Switzerland. Hua et al. in [2] proposed a Stackelberg gametheoretic system to specify an optimal low-carbon design in the energy market. The effects of changes in carbon price changes on total profit were estimated in that study to encourage the usage of low-carbon resources.
With respect to electricity market sustainability trends, distributed energy resources have been deployed in restructured electricity markets to enhance energy system sustainability by simultaneously reducing production costs and emissions [15,16]. The increase in the utilisation of gas-fired and other distributed generation technologies has a noticeable impact on enhancing energy service by coordinating various energy carriers [17]. In addition, the usage of different generation technologies on the distribution network can prevent transmission line expansion and power plant development that may include extraordinary investment costs [18]. A key aspect of the evolution towards a cleaner and more affordable energy system is to better understand and develop integrated energy systems whereby electricity, heat, cooling, fuels, and transport optimally interact at various levels (for instance, wholesaler, retailer, or consumer) [19]. Combined heat and power (CHP) is an apparent example of such technologies, with efficiency, reliability, and economic improvement associated with the integration of multicarrier energy networks such as electricity, gas, and districted heat [20]. Many studies address the benefits and challenges of using CHP in microgrids. Various strategies and optimisation methods have been utilised to investigate the economic and environmental effects of CHP [21,22].
The high penetration of distributed generation systems and emerging advanced measuring infrastructure systems led us to define an upgraded framework for the integrated energy system, calling it a smart energy hub [23]. This framework can be applied to appropriately model interactions between energy market participants, for example, retailers, consumers, and wholesalers. Generally, consumers are directly connected to energy suppliers, whereas energy retailers (ERs) play an important role as intermediaries between the wholesale market and end users. ERs purchase power from various energy suppliers, for example, bilateral contracts with energy suppliers, participation in the wholesale market, and self-generation [24]. Electricity retailers explicitly presented to the difficulties of energy procurement and bidding strategy. Several studies have focussed on the retailer's strategic behaviour as an intermediary between wholesale and consumption levels in electricity markets [25][26][27][28][29]. Hierarchal decision-making among microgrids and a demand aggregator in a retail energy market was proposed in [30] to apply optimal bidding approaches for retailers as well as optimal aggregator demand schedules. In addition, the Stackelberg game was utilised in [30] to model the multi-microgrid retail market. Liang et al. in [31] proposed a novel retail electricity market bidding mechanism for the distribution system. In this study, a bi-level algorithm is utilised to model the prosumers, utility providers, and distribution system operators. A market framework based on the multi-agent system (MAS) was proposed in [32] to find optimal energy transactions in multi-microgrid systems. A short-term two-stage decision-making scheme for electricity retailer participation in a liberalised distributed renewable energy market was presented in [33]. In this study, the uncertainties faced by the retailer, customer demands, renewable capacity, and bidding by market agents are considered. In [32], market players could participate through an MAS-based hierarchical structure. The electricity retail market can be extended to include all energy carriers in one integrated market. An improvement was made in [34] to evaluate and study an integrated energy market in different layers. Here, the retailer is assumed to participate in the electricity market, while in the context of multi-carrier energy systems, retailers must be modelled as market participants who can trade different types of energy carriers, for example, electricity, natural gas, and heat. To model retailers in the integrated energy market, the ER is introduced in [35] as an upgraded version of the electricity retailer in the context of the integrated energy system.
Many methods have been proposed in the literature to solve the bi-level problems and compute the near-Nash equilibrium numerically, such as linear programming-based methods, bimatrix, and game trees [36]. Mohammad et al. in [37] utilised the Lagrangian relaxation with Karush-Kuhn-Tucker optimality conditions and the duality theory of linear programming SHEIKHI ET AL.
to formulate and solve the market model as a bi-level optimisation problem. The bi-level optimisation is transformed into a single-level problem in [38]. Then, the lower-level problem is replaced by its first-order necessary optimality conditions, which are linear and convex. The resulting single-level problem is mathematical with equilibrium constraints. Rashidizadeh et al. in [39] transferred the mixed-integer nonlinear programming (MINLP) of a bi-level problem into an equivalent single-level mixed-integer linear programming problem and solved it using branch-and-cut solvers.

| Contributions
This study is an extension of work originally presented at the International Conference on Power and Energy Systems 2019 (ICPES 2019) [40]. This paper's title, abstract, introduction, results, and discussion, as well as most of the figures, have been revised since that presentation. In addition, a new market model and solution method of the bi-level game have been added to this manuscript.
A smart energy hub framework is adopted in this work to analyse the interactions among consumers, ERs, and wholesalers to find an equilibrium of purchasing/selling different energy carriers. Different structures of the integrated market, by considering different pathways of energy carrier flow, have been simulated through five scenarios. In each scenario, a bi-level game is modelled among ERs and users. To achieve a more sustainable energy system, the emission penalty is considered in the objective function. Four scenarios are compared based on different financial and sustainability indicators, including ER profit, user energy bills, and sustainability indices.
The major contributions of this paper are as follows: � A different bi-level game model between two levels of the energy market has been introduced in which ERs and users are SE hubs. � The strategic behaviours of ERs and users have been analysed through the bi-level game model in the integrated energy market under five presented scenarios. � Emission has been considered as a penalty factor in the objective function of ERs to enhance the sustainability of the energy system. � A discretisation method based on Nash theory is utilised to solve the bi-level game. The proposed approach is very straightforward with a high convergence rate.

| Paper organisation
The remainder of the paper is structured as follows. The bilevel game general framework is formulated in Section 2. In Section 3, the integrated market is modelled by a bi-level game between ERs and users. Section 4 describes the simulation results of the introduced model. In Section 5, the solution method is described. Finally, concluding remarks are given in Section 6.

| BI-LEVEL GAME FRAMEWORK
There are tied interactions between different participants in the integrated market. Interrelationships between wholesalers, retailers, and consumers significantly influence the prices and demands of all energy carriers. One of the best tools to investigate such systems having complicated interrelations and conflicting interests is game theory [41], which is an analytical framework with a set of mathematical tools enabling the study of complex interactions among independent rational players [42,43]. By assuming the wholesaler as a passive participant that offers predetermined prices for both electricity and natural gas, the integrated market is modelled as a bi-level game between ERs and consumers. The bi-level game model has been successfully applied in different areas, including engineering and economics. There are two types of constraints and objective functions in this framework. In the proposed model, ERs and users submit their pricing and demand data to cloud storage [44], and data is analysed and desired outputs are also calculated. We can presume a leader-follower relationship between ERs and consumers in this game. Consumer decisions depend on the strategies selected by ERs. The bi-level game can generally be formulated as follows: s: t: where x ∈ R n and y ∈ R m denote the vector of decision variables for the upper-level and lower-level problem, respectively.
Functions F and f are the objective functions of the leader and follower, which are replaced by the ER profits and the user payments, respectively. Functions G i (x.y) and H i (x.y) are the inequality and equality constraints of the upper-level problem, respectively. Inequality and equality constraints for the lowerlevel problem are denoted by g i (x.y) and h i (x.y), respectively. Detailed formulation of the bi-level game for each scenario is discussed in the next section.

| INTEGRATED MARKET MODELLING
The five market model scenarios for evaluating the proposed integrated market model are addressed here. The main specifications of the scenarios are summarised in Table 1. In all five scenarios, ERs are the energy suppliers of users. The main difference among the scenarios is the way in which natural gas is supplied. In the first two scenarios, users must buy all required energy carriers solely from ERs, but we assume in scenarios 3 and 4 that users have two options to satisfy their natural gas demands, ERs and wholesalers. Deploying the CHP system at the consumption level in scenarios 1 and 3 is a salient feature where users are capable of producing electricity and heating via their own CHP units. In scenarios 2 and 4, users are equipped with a single boiler to produce heating for their use, and they must buy electricity and the energy to meet their excess heat demands from ERs.
Detailed descriptions of the scenarios are brought forth in the following subsections. For each scenario, ERs and users are modelled independently.

| Scenario 1
The configuration of scenarios 1 and 2 is depicted in Figure 1. As mentioned previously, in these scenarios, ERs are the only suppliers of all energy carriers to users.
There are communication links between different levels of the market, as illustrated in Figure 1, that enable market participants to exchange data through the cloud. Herein, we describe the two levels of the game in two distinct subsections for the sake of simplicity. First, the upper-level game, in which ERs offer selling prices for different energy carriers to maximise their profit, is explained. Afterwards, the lower-level game, in which consumers react to the prices offered by ERs by dynamically shifting their source of energy from ERs to self-generating units and vice versa, is thoroughly investigated.

| ERs modelling
To model the upper-level game, ER decision vectors are introduced. Equation (2) describes the vector of decision variables for ER k at time t, which is comprised of four decision variables.
where π e (k, t), π h (k, t), and π h (k, t) are the offered electricity, heat, and natural gas prices, respectively, of the retailer. In addition, α ER is the dispatch factor of the ER. Each ER should decide the offering price for each energy carrier including electricity, heat, and natural gas. Moreover, another decision variable called the dispatch parameter is defined for each ER each time. The dispatch parameter explains the percentage of purchased natural gas that enters CHP units to produce electricity and heat. The objective of the ER is defined as the profit it makes while trading different energy carriers between the wholesale market and users: where P s e ðn; k; tÞ, P s h ðn; k; tÞ, and P s g ðn; k; tÞ are, respectively, the electricity, heat, and natural gas sold by the ER. In addition, P b e ðk; tÞ and P b h ðk; tÞ are the electricity and heat purchased from the wholesale market by the ER, respectively, and it is assumed that c e and c g are the electricity and natural gas wholesale prices. Assuming one hour for each time interval enables us to neglect price uncertainty in the wholesale market. Therefore, wholesale prices for electricity and natural gas are assumed to be fixed at each time interval.
Constraints for the upper-level problem are defined by the following equations: Users must buy natural gas from ERs.

3
Users are assumed to be SE hubs and are equipped with CHP units.
Users buy natural gas directly from the wholesale market. 4 Users are not SE hubs. Only an auxiliary boiler is deployed for each user to supply local heat demand.
Users buy natural gas directly from the wholesale market.

5
Users are not SE hubs.
Users cannot use natural gas.
Abbreviations: CHP, combined heat and power; ER, energy retailer; SE, smart energy.
F I G U R E 1 Integrated market configuration in scenario 1. ER, energy retailer SHEIKHI ET AL. -287 where MC CHP ER and MC B ER are the capacities of the ER's CHP and auxiliary boiler, respectively.

| User modelling
In scenario 1, users are assumed to be SE hubs. Hence, they have the capability of generating electricity and heat for their local usage. According to the capacities of their CHPs and boilers, they might have to buy some of their energy from ERs. The following vector defines the decision variables of users: where α U is the dispatch factor of users. The aim of users is to minimise their energy bills by managing their generating capacities in combination with the amounts of energy they purchase from ERs. The objective function of each user is defined as the payment for all energy carriers, which is stated in (7). As the importance of emissions in achieving a sustainable energy system cannot be ignored, a penalty is considered in the objective function for emissions into the environment: and MC B U are the capacities of consumer and retailer CHPs; η T U , η ce U , η ch U , and η B U are the transformer, CHP electrical, CHP thermal, and auxiliary boiler efficiency, respectively, of the consumer. In addition, D e (n, t), D h (n, t) are the electrical and heat demands of the consumer. The bi-level game in this scenario can be defined using objectives and constraints defined by (2)-(12).

| Scenario 2
The configuration of this scenario is the same as that of Figure 1 except that users are not equipped with CHP; that is, they are not modelled as SE hubs. Based on this assumption, the ER modelling is the same as in scenario 1. As each user is equipped with only a boiler, it is reasonable to buy natural gas from the ER. Thus, there is no CHP unit on the user's side, and the vector of decision variables for the user is updated as follows: DV user n; t ð Þ ¼ P s e n; k; t ð Þ; P s h n; k; t ð Þ; P s g n; k; t ð Þ n o ð13Þ so the objective function of the user is similar to that of (7). The emission part of the objective function, however, is modified according to the scenario's special properties as follows: Similarly, user constraints should be updated in this scenario. All the equations in scenario 2 are similar to those in scenario 1 except (9) , which should be omitted because the CHP is not deployed here. Equations (10)- (12)

| Scenario 3
In this scenario, users can buy natural gas directly from the wholesale market. This means that ERs no longer trade natural gas between wholesalers and users. In other words, ERs are forced to sell purchased natural gas in other forms of energy such as heat or electricity, and selling natural gas to users is not allowed for ERs under this scenario. The structure of the integrated market in this scenario is illustrated in Figure 2.

| Energy retailer modelling
Each ER sells electricity and heat in this scenario and is not allowed to sell natural gas to users. The price of natural gas is determined by the wholesale market. Thus, the vector of decision variables for each ER changes to the following format: Based on the assumptions previously described, ERs can generate profits by trading electricity and heat. Hence, the objective function of each RE is modified in this scenario as follows: Obj ER k; t ð Þ ¼ π e k; t ð ÞP s e n; k; t ð Þ þ π h k; t ð ÞP s h n; k; t ð Þ − c e ðtÞP b e k; t ð Þ − c g ðtÞP b g ðk; tÞ ð19Þ The constraints of the upper-level problem are not changed and are similar to those of (4) and (5).

| User modelling
In this scenario, each user decides on the amount of electricity and heat to purchase from each ER and the amount of natural gas purchased from the wholesale market. Thus, the vector of user decision variables is modified as follows: DV user n; t ð Þ ¼ P s e n; k; t ð Þ; P s h n; k; t ð Þ; P wh g n; t ð Þ; α U n; t ð Þ n o where P wh g ðk; tÞ is the natural gas bought by consumers in the wholesale market. Based on the determined decision vector (20), the user's objective function is reformulated in (21): where EP(n) will be formulated as follows: bi-level game has been reformulated according to the scenario's assumptions. The formulation of ER problems is the same as that of scenario 3. Thus, we only need to reformulate the user's side for this scenario. Based on the assumptions in Table 1, each user is equipped with a single boiler, so there is no dispatch parameter in any user model. The vector of decision variables for each user is as follows: DV user n; t ð Þ ¼ P s e n; k; t ð Þ; P s h n; k; t ð Þ; P wh g n; t ð Þ n o ð27Þ According to the above vector, the objective function for users will be the same as (23) Considering the updated formulations for the user side, the lower-level constraints should be replaced by the following equations:

| Scenario 5
The configuration of the integrated market in this scenario is the same as that of scenario 4, except that users are not equipped with a boiler. Hence, there is no need to buy natural gas from the wholesale market or ERs. Figure 3 illustrates the configuration of this scenario. Based on this scenario, consumers must buy all required electricity and heat from ERs. The model of each ER is the same as for scenario 3 and 4 and is needed to reformulate the vector of decision variables for users. The vector of decision variables for each user is updated as follows: Based on the updated decision vector (32), the objective function of each user is defined as user payments solely for heat and electricity. Each user's objective function is reformulated in (33): The emission penalty for each user is updated as follows: Similarly, in this scenario, user constraints are modified in (35) and (36). These two constraints are similar to those of scenario 4 except (36) due to the elimination of the boiler in this scenario.

| SOLUTION METHOD
We utilise the noncooperative game model to analyse interactions between ERs and users in the energy market. In some complex games, there is no way to determine the exact Nash equilibrium. Hence, to overcome Nash equilibrium challenges such as non-convergence, the MINLP method is utilised to find a near-Nash equilibrium as an approximation of the exact Nash point. In this method, each player can select a strategy from the strategy domain. Users have the option of F I G U R E 3 Integrated market configuration in scenario 5. ER, energy retailer choosing their ERs. This strategy increases competition between retailers, which could reduce the average energy bills of users. There are some constraints for strategy and selling prices based on the market rules.
Considering the above-mentioned concerns, the scheme of the proposed discretisation algorithm is shown in Figure 4. In this algorithm, DSL and DSU are the lower and upper-level problem steps, respectively. In addition, S R are ERs, and S L are user strategy sets. It involves the following steps: A non-negative real value for λ is set. Here, it is assumed that the initial value of λ is 0.1. The discretisation step for the lower level is defined by DSL.
Create S R based on DSL. It should be noted that the interval between the highest and least value of each decision variable is discretised based on DSL. Calculate the near-Nash equilibrium point of the lowerlevel problem for each ER. If there are no equilibrium points for the lower-level problem, DSL is doubled to consider more discrete strategies. It should be noted that each time step (t) is an independent game and could be solved separately. If no equilibrium point is found after a predetermined simulation time (t max ), λ is increased to overcome this nonconvergence condition. In addition, DSL is set as the first DSL after t max . The maximum number of games (t max ) can be selected based on the maximum number of user variables. Create S L based on DSU.
The upper-level game is investigated if a near-Nash equilibrium point is found. If there are no equilibrium points for the upper-level problem, DSU is doubled. If no equilibrium point is found after a predetermined simulation time (t max ), λ is increased to overcome this non-convergence condition. If there is more than one equilibrium point, the unique near-Nash is selected as the one that maximises social welfare.

| SIMULATION AND RESULTS
To evaluate the integrated market in the introduced scenarios, a case study with 2 ERs and 10 users has been investigated. The bi-level game has been modelled for all scenarios in the presented case study in 24 h. The discretisation method has been utilised to find the equilibrium point [45]. The heat demand curves of all users for a typical day are depicted in Figure 5. The red line illustrates the average of user heat demands. Similarly, Figure 6 depicts hourly electricity demand and average demand among users.
The operational data for the CHP units of ERs is illustrated in Table 2. In addition, Table 3 provides operational data for the CHP units presented in this case study. As illustrated, the capacities of the boilers and CHPs for retailers are larger than those for users. Hence, retailers can purchase natural gas from the wholesale market directly at the lowest total cost.
There are multiple parameters to study the performance of each scenario, among which the most important is the objective function. The ER's daily profit is presented in Figure 7 for all scenarios. It is clearly shown that the first and last scenarios are much more profitable for both ERs. Therefore, in the view of the ER, the best structures of the integrated market are scenarios 1 and 5. In addition, the daily profits of retailers 1 and 2 in case 4 are about 271% and 77% more than for case 3, respectively. Moreover, this increment is about 1070% and 134% for retailers 1 and 2 in case 5. The probable reason for this significant increment is the higher capacity of retailer 1.
From the user's point of view, the energy bill for user 5, which is defined as the total payment of all demanded energy carriers, is studied for all scenarios in Figure 8. The results show the obviously better performance of scenario 3 compared with the other four scenarios. To better understand the behaviour of users, we can compare two scenarios having the same market structure. For example, the energy bill in scenario 1 is less than that of scenario 2, and similarly, the energy bill in scenario 3 is less than in scenarios 4 and 5. The energy bill of user 5 in cases 1, 2, 4, and 5 is about 19%, 33%, 42%, and 50% more than in case 3, respectively. Through the simulation analysis, it is demonstrated that CHP units enable users to be active in demand-side management and effectively reduce costs by changing their sources of energy without load shifting.
The difference between scenarios 1 and 3 is the way that natural gas is supplied to users. To evaluate the performance of user CHP units in these two scenarios, user 5 is adopted as a sample of all users. Figures 9 and 10 are a comparison between the working level of the CHP unit for user 5 in scenarios 1 and 3 with the same load for 24 h.
In Figures 9 and 10, the blue and yellow areas are the amounts of electricity bought directly from ERs and generated by the CHP, respectively. One can see that the CHP unit is more active in scenario 1 than in scenario 3. Hence, it can be verified that the first scenario has better performance in efficiently utilising its capacities than the other scenarios do.
The same investigation has been conducted on the heat demand of user 5 for scenarios 1 and 3. The results are illustrated in Figures 11 and 12. In scenario 1, the CHP unit helps reduce the amount of heat purchased from the ER, especially during peak hours. Moreover, the boiler does not have an important role in supplying heat demand in this scenario. Conversely, in scenario 2, the CHP unit is not considered in the consumption level, and the user is forced to use the boiler to generate heat in addition to buying from the ER.
An important parameter in the sustainability evaluation is carbon emission, which is considered a part of the objective  Figure 13. The emission penalty factor data is shown in Table 4. It should be noted that emission penalty factors include the emission from producing the energy carriers in the three levels of the market. It is shown that CHP units have a considerable effect in reducing carbon emission in scenarios 1 and 3. In these two scenarios, users prefer to use their own CHP units to supply their loads. Therefore, the emission penalty they must pay is much less than in the case where they must buy electricity and heat from the ER.

| CONCLUSION
Different structures for an electricity and gas integrated market were studied as a bi-level game, in which ERs are the leaders, and users are the followers. To achieve a more sustainable energy system, an emission penalty factor has been considered in the user objective functions. Different parameters such as ER profits, user energy bills, and CO 2 emission have been compared in five scenarios. The game finds a near-Nash equilibrium point where players have no incentive to deviate from their equilibrium. Through the simulation analysis, it is demonstrated that the proposed energy system can increase ER profits and reduce user payments. It can be concluded that the scenarios with CHP units on the user side have better performance. The capability of users to supply their own demands makes them less dependent on other suppliers such as ERs or the wholesale market. Additionally, the important role of ERs in the proposed integrated market cannot be ignored. As each ER is capable of trading all energy carriers among the wholesale market and users, users have an incentive to use their own generation capacities. Meanwhile, the competition among ERs to attract more customers can be profitable for them. This provides an incentive for ERs to participate in the integrated market. Future research work will focus on considering uncertainties in consumer demand and wholesale prices. Such future work may also focus on using a more complicated EH structure by considering wind energy, battery storage etc. Electricity wholesale price c g Natural gas wholesale price EPF e Emission penalty factor for electricity EPF g Emission penalty factor for natural gas EPF h Emission penalty factor for heat EPF B Emission penalty factor for boiler production EPF CHP Emission penalty factor for CHP production DSU Discretisation step for upper level DSL Discretisation step for lower level S R Strategy sets for energy retailers S u Strategy sets for users VARIABLES D e (n, t) Electrical demand of consumer n at time t D h (n, t) Heat demand of consumer n at time t π e (k, t) Offered electricity price of retailer k at time t π h (k, t) Offered heat price of retailer k at time t π g (k, t) Offered natural gas price of retailer k at time t P s e ðn; k; tÞ Electricity sold by retailer k to consumer n P s h ðn; k; tÞ Heat sold by retailer k to consumer n P s g ðn; k; tÞ Natural gas sold by retailer k to consumer n P wh g ðk; tÞ Natural gas bought by consumer n from wholesale market P b e ðk; tÞ Electricity purchased from wholesale market by energy retailer k at time t P b g ðk; tÞ Natural gas purchased from wholesale market by energy retailer k at time t ORCID Alireza Ashourizadeh https://orcid.org/0000-0003-0509-8548