The establishment of a micro-scale heat market using a biomass-fired district heating system

Background: Local biomass potential in Southeastern European countries is relatively high. Nevertheless, biomass residues such as wood leftovers, straw and energy crops are often not properly managed or inefficiently utilised for energy purposes in individual house heating or domestic hot water preparation. This is more relevant in rural areas, where the utilisation of biomass resources is mainly based upon traditional technologies, has low efficiency or is carried out by using individual bases without local energy supply management. Usage of biomass residues in combination with other renewable energy sources is in agreement with the targets of the EU’s Energy and Climate Goals and promotes rural development and a circular economy. Methods: For this purpose, local heating and domestic hot water preparation demands, as well as the available biomass potentials, were analysed and mapped by using a geographic information system (GIS). A model for analysing the optimal operation of the district heating boiler with a relatively high share of solar energy, which is backed up by either a shortor long-term heat storage, was developed. The model takes the supply and the return temperatures from the DH network into account and decides whether the excess of solar heat produced by the prosumers can be delivered into the network. This reduces heat overproduction and enables a smooth and uninterrupted operation of the system. Such configuration would benefit both the DH Company and the prosumers. The DH Company would have the opportunity to buy cheaper excess heat from the prosumers rather than to start its own and relatively slow biomass boiler. Results: In this paper, several scenarios are proposed for the Romanian village Ghelinta. The target village is characterised by a small-scale biomass district heating boiler with thermal storage and prosumers with either solar thermal collectors or locally installed heat pumps. Integration of seasonal thermal storage and local prosumers can smooth out the biomass district heating boiler operation and bring additional socio-economic benefits for the bioenergy village communities. This could be the first step towards the establishment of a micro-scale thermal energy market. (Continued on next page) © The Author(s). 2020 Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data. * Correspondence: sebesten_tiha@yahoo.com Faculty of Geography, Department of Geography in Hungarian, Babes-Bolyai University, Cluj-Napoca, Romania Full list of author information is available at the end of the article Energy, Sustainability and Society Sebestyén et al. Energy, Sustainability and Society (2020) 10:25 https://doi.org/10.1186/s13705-020-00257-2


Background
According to the EU statistics, in EU households, heating and hot water alone account for 79% of the total final energy use. In many rural areas, natural gas is one of the most common fossil fuels used [1]. Thus, a decrease of fossil fuel consumption in the heating sector offers the highest potential for achieving a more energy secure region. Although district heating (DH) is a commonly used technology, in South-Eastern Europe, it is relatively old, inefficient and rarely considered in rural areas.
In this perspective, during the last couple of years, an interest in research, development and implementation of renewable energy sources (RES) has been constantly increasing. The main triggers for this are concerns with regard to the security of local energy supply, spreading of new, low-carbon technologies and energy price increases. Another important factor is also the local population's increased awareness of on-going climate change, mainly caused by the use of fossil fuels and inefficient conventional energy systems.
In the following sections, the listed aspects are to be discussed and the importance of the present research will be argued.

Is it technically feasible?
As the utilisation of RES is becoming more accessible on both small and medium scales [1,2], the RES-based district heating systems (DHSs) are interesting technological approaches. The RES-based DHSs can guarantee not only new environmental but also financial benefits for end consumers [3]. In the past, a centralised heating system consisted of a heating plant, a distribution grid and in-building distribution systems. Such systems have utilised fossil fuels of high energy content, such as coal and fuel oil, with significant emission levels of greenhouse gases (GHG).
One of the most important issues is the security of energy supply on a local level. In order to increase the utilisation of RES, studies on the possibilities for use were performed in different sectors and on different scales.
Advanced research to investigate the application of RES for the energy supply of DHS is taking place. It has also been identified in research studies that in rural areas, local RES such as biomass, solar and geothermal energy, could be included in the local heating supply in a harmonic and sustainable way, while in urban areas the heating demand is usually higher than the available local RESs [4]. On the other hand, the utilisation of RES in rural areas can strengthen regional cohesion and mitigate the underdevelopment of rural areas [5]. The technological combination of different systems such as those based on solar energy and biomass is a viable solution for local heating supply [6]. This is especially relevant in the DHS where solar and biomass energy are integrated, sometimes also in combination with geothermal energy.
Energy mixes in DHSs for a more sustainable energy management and affordable thermal energy services were discussed by Lund, and a new generation of DHSs was implemented [2]. New technologies such as the 4th generation of DHSs [2] and the 5th generation of DHSs combined with cooling have been elaborated and are being implemented today [7]. Giuntoli et al. [6] have applied a bottom-up approach that considers virtual power plants (VPPs) as very promising instruments for the establishment of an effective integration of distributed generation (DG) and energy storage devices. The lowcarbon technologies in DHSs are widely analysed in the literature and tested in various DHSs in Denmark, Germany, Sweden, etc. Rämä and Wahlroos [8] have assessed the introduction of heat pumps for a new renewable heat supply in an existing district heating system with a combination of solar collector and biomass-based CHPs. The paper that is based on an EnergyPro modelling tool provides optimum operation conditions of heat pumps, which have been investigated in Helsinki in a case study. Other papers have highlighted that solar heating systems in district heating networks with large CHP plants have been rarely considered in the literature [9]. To increase the feasibility of this approach, hourly based data of heat demand, solar radiation data and efficiency factor of collectors have to be taken into consideration, while the amount of seasonal storage should also be determined. By using a Matlab code, Winterscheid et al. [10] have demonstrated that a sub-network can operate without a back-up boiler, while solar and CHP networks benefit from the interaction. Based on experimental outcomes from Sweden and Germany, solar heat helps to avoid having to start up and shut down wood-chip boilers or operate them at partial load. The combination of solar and biomass technology can even replace back-up fossil fuel systems, which provide district heating networks with energy in summer time [11]. However, examples such as Västra Götaland in Sweden mainly deal with larger biomass systems (4 MW th ) combined by photovoltaic plants (1000 m 2 ) and buffer storage (200 m 3 ) (SDHp2m) [12].

Is it economically feasible on a micro-scale?
Our main research focus, however, centres on how district heating systems should be realised on a micro-scale heat market, when they are based on a mix of different renewable energy sources.
In terms of energy prices, different research studies have been carried out for the optimisation of microgrids on the electricity market. Zachar et al. [12] have explored the stochastic scheduling of power micro-grids, where energy exchange with the micro-grid must be coordinated ahead of time. In particular, a market structure is proposed in which micro-grid operators make upfront energy exchange commitments. The optimisation is used to minimise operational cost and ensure the stability of energy exchange. Using the TRNSYS 17 software, Rodrígez et al. [13,14] have assessed the performance of several designs of hybrid systems composed of solar thermal collectors, photovoltaic panels and natural gas internal combustion engines. The main contributions to this paper are the calculations of primary energy consumption and emissions and the inclusion of a Life Cycle Cost analysis. G [6,15]. applied Model Predictive Control (MPC) logics to minimise the energy costs, to sustain optimal environmental comfort and to optimise the renewable energy source for energy supply of residential buildings. In 2013, Giuntoli et al. [6,16] presented a new algorithm to optimise the upfront thermal and electrical scheduling of a large-scale VPP (LSVPP). The approach includes many small-scale prosumers, energy storage and cogeneration processes. This algorithm also takes into account the actual location of each distributed energy resource in the local public network and their specific capability. On this basis, later on, Wang et al. [16] have elaborated a widely cited modelling and optimisation method for planning and operating the CHP-DH system, where the core focus is the minimisation of overall costs of net acquisition for heat and power in deregulated power markets.
In one of the studies, Jing et al. [17] have investigated the annual dynamic performance of those systems with an hourly time step. Here, the operating strategy is optimised with the aim of minimising the total system cost. In another scientific study by Marugán-Cruz et al. [13], the technical and economic feasibility of the introduction of solar energy received by heliostats of a solar tower during the summer season in a heating and cooling network has been demonstrated. Flynn and Sirén [18] have investigated a solar district heating system combined with thermal storage, which is installed in a small Canadian community. Using the TRNSYS software, the investigation analyses the performance of the DHS while taking into consideration climatic conditions. According to the results, the adoption of the 4thgeneration heating systems combined with isolation leads to a successful heating system, where solar energy covered the local heat energy demand. Likewise, several authors have created a dynamic simulation model with regard to the energy economic assessment of geothermal, solar and biomass energy [19][20][21]. The proposed system has been modelled using the TRNSYS tool. Several applied studies have been executed in Northwestern Europe, such as in Oslo, Norway, where integrated energy systems with heat pumps and longterm thermal storage are a promising solution [20].
In many cases, the profitability of the investment in small-scale biofuel-fired DHS or CHP plants has been analysed. In those cases, the assessment of production, distribution and consumption of heat is realised. The results indicate that the economically feasible scale for biomass-based DHSs remains relatively large when a biomass boiler is among the heat production options, while the feasibility of small-scale CHP plants (under 1 MW) remains doubtful [21]. Other studies underline that the introduction of solar energy to thermal systems needs a solution to surmount the mismatch between solar energy supply and heating demand. Thus, the inclusion of thermal storage in a solar thermal system has great importance for an effective and efficient use of discontinuous solar radiation. Nowadays, there are many technical solutions for storing solar energy. From a geographical and climate point of view, the integration of long-term (seasonal) storage is a solution for northern areas because of the significant time shift between the solar radiation period and the heating demand, on a daily or seasonal basis. Kyriakis and Younger [21,22] have studied the introduction of thermal storage into a geothermal district heating system (GDHS) whose main purpose is related to covering the peak loads in the system. Verda and Colella [22] have modelled a multi-scale thermal storage in order to analyse its operation during the heating season and to predict their effects on primary energy consumption and cash flows within the district heating service. The results show that primary energy consumption can be reduced by 12%, while the total costs can be reduced by up to 5%. Calise et al. [23] have highlighted that in the case of Pantelleria Island, a district heating and cooling system, based on solar and geothermal sources, can cover the heating and cooling demands. In this case, a very precise control strategy has been implemented in order to avoid any heat dissipation, to match the appropriate operating temperature levels in each component, to avoid a too low temperature of geothermal fluid reinjected into the wells and to manage the priority of space heating and cooling processes [24,25].
The energy supply of the solar-assisted residential area "Vallda Heberg, Kungsbacka" constructed between 2011 and 2016 in Sweden is characterised by a 100% renewable heating solution, a solar fraction of at least 40%, passive house standards and a reduction of heat distribution costs [http://solar-district-heating.eu/Portals/0/ CasestudiesSDHplus/SE_D3.2_ValldaHeberg_EN.pdf]. A novel heating system installed in the residential area with a central wood-pellet boiler of 300-kW capacity (+ 500-kW oil back-up boiler) not only covers the head demand but also delivers heat to four substations characterised by a decentralised storage [26]. The substations are connected to a secondary distribution network, where the hot water circulation realises the space heating and domestic hot water demands. In addition, roof integrated flat plate collectors on the larger buildings deliver solar heat used for the pre-heating of domestic hot water in the substations through evacuated solar tube collectors installed at the central boiler house with steeper inclination angles for achieving optimised solar energy yields in winter time. The solar active surfaces represent 570m 2 flat plate collectors (FPC) and 108-m 2 evacuated tube collectors (ETC). These installations are able to provide 37% of the useful thermal energy demand for the 14,000-m 2 heated floor area. These numbers are even more impressive if one considers that no seasonal storage is needed to reach this high solar fraction. The thermal storage volumes are distributed between the 13 substations and represent 75 m 3 [27].
Lindenberger et al. [28] have analysed a DHS based on solar collectors combined with seasonal storage in a small-scale pilot project of the Bavarian Research Foundation from a technical point of view. In that system, integration of condensing boilers, compression and absorption heat pumps as well as CHP have been analysed. This system is used to cover the annual total heat demand of 616 MWh from the nearby housing area [29]. An analysis compares this approach with a reference case using individual natural gas boilers and electricity taken from the public grid. Here, the most favourable scenario has a potential to achieve energy savings of between 15 and 35%. Nowadays, a few hundred solarbiomass district heating plants are in operation, where the lowest capacity has always been higher than 500 kW, and projects financed by the European Commission highlight the will to increase the interest in technical solutions based upon renewables and their adoption in the EU countries [30].
The operation of district power and heat energy supply systems was analysed by using stochastic optimisation in the case of a district of buildings on the campus of the University of Utah, USA [31]. The investigation integrates solar PVs and wind turbines for power generation along with using the existing electrical grid, while a CHP system provides power and thermal energy for heating. Electricity is used to run all of the cooling equipment. To analyse the stochastic power generation from renewable energy resources in the district, the Monte Carlo study has been applied. The optimisation of the energy supply is performed by the use of a particle swarm optimisation (PSO) algorithm based on a day-ahead model. The objective of the optimisation was to minimise the operating costs of the district. In this case, the results of the study have suggested that the proposed district power and heat energy supply might achieve 10% operating cost reductions with regard to the current system. This approach shows certain energy management solutions in different time periods that could be useful for facility managers to evaluate the operating costs of their energy supply [31].

The aim of the present research
Based on a literature review, the aim of the present research is to analyse the feasibility and socio-technical aspects of a micro-scale DHS, to optimise not only the operation of combined thermal energy services among the energy producers, prosumers and consumers, but also the storage and the costs for thermal energy supply services on a local level for the concept of a bioenergy village.
In this paper, the authors have analysed the establishment of a micro-scale heat market, having the case study from the Romanian village of Ghelinta. The proposed local market consists of a biomass-fired DH system, seasonal thermal energy storage and local prosumers that have the ability to feed excess heat produced by solar collectors or heat pumps into the network. The model takes the supply and the return temperatures from the DH network into account and decides whether the excess solar heat produced by the prosumers can be delivered into the network. This reduces heat overproduction and enables a smooth and uninterrupted operation of the system. Such configuration would benefit both the DH Company and the prosumers. With the establishment of the market, a DH company would have the opportunity to reduce its operational costs by buying cheaper excess heat from the prosumers instead of starting its own and relatively slow biomass boilers. In order to validate the model, several scenarios have been modelled. The hypothesis of the paper is that the establishment of a micro-scale heat market would bring seasonal thermal storage together with local prosumers who could smooth out the operation of biomass district heating boilers and provide additional socio-economic benefits to the bioenergy village community. This could be the first step towards an establishment of a micro-scale thermal energy market. Analysis has proven that the proposed system configuration is socio-technically feasible, even with the proposed micro-scale systems.
The innovations within this paper are the outcomes and detailed arguments for the establishment of a thermal energy market on a local scale with a prosumer concept inspired by the electricity market and upfront energy pricing. According to the results, the new thermal energy market and supply system from a technical and economic perspective is feasible, while the price of sold thermal energy is foreseen to be significantly cheaper for the end consumer by using the below detailed approach.
From this point of view, the present novel approach could be implemented not only in the studied framework and location, but also in other regions and countries where local biomass, solar and geothermal energies are available and the local community is engaged in utilising RESs and combating climate change.

Mathematical model
The following model is a social welfare maximisation problem (i.e. minimisation of energy costs for the final consumer, decrease of impact on the environment, better housing conditions by using state-of-the-art energy supply systems) which is inspired by the European dayahead electricity market clearing model developed by the Greek authors given in [32]. It is based on the following assumptions: 1. There are two homogenous and perfectly divisible inputs, quantity (kWh) and its specific price (€/kWh). They are supplied in fixed amounts. 5. The size of storage is determined retroactively. 6. Heat has to be supplied to the consumers at any price.

Objective function
The following equation represents the objective function of the analysed problem. It is a mixed integer linear programming (MILP) problem, whose aim is the maximisation of the overall social welfare w tot , under a set of primal decision variables V = {x dn t , x sn t , x bo }: where w tot is the overall social welfare, c dem is the total demand, c sup is the supply and c bo represents the block orders.
The total demand function is given as follows: where P dn t and Q dn t represent the price-quantity pair of step n of the hourly priced demand bid d in trading period t, in €/MWh and MW, respectively. x dn t denotes the acceptance ratio of step n of the hourly priced demand bid d in trading period t.
where P sn t and Q sn t represent the price-quantity pair of step n of the hourly priced energy offer s in trading period t, in €/MWh and MW, respectively. x sn t denotes the acceptance ratio of step n of the hourly priced energy offer s in trading period t.
where P bo and Q bo t represent a price-quantity pair of block order bo, in €/MWh and MW, respectively. In the case of a profile block order, the quantity may be different in each trading period t. x bo denotes the acceptance ratio of block order bo. It is important to note that in the proposed mathematical formulation Q bo t ≤ 0 represents all demand block bids and Q bo t ≥ 0 all supply block offers.

Order clearing constraints
The objective function results in the following set of order clearing constraints that enforce that the clearing status of the profile block order is always either 0 or between its minimum and maximum acceptance ratio: where R min bo is the minimum acceptance ratio of block order bo, in %, and y bo of the binary variable denotes the clearing status of block order bo. In the case of a maximum acceptance ratio x bo , y bo values are equal to 1. When the regular block orders are R min bo ¼ 1; the respective constraint transforms into a classical "fill-or-kill" constraint offering either all or nothing. Likewise, the following constraint denotes the upper limits for the clearing of the demand bids and supply offers.
Heat balance constraints The objective function results in a heat balance constraint. It ensures that the market is always in an equilibrium. This is done in such a way that the sum of all the demands, supplies and block orders is equal to 0:

Scenarios
The case study analyses the opportunity for establishing a micro-scale biomass-fired district heating system, whose wholesale prices would be determined on the heat market. The project is in scope of the greenfield investment programme and could be implemented in the target village of Ghelința. The village of Ghelinţa is a commune in Covasna County, located in the central part of Romania. It is composed of two villages, Ghelinţa and Harale. According to the latest census, there is a total of 4722 inhabitants living in 1710 households [33]. The total number of residential, commercial and public buildings sums up to 1895. Local people are mostly employed in the forest industry, transport, retail, manufacturing industry, public institutions and services. The heating in residential buildings is mostly based on old and inefficient wood stoves without any in-house distribution. Since the price of firewood has been increasing at a dramatic rate, central heating and DH solutions are becoming more and more popular in the region. The price of firewood has increased by more than 100% in the last 5 years in Romania because of a stricter monitoring of the logging process, enforced by a new Forest Code, and due to the limited permits for wood extraction that resulted in a raw material crisis in Romania. More than 20 SMEs are active in wood logging and the pre-processing industry.
The local forest area is 6430 ha and offers the largest solid biomass source. According to annual statistics, wood waste and forestry residues were estimated as 3698 tons, which is equivalent to 15,409 MWh/a of heat [34]. However, the available amount of wood for energy production in Ghelința is only a few hundred tons per year, not only due to the limitation in wood extraction and the increase in raw material efficiency during wood processing in the forest-based industry, but also due to an increase in the price of logs with the result that only bigger companies can manage the supply of local or regional wood manufacturing companies.
Given the local circumstances in Ghelinta, the following assessment focuses only on the most suitable  locations for DH systems. These are mainly public buildings and residential households located in the village centre. A list of all buildings is provided in Table 1. The data provided by the Municipality of Ghelinta, in combination with the proposed assumptions and the calculations carried out, reflects the initial status of the assessed project. The proposed project is strongly backed up by the Local Council of Ghelinta. The main issue is also, for instance, a strong trade-off between the DH price (the economic viability of the plant) and its attractiveness for potential DH consumers. Space heating and domestic hot water demands were estimated by the degree-hour method proposed in the literature [34]. This method is based on known values of total heating demand and outside air temperature, acquired by using various publicly available databases such as PVGIS, and assumed a constant inside temperature for every hour of the year. The hourly differences between these two temperatures are called degree-hour. It is assumed that hourly heating demand is proportional to the temperature difference [7]. Based on the given heating needs, technology-specific investment costs as well as biomass and electricity prices, a levelised cost of heat was calculated for each technology. The reference price would presuppose that only biomass boilers operate and that their marginal price is equal to 0.031 EUR/kWh. However, in the present research paper, the DH consists of two boiler units and a seasonal thermal energy storage that could either store heat when the prices are low or deliver it to the network when the prices are high. All 20 public buildings represent prosumer units that can cover their own heat via solar thermal collectors or heat pumps. Their operation is configured in such a way that local heating demands are firstly covered by local sources and afterwards all excess heat can be offered on the market at marginal prices. The 52 residential buildings in Table 1 are considered as consumer units in the simulations. In order to show that such configuration is economically viable, three different scenarios were modelled. The number of all available technologies in the different scenarios is presented in Table 2.
Local climate in the studied area is a moderate continental climate influenced by the nearby mountain region. The mean daily maximum in August is 22°C, Fig. 1 Outside temperature in the target village while in January and February, the mean daily minimum is − 6°C. The minimum temperature accounts to − 28°C during January, while the maximum temperature can be higher than 34°C during July. Under normal conditions, the heating season starts on the 10th of October and, depending on the weather conditions, usually ends after the 15th of April (see Fig. 1). The hourly distribution of heating demand and the hourly solar thermal production are also shown in the following figures (Figs. 2 and 3).

Results and discussion
The simulation results of the previously defined scenarios are demonstrated in the following figures. They consist of the hourly marginal cost price, the prosumer's thermal net flow including thermal storage charging and finally the heat-only-boiler operation. Figure 4 shows scenario 1 results. The top image represents the hourly distribution of marginal prices. It can be seen that the lowest market thermal prices (0.028 EUR/kWh) are reached during the summer period due to the excess production of the solar thermal collector. This is also evident in the middle diagram which demonstrates a negative net thermal flow of the prosumer units. This means that seasonal thermal excess of heat is available and stored, as presented in Fig. 5. The bottom diagram of Fig. 4 demonstrates the operation of heat-only boilers. The larger biomass heat-only boiler operates exclusively during the winter season, while the smaller one operates throughout the year. The reason for this is the intermittent and insufficient production of the solar thermal collectors during the summer period. Scenario 2 results are depicted in Fig. 5 and displayed in a similar manner. The marginal cost price during the summer period (0.025 EUR/kWh), including the overall average MCP, is lower when compared with the other two scenarios. The reasoning behind this is a great excess of heat from prosumer units due to the large capacity of installed heat pumps. This is happening only when the electricity costs are so low, that it makes economic sense to produce energy. Since they are located in all public buildings, such as schools and offices, they do not have a heat demand to cover the needs during long periods of time. This excess heat could be efficiently sold on the market at low market prices. When compared to scenario 1, these prosumer units have a smaller negative net thermal flow peak, but are operated at a more constant load. This is the main reason why in this scenario, the heat-only boilers do not operate in summer time.
Scenario 3 includes prosumers which have installed heat pumps or solar collectors (Fig. 6). Because of this, the marginal cost price is between the value of scenario 1 and that of scenario 2. In this scenario, excess heat peaks from the prosumers are visible during summer time. This is the reason why a larger thermal storage is needed here compared to the second scenario. Although heat pumps are installed in a number of public buildings, a smaller heat-only boiler has to be operated during the summer period which increases the overall average marginal cost price, but not at such a high level as in scenario 1 (see Table 3).
All in all, three different scenarios were determined in the results with the aim to analyse the marginal costs reached by using different technologies and combinations of renewable energy technologies. The role of the prosumers in thermal energy flow was demonstrated while the operation of boilers was also optimised.
According to the results, as expected, scenario 1 required the largest seasonal thermal storage of up to 400 MWh due to the large amount of installed solar thermal collectors. The smallest thermal storage is needed in scenario 2 which had, as explained before, the lowest marginal cost price. Charging and discharging trends are the same in all three scenarios. Thanks to the different modelled scenarios, the optimisation of the local thermal energy market was performed. The best economic and technical approach is to install a larger number of heat pumps at public buildings to achieve an excess of heat from prosumers and sell this thermal energy efficiently on the market at low market prices, using the seasonal storage. Thermal storage level and thermal storage capacity per scenario are given in Fig. 7. The size of the thermal storage has also been simulated and indicated that the lowest level was achieved in scenario 2 with a 250-MWh storage level. If we implement a large number of solar collectors, the required capacity of thermal storage is significantly higher. It is noteworthy to mention that to construct a larger seasonal thermal storage would be the most expensive option. It is also demonstrated how important the role of thermal seasonal storage is. With the aim to mitigate CO 2 emission during the operation of the entire facility, the capacity of the biomass boiler and the working hours for this boiler were reduced by the introduction of a seasonal storage and dynamic energy market model. The biomass boiler was operated only when the heating and hot water demand was remarkably high, as especially during wintertime. The operator of the seasonal storage can balance the production and consumption curves. Thus, the present approach helps us to decrease the biomass consumption by 50% compared to the initial case and volume of firewood used in Ghelinta's public buildings. Actually, thermal storage reached its lowest level at nearly the same hour with all three scenarios. Figure 8 indicates the hourly block orders for larger heat-only boilers. Again, it can be noticed that there are no orders during summertime, and therefore the reason why it does not operate during the summer season. Block order distributions are almost the same in all three scenarios, but it can be observed that in scenario 1, more heat was provided compared to the least amount shown in scenario 2. This is an additional reason why the second  scenario has the lowest marginal cost price, as is finally also evident from Fig. 9 and Table 3.

Conclusions
The first novelty of this paper is the description of the establishment and analysis of a micro-scale thermal energy market on a local level. The method described and applied in this paper represents a classical mixed integer programming model influenced by EUPHEMIA algorithm of a day-ahead market. It takes into account both continuous orders and block orders on both sides, namely the heat supply side and the heat and domestic hot water demand side. In this connection, the EUPHE-MIA algorithm, which is basically used to compute the day-ahead electricity prices, is used in this paper to model the day-ahead thermal energy prices. It has to be admitted that such an approach was not applied in the simulation of thermal energy supply systems. The main lesson learned from this paper is that the utilisation of an RES mixture in DHSs is possible, even on a micro-scale, but the optimisation in timing, the utilised energy source and the energy use for final consumers and prosumers are crucial aspects. When an algorithm of the day-ahead market is implemented, it can significantly reduce the energy price for end consumers, which is one of the most convincing factors in the decision-making process. This technical and energy management approach has to be disseminated to local communities, and long-term thinking could support the local sustainable energy management. Likewise, through optimisation of thermal energy production and appropriate utilisation of energy, a balance could be achieved so that "just enough" energy would be produced for the thermal energy supply of local final consumers.
The model was applied to the 52 residential households and 20 commercial and public buildings located in the centre of the Romanian municipality of Ghelinta. On the one hand, the residential households were modelled as consumers (consumer units) that buy heat from the local heat market. Commercial and public buildings using solar technology were modelled as prosumers (prosumer units) that are able to produce enough heat to cover their own heating needs and sell excess heat on the market. The biomass-fired district heating company, as the largest producer, can also act as a prosumer as it owns a large seasonal thermal energy storage capacity  and can buy heat when the prices are low and sell when the prices are high. Thermal energy production was modelled depending on price of production, solar irradiation, daily and seasonal energy demand, peak load and other parameters. In order to mitigate the significance and installed capacity of the biomass boiler, a seasonal storage and dynamic energy market model was introduced. The biomass boiler has to be operated when the heating and hot water demand is remarkable, during wintertime. The operator of the seasonal storage can balance the production and consumption curves. District cooling (DC) was not analysed in this paper because of the climatic conditions in the studied target village Ghelința, where there was no expressed need for cooling.
On the other hand, scenario analysis has proven that the proposed system configuration is socio-technically feasible, even for micro-scale systems as shown by a case study for the Romanian target village Ghelinta. Scenario analysis has also proven that the establishment of a heat market can have positive impact on the heat prices as is evident in all analysed cases. In a best-case scenario, the price of heat could be reduced by up to 18% compared to the classical biomass district heating system. The outcomes of the presented paper not only encouraged the local decision-makers to study the feasibility of a microscaled heat market in 2018, but also to develop and submit an innovative project proposal for implementation in the POIM 6.1. National subsidy programme in Romania. This concept should be realised in 2020-2021. Since this analysis is a work in progress, an optimised technical planning and reliable cost survey have to be performed in order to make calculations as well as the end results more accurate. These are the first steps planned for the future, while the final step would involve a full socio-techno-economic analysis of the proposed case study from which more concrete conclusions could arise.
Another innovation of this paper is that the outcomes confirmed the feasibility of an establishment of a thermal energy market on a local level, while the introduction of the prosumer concept supported the decrease of the final price of thermal energy for the final consumers, by remarkably 18%.
The presented village offered us a business-as-usual case from South-Eastern Europe where several public and commercial buildings are located in the village centre, while the households are closely located to these buildings. In our consideration of the climatic, architectural, economic and social framework, a large number of rural settlements exist for which by using a similar approach, the local thermal energy market can be established.
The present study offers a guideline for other research and design activities by demonstrating the most important aspects of the optimisation of biomass-based district heating systems with seasonal storage, mixing of solar and geothermal sources, smart energy management on a local micro-scale and optimisation of cost benefits.