Optimising block bids of district heating operators to the day-ahead electricity market using stochastic programming

The wide spread of district heating in Denmark offers a massive potential for ﬂ exibility in an energy system with intermittent renewable energy production. To leverage this potential, a cost-ef ﬁ cient power market integration of combined heat and power (CHP) units in district heating systems is important. We propose a stochastic program optimising block bids to the day-ahead market for CHP units in district heating systems under uncertain power prices. Block bids allow the internalisation of start-up costs. Based on the stochastic program, we develop a solution approach based on sample average approximation (SAA) to solve the stochastic program for a large number of price scenarios. We present results for a case study from Middelfart, Denmark. The system consists of two sub-networks that have lately been connected. We analyse the block bidding behaviour with and without connection using real data from different seasons. The results show that the bidding varies signi ﬁ cantly depending on seasons and the layout of the network. Furthermore, the results show that the solution approach based on SAA reduces computation time signi ﬁ cantly while maintaining solution quality.


Introduction
The use and expansion of district heating is an important component of the strategy towards a sustainable energy system [1].District heating systems provide flexibility to an integrated energy system facilitating the integration of intermittent renewable energy sources [2].District heating systems can react to imbalances in the power grid by producing and storing heat in times of excess power (through heat pumps and electrical boilers) or additional power demand (through combined heat and power (CHP) plants).Thus, district heating provides flexibility to the electricity system by acting on power markets.Such sector integration is considered critical to achieve smart energy systems [3], which includes the coupling of the heat and power sector.Furthermore, it can be beneficial for the district heating provider to take part in the markets to reduce heat production costs.To utilize these synergy effects, the district heating operators must submit supply bids to the electricity market.
In Denmark, more than 60% of heat consumers are supplied by district heating [4].The heat in district heating systems is produced by different types of units.In 2014, large-scale and small-scale CHP units delivered more than 68% of the heat production while the remaining heat was produced by heat-only production units (boilers and heat pumps) or industrial surplus heat [4].In recent years, the production from CHP units is declining due to lower electricity market prices [4,5].Therefore, it is important for district heating providers to have an efficient bidding strategy to make use of the present CHP units to lower heat production cost.In the case of Danish district heating, improved power market bidding also benefits end-consumers, as district heating providers are required by law to pass cost savings to consumers [4].
In this work, we are focusing on optimising the bidding process for the day-ahead market of, but not limited to, Nordpool. 1 The submission of bids to the day-ahead market Elspot in Nordpool takes place at noon the day before delivery.A bid contains information about the hour the bid is valid for, the quantity offered and the price per MWh.Apart from hourly bids containing this information, the market operator offers different types of bids that can be submitted.One important type are block bids.For a block bid, several consecutive hours are grouped together with the same amount and price [6].The market operator can either except the bid for all hours in the block jointly or none of the hours.This type of bid is attractive for CHP units, since it avoids cases of intermittent production that can occur in case of hourly bids.For example, the district heating provider could win hourly bids for the hours 13:00e14:00 and 15:00e16:00, but not the offered bid at 14:00e15:00.As the operator needs to shut down the CHP in between, this results in lower efficiency and higher costs.Block bids can avoid such losses by allowing power producers to internalise start-up costs [7].In this work, we propose a method that optimises block bids for district heating providers on the day-ahead market.

Related work
Our method is based on the optimal production planning for district heating comprising all production units available to the operator, not only CHP units.There are several publications with focus on production planning.For example Refs.[8e10], consider different heat production units in combination with CHP units.However, those publications do not propose a bidding strategy for electricity markets.
There are several publications that provide bidding methods for power production units (CHP or thermal power units) without considering other heat production units, see e.g.Refs. [11e15].Those methods could in general be applied to district heating systems, but they would disregard the fact that heat could be produced from heat-only units, if those produce at lower costs.Considering this joint production planning is important to ensure profitability of the bids as it has been shown in Ref. [16] for hourly bids.
Bidding methods considering district heating systems with several productions units focused on hourly bids so far.In Ref. [17], the authors propose a bidding strategy for CHP units that takes into account other heat units to define heat production costs.The authors use a piece-wise linear function to activate different volumes of power at different prices according to the price forecast.In Ref. [16], the authors present a bidding method based on a mixedinteger program that creates hourly bids for CHP units by iteratively replacing heat-only production.In Ref. [18], the authors extend the bidding method for virtual power plants of [15] to a district heating setting with uncertain renewable energy production and prices.However, these papers do not consider block bids.
Block bids, here only considering regular sale block orders, allow producers with significant start-up costs to recover these costs by avoiding non-beneficial start-ups and shut-downs [7].A general discussion of the economic benefits of block bids is made in Ref. [19].
To the best of our knowledge, existing optimisation methods for block bidding focus on areas other than district heating.The authors of [20] compute optimal block and hourly bids for a pricetaking hydro-power producer under uncertain electricity prices.Enumerating all possible placements of blocks within a 24-h time frame, optimal bidding volumes are found for each block and bidding price.Other methods in the area of hydro power follow similar lines of thought.In Ref. [21], a stochastic program is proposed to determine optimal block and hourly bids for a Norwegian hydro power producer for day-ahead and intraday trading using a model similar to the one proposed in Ref. [20].Block bidding strategies for an aggregator of prosumers in Norway under uncertainty are computed in Ref. [22] with prosumer flexibility being the main point of interest.Other work focuses on demand-side block bidding [23].

Contribution
While there exist optimisation models that tackle the problem of block bidding in other areas, the case of CHP production in district heating is a particular one since the objective of a district heating provider is cost minimisation [18].Reasonable bidding prices can therefore be based on the price for switching from heatonly units to CHP units [16], i.e, the electricity price at which the CHP units get cheaper than the heat-only units.
We propose a novel block bidding method for district heating providers that operate CHP units in a portfolio with other heat units in the day-ahead market.Since the electricity price is unknown at the time of bidding, our methodology uses stochastic programming for the optimisation to consider the electricity price as uncertain, i.e., we assume no knowledge of future power prices at the time of bidding.Stochastic programming has been shown beneficial in cases of bidding methods under uncertain electricity prices [15].Our stochastic program is embedded in the framework of a sample average approximation (SAA) to account for many scenarios even though the complexity of the stochastic program increases with the number of scenarios [24].
The main contributions of our work are: We propose a novel two-stage stochastic program to find optimal block bids for CHP units in district heating systems under uncertain power prices.We develop a solution approach based on SAA that allows to handle power price uncertainty while being computationally tractable.
We analyse optimal block bidding behaviour for a typical Danish district heating system under different network configurations and varying seasons.We analyse the solution quality and computational performance of the proposed methods under different conditions.
The remainder of the paper is organised as follows.The planning problem is described in Section 2. The solution approach including model formulation and SAA are described in Section 3. Section 4 describes our case study and the numerical results are presented in Section 5. Section 6 summarizes our work and gives an outlook on future work.

Problem description
The planning problem addressed is the optimisation of dayahead block bids for CHP units in district heating systems.Since the market is defined on an hourly time-scale, we use the set of hours T as planning horizon.The set T covers the hours we want to consider for bidding (here 24 h), but the model is solved for the planning horizon of T ; T 3T , that can be longer to model storage behaviour and unit commitment constraints in more periods.We consider a set of production units U consisting of CHP units U CHP and heat-only units U H .The hourly heat production of all units is limited by a minimum and maximum capacity denoted by Q u and Q u , respectively.There are restrictions on the minimum up-and down-time of each unit D Up=Down u (given in hours).CHP units also have minimum and maximum power production, P u and P u , and a constant heat-to-power ratio 4 u that connects the heat and power production.
The system also features heat storages S with storage levels limited by minimum S s and maximum S s levels and hourly losses denoted by g s .The hourly heat demand D d;t is given for the set of demand sites D .The network is represented using a set of nodes N to model the connections between units, storages and demand sites.The heat flow between the components is routed through this node that allows setting a maximum between units and nodes A U u;n , storages and nodes A S s;n (bi-directional) and nodes and demand sites A N n;d .For non-existent connections the upper limit is 0.
For the CHP units, we want to select the block bids to submit to the power market.Based on the market definition for block bids, we generate the set of all feasible block bids B , see Section 3.1.A block bid is defined by the hourly power quantity qb , the bidding price pb and the start and end periods tstart b and tend b .Some of these block bids are conflicting, meaning they contain the same unit for the same hour.All bids conflicting to a specific bid b are given in K b .Since the electricity price is still uncertain at the time of optimisation, the value of a block bid ṽb;u is given per scenario u2 U, which has a certain probability p u .The bid value reflects the bid's success in the price scenario u.We define the binary parameter g b;t;u being 1, if the bid is successful in scenario u and active in hour t and 0, otherwise.

Generation of possible block bids
The set of all possible block bids B is generated a priori, i.e, for all possible bids we have to determine the start and end periods, tstart b and tend b , the production quantity qb per hour and the bidding price pb .The overall process is stated in Algorithm (1) and the nomenclature is given Table 1.First, we determine the set of biddings prices by computing unit-switching prices and break-even prices (lines 3 and 5).The unit-switching prices p switch u;v are calculated between pairs of CHP units u and heat-only units v and are defined in equation ( 1).The unit-switching price is the price we need to receive from the market to be indifferent about whether we produce with heat-only unit v or CHP unit u.Therefore, it is based on the difference in production costs multiplied by the heat-topower ratio to account for power and not heat.
The break-even price p breakÀeven u of a CHP unit u is defined as the price from which on power production from the CHP unit generates revenues (2).
The set of all unit-switching prices and break-even prices for CHP unit u forms the set of base prices P Base distributed evenly over the bidding period (line 13).The bidding quantity is fixed to be the maximum power output of the CHP unit (line 14).

Algorithm 1. Generation of possible bids
The value of a bid v b;u in an electricity price scenario u is computed as its revenues (3) based on its success in that particular scenario.The bid is successful, if the bidding price pb is less than the market price averaged over the length of the block bid.The value is the market price times the quantity and hours of the block bid.Otherwise, the bid is unsuccessful and the value is zero.Accordingly, the binary parameter g b;t;u is defined as 1 if the same condition holds and period t is covered by the block bid b (4).
Two exemplary block-bidding schedules for two CHP units are shown in Fig. 1, where CHP 1 is less expensive than CHP 2. In Fig. 1a, we submit two block bids for CHP 1 with length of five and eight hours, respectively.For CHP 2 we submit a short block in the morning.We can assume bidding quantities to be given a-priori as maximum power outputs of the two units.Note that the bidding price of the afternoon bid for CHP 1 is lower than in the morning due to the fact that start-up costs are distributed over a longer block.
This block of eight hours could also be separated into two shorter blocks of four hours (see Fig. 1b).Here, a trade-off between two market risks has to be made: A single long block has the advantage of a lower bidding price, since start-up costs must be recovered only once for the entire block, and a low price increases the chances of success of the bid.On the other hand, several short blocks come along with a higher bidding price, since it must be ensured that start-up costs are recovered also if only a single block is successful, but short blocks might increase resilience to price spikes.

Mathematical formulation
We formulate the planning problem as a two-stage stochastic problem since the electricity prices are uncertain at the time the block bids have to be submitted to the day-ahead market.The nomenclature is given in Table 1.
The decisions b b regarding which block bids to place are the socalled first stage decisions since they have to be taken before the deadline at noon the day before delivery.The actual production of the CHP units and the other heat-only units are second-stage decisions, which can be made according to the outcome of the market clearing.With this setup we ensure that bidding decisions are taken when the electricity price is still uncertain.We want to determine the optimal set of block bids for the included set of possible price scenarios.
The objective function (5) minimises heat production costs across all scenarios.Power market profits are considered a means of cost reduction.Costs include the variable production and start-up costs.The profits are gained by revenues from power sales on the day-ahead market depending on the success of bids.
Constraints ( 6) to ( 8) model the production of the units including the status of the unit (on/off).If a unit u is online, the heat production must be in the production limits (6).The status of a unit (x u;t;u ) is set in constraints ( 7) and ( 8) depending on when a unit is started up (y u;t;u ) and shut down (z u;t;u ).
y u;t;u À z u;t;u ¼ x u;t;u À x u;tÀ1;u ct2T \f1g; u2U ; u2U (7) Compliance with minimum up-time requirements D Up is ensured by giving an upper bound to the number of start-ups possible in the time window ½t þ1 ÀD Up ; t (9).Minimum downtimes are modelled analogously (10).
X t t¼tþ1ÀD Up y u;t;u x u;t;u ct ¼ D Up ; …; jT j; u2U ; u2U X t t¼tþ1ÀD Down z u;t;u x u;t;u ct ¼ D Up ; …; jT j; u2U ; u2U (10) The formulation of the district heating network is flow-based.The demand D d;t at demand site d needs to be covered by the incoming heat flow a D n;d;t;u from nodes n2N (11).The production of the units is flowing to the nodes (12).Heat demand is considered a known parameter, since it can be predicted relatively accurately.

X
The influence of the blocks is modelled in constraints ( 17) to (18).Bids that conflict each other are prohibited (17).Additionally, obligations from successful bids need to be fulfilled, indicated by the binary parameter g b;t;u (18).

Sample average approximation
The stochastic program presented in Section 3.2 needs a set of electricity price scenarios U to calculate the values of the bids ṽb;u .
Since the complexity of the model drastically increases with the number of scenarios, this number has to be limited.However, a limited number of scenarios may not cover the uncertainty of the prices appropriately.To address this issue, we use the stochastic program (5) to (18) in a SAA method based on a Monte Carlo approach.The overall solution approach is described in the following and is based on the description in Ref. [24].
A solution for the bidding problem is generated in two steps (see Algorithm 2).First, N candidate solutions are generated.Each of the candidates n is determined by solving the stochastic program using a randomly drawn sample of v equiprobable scenarios from the available set of scenarios U * (line 1).These scenarios are drawn without replacement, meaning that after S n is drawn, the set to be drawn from for preceding draws is reduced by S n .This ensures higher variability across the sampled scenarios than when sampling with replacement.Second, each of the candidate solutions, more specifically the first-stage decisions X* n containing the bidding decisions (line 4), is then re-evaluated based on a larger sample (in our case the scenarios remaining in the finite scenario set U * nfS 1 ∪ S 2 ∪…∪S N g (line 5).The best-performing solution is selected (line 6 and 8) as solution to the planning problem.Since the first-stage decisions are fixed in the second step, the complexity of the problem reduces significantly because the problem can be decomposed by scenario.

Case study
In this section, we describe the district heating system of Middelfart, Denmark, and provide technical data of the components.Afterwards, the handling of time series data of power prices for solution evaluation and sampling in the numerical experiments is presented.

The middelfart district heating system
The proposed method is tested for the case of the district heating system of Middelfart, Fynen, Denmark.The network consists of two sub-systems in the towns of Nørre Åby and Ejby.Both networks have a boiler and CHP unit fired by natural gas (NG).The Nørre Åby DH system further includes two biomass boilers running on wood chips (WC) and wood pellets (WP), respectively.The CHP units and biomass boilers are connected to heat storages.The technical data was provided by the system operator with the exception of start-up costs for the CHP units for which no data was available.These values have been calculated based on per-MWh start-up costs as used in Ref. [25].For an overview of the input data see Tables 2 and 3. We consider all production cost parameters, including fuel costs, constant for the entire testing and planning horizon.The two systems are connected by a 5 MW interconnection pipe that started operation in 2020.Since the model formulation in Section 3.2 does not allow to directly connect the two demand sites, an artificial storage with a capacity of zero is added.It is connected to one node that bundles incoming connections from all generation units and to another node which connects to the two demand sites.An overview of the system is given in Fig. 2.
We use 168 h as a time horizon for the dispatch in order to account for storage behaviour (section 3.2).This value has been shown to be adequate to represent medium-term storage behaviour in district heating [16].However, only bids for the first 24 h are optimised due to the day-ahead market setting.The minimum length of a single block is 3 h, whilst it may not exceed 9 h.

Solution evaluation and sampling
In the numerical results in Section 5, the methods are tested for the first weeks of April, July and December 2019, respectively.Heat demand in those three weeks is assumed to be known.Hence, solutions are generated for the heat demand of 21 different days.
In the solution approach, the power prices for the next 24 h are considered uncertain and scenario data is needed.We generate scenarios as input to the model using 365 days of historical spot prices from 2018 sliced into 24 h scenarios, i.e., the historical prices are assumed to be future scenarios.In the SAA approach, five solutions for 50 random power price scenarios are generated.Then, all solutions are evaluated based on the remaining 115 spot price scenarios and the best-performing solution is selected.In addition to the SAA approach, we solve the stochastic program using all 365 prices scenarios from 2018 as a benchmark.Historical spot prices are freely accessible at [26].
In order to evaluate the solution on future scenarios that were not considered in the optimisation, we perform an out-of-sample evaluation, i.e., each solution is evaluated on new price samples.In our case, each of the 21 daily solutions is not only evaluated on the day-ahead prices of the respective day, but also on all daily sets  of prices that took place in the respective month.For example, a solution is generated for April 1, 2019 without knowledge of spot prices for that day.Then, the solution is evaluated in an out-ofsample test on the spot prices of each day of April 2019 as a test sample.

Numerical results
The solution approaches are implemented in Python 3.6.2and solved using Gurobi 9.0.0 with gurobipy and standard settings.Computations are made on the DTU High-Performance Cluster using 4 Intel Xeon 2660v3 processors with 2.6 GHz and 60 GB RAM.
We refer to the stochastic program using 365 scenarios as SP and to the stochastic program solved using SAA as SP-SAA.In Section 5.1, the block bidding behaviour is analysed based on SP.Sections 5.2 and 5.3 address the methodological performance of both methods in terms of quality and runtimes.

Analysis of bidding behaviour
Tables 4 and 5 show different measures with respect to the bidding behaviour.If no interconnection is presented, mainly the CHP located in Ejby is bid into the market at bidding prices of around 190 DKK/MWh (see Table 4).
If the interconnection is added, bidding prices for the NG CHP in Ejby decrease (see Table 5).The reason for this is that the low-cost  biomass units in the Nørre Åby sub-network contribute to supplying heat in Ejby (see Fig. 3), setting the CHP unit in Ejby in competition with the biomass boilers instead of the more expensive NG boiler in Ejby.An exact numerical analysis of the impact of the connection on heating costs in the light of block bidding is not trivial.Since bids are only placed for the first 24 h, only the objective value, i.e., heating costs, of this time interval is of interest.However, storage operation and unit dispatch on the first day is influenced by dispatch decisions for the remaining planning horizon.Therefore, we use the costs of heat in the first 24 h, i.e. production costs divided by production quantity as a metric.This value decreases by 1.10 DKK/MWh (5.96%) in December, 2.84 DKK/MWh (16.62%) in April and 4.93 DKK/MWh (30.58%) in July.A reason for the variation of savings across seasons is the variation in heat demand, as the sub-network in Nørre Åby has more available capacity during summer months that can contribute to heat supply in Ejby.
In general, bidding intensity is higher in winter than in summer with bids also being placed for the CHP in Nørre Åby in December and April.We can also observe that bidding for the CHP in Ejby is more aggressive in the winter, as not only the evening peak in spot prices, but also the morning peak is used for bidding (see Fig. 4).

Out-of-sample performance of SP and SP-SAA
To further assess the performance of the two methods, we perform an out-of-sample test, i.e., we apply the solutions found by the two methods to new and unseen power price scenarios.Each solution has been evaluated on all spot prices of the respective month in the year of 2019, i.e., 21 solutions are evaluated on 30 (31) spot price scenarios both for the case with and without interconnection leading to 1288 experiments.The objective value of the 1288 runs are used in the box plots in Fig. 5.The figure shows that the objective value varies between cases and seasons, but the outof-sample performance of both methods, SP and SP-SAA, is very similar.This tells us that the approximation in SP-SAA is not deteriorating the quality of the solutions significantly.This is also confirmed by the out-of-sample performance metrics in Tables 6 and 7.The SP-SAA solution deviates by no more than 0.1% from the objective value when using SP.The bidding behaviour metrics of SP-SAA are similar to the metrics presented for SP in the previous section (Tables 4 and 5), but the SP-SAA solutions create fewer bids for the CHP unit in Nørre Åby.An explanation is that during the generation of solution candidates in SP-SAA only a limited sample of scenarios is used which reduces the probability of sampling high-price scenarios, which would make high-price bids beneficial.
Another metric that we can investigate in an out-of-sample test is, how often the bids would have been successful in the independent price scenarios.Here, we see that on average, for the case  without connection (Table 6), more than 89% of the hours bid are won across all three seasons.In the case with connection (Table 7), this value drops drastically to 8% during April and July and 19% in December.This is due to higher bidding prices when the connection is presented, since the cheaper biomass boilers increase the bidding prices.
To show the benefit of utilizing the method, we compare the costs to a baseline solution that does not involve power market activity.The savings reach from ca. 2.3% (December) to 4.4% (July) for the case with a connection and from 0.07% (April) to 0.46% (December), if a connection is added (see Tables 4 and 5).Please note that this value compares costs over a 168 h time span, while power market bids are only considered for the first 24 h, hence savings in both metrics are most likely seven times as high.

Computational performance
We analyse the runtime for the case with a connection, as it presumably is the more complex problem.On average, across all seasons and days, the runtime for SP is 3.7 h (13320s) and 0.8 h (2880s) for SP-SAA.This corresponds to a decrease of 77.9%.In Fig. 6, the number of problems solved after a certain runtime is plotted (up to 21 problems), i.e., the method lying in the upper left corner is superior.This more detailed analysis shows the range of runtimes.The longest SP-SAA runtime is 1.24 h (4464s), while SP needs 24.53 h (88308s) in the worst case.Due to this runtime improvement in combination with the high quality of solutions, SP-SAA is clearly the superior method in this case.

Conclusion
In this paper, we present a novel solution approach that optimises block bids for CHP units in district heating systems.We consider a typical setting where a district heating provider has several heat production units and block bids for CHP units are submitted to the day-ahead power market on the day before delivery.As the power prices are still uncertain at the time of bid submission, we use a two-stage stochastic program to optimise block bids.Since the optimisation becomes computationally hard to solve with an increasing number of power price scenarios, we embed the model into an SAA framework.The method selects block bids from the set of potential block bids that is defined based on the production of all units in the system.We can use the fact that the CHP production can replace production from other heat-only units and, thus, base our bidding prices and amounts on the production by all units.
Both methods, the model with and without SAA, are applied to real data from the Danish district heating system in Middelfart.Our case study shows that the methods lead to reasonable bidding behaviour.The CHP unit in the subsystem of Ejby takes up a significantly more prominent role than the unit in Nørre Åby.An interconnection between the two subsystems leads to major cost savings, but also to fewer wins for the block bids of CHP unit in Ejby.The bidding behaviour shows a clear dependence on the season due to variations in demand levels.The proposed solution approach based on SP-SAA significantly reduces runtime at only minor effects on the quality in an out-of-sample evaluation, compared to the benchmark of solving the model a large set of scenarios (SP).
To the best of our knowledge, their exists no prior work on CHP block bidding for district heating providers.Hence, our results are difficult to set in direct relation with related work.The authors of Ref. [16] conclude that their method based on unit-switching prices leads to a more aggressive bidding behaviour compared to other bidding methods.The partly very low in-sample acceptance rates of bids in our case study point to a similar conclusion.Our results suggest that the cost savings of CHP integration compared to a base case without power market participation highly depend on the exact network configuration.This makes a comparison to related work based on other district heating systems difficult.For an analysis of cost savings through CHP units under varying network configurations, we refer the reader to Refs.[8,17].
The proposed methods are of general applicability: The generation of possible bids and the formulated optimisation model can be used for bidding in a wide range of district heating networks to facilitate the integration of the heat and power sector in smart energy systems.The solution approach based on SAA can be expected to yield computational benefits also in these cases.Still, it is important to note that the exact results obtained depend on the specific case study.A major reason is the dependency of bid success on unit-switching prices between CHP and heat-only units in the network.Furthermore, initial heat storage levels might play a significant role.There are several ways for future work related to further developing the proposed methods.First, the methodology should be tested on further district heating networks.Second, the planning problem should include additional types of units such as electricity consumers (heat pumps, electric boilers) and solar heat units.Third, the blocks bids can be combined with other types such as hourly price-dependent bids.A consideration of hourly pricedependent bids for the entire planning horizon, rather than 24 h, could also yield a better representation of the role of heat storages in temporal arbitrage with respect to time-varying power market prices.Fourth, when the network complexity increases, there will be a need for even faster solution approaches such as heuristics.Finally, as the work presented here is of methodological nature, we assume constant production costs, including constant fuel prices, for the entire year.Relaxing this assumption would lead to a more detailed analysis of bidding behaviour.Also, though being out of scope of this paper, a study of the impact of a large-scale adaption of smart power market bidding methods for district heating networks would be of great interest.Such a study could investigate the impact on the power and heat systems on a regional or national level.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

u.
For every base price p Base (line 9), bids of all possible lengths T bid (line 10) and starting periods tstart (line 11) are generated.Here, minimum and maximum lengths can either be set by up-time restrictions or by market rules.The interval of starting times is set such that a bid ends within a set of time steps T. The bidding price of a block bid is computed as the sum of base price and start-up costs of the CHP unit C start u levels are limited by an upper and lower bound(15).These can either be physical constraints or operationally motivated limits such as security of supply and/or flexibility.The change in the storage level is determined in constraints(16).

Table 1
Nomenclature.Binary parameter: 1, if the bid wins in scenario u and is active in hour t, 0, otherwise.
u Heat-to-power ratio for unit u2U CHP [MWh À heat=MWh À el]Ss=SsMaximum/Minimum heat level in storage s [MWh-heat] g s Relative hourly losses of storage s2S [68/h] 0 Heat production of heat unit u2U in period t2T [MWh-heat] a U u;n;t;u 2R þ 0 Heat flow from unit u2U to node n2N in period t2T and scenario u2U [MWh-heat] a S s;n;t;u 2R þ 0 Heat flow from storage s2S to node n2N in period t2T and scenario u2U [MWh-heat] a N n;s;t;u 2R þ 0 Heat flow from node n2N to storage s2S in period t2T and scenario u2U [MWh-heat] a D n;d;t;u 2R þ 0 Heat flow from node n2N to demand site d2D in period t2T and scenario u2U [MWh-heat]

Table 2
Input data for production units.Fuel costs are assumed constant and included in the C H .

Table 3
Input data for heat storages.

Table 4
Metrics for bidding behaviour without connection (SP).

Table 5
Metrics for bidding behaviour with connection (SP).

Table 6
Performance metrics of SP-SAA without connection.

Table 7
Performance metrics of SP-SAA with connection.