1. Introduction
In recent decades, global weather patterns have shifted markedly, largely due to human-driven factors such as extensive fossil fuel use and deforestation, both of which have significantly increased the global carbon footprint. Projections from the United Nations Department of Economic and Social Affairs indicate that, by 2050, urbanization will reach
, with more than 40 metropolitan areas exceeding 10 million inhabitants [
1]. As noted in [
1], cities currently account for over two-thirds of global
emissions and energy consumption. These combined pressures—accelerating urbanization, climate change, and rising energy demand—underscore the urgent need to transition away from a business-as-usual economic model toward one that prioritizes sustainability and energy efficiency across all sectors. According to the International Energy Agency (IEA), buildings contribute roughly
of global final energy use and
of energy-related emissions. Consistent with [
2], in the United States and many European countries, 18–30% of total energy consumption is associated with the thermal energy needs of buildings. In this study, we consider a residential heating system (RHS) composed of two agents—a prosumer and a pure consumer (hereafter simply “consumer”)—as illustrated in
Figure 1. In this setting, a prosumer is an entity capable of producing and consuming thermal energy, whereas a consumer only uses energy supplied to it. The RHS provides heat for space heating and domestic hot water demands. The prosumer is equipped with a solar thermal collector for local heat generation, an internal storage (IS), and an external storage (ES), both modeled as water-based storage tanks for simplicity [
2]. The IS serves short-term storage needs, while the ES accommodates longer-term storage. Because solar production and residual thermal demand are highly intermittent and weather-dependent, additional support is required to ensure a stable and sustainable thermal supply. To address this, both buildings are connected to a community heating system (CHS). In this work, we consider a low-temperature bidirectional CHS (LTB-CHS) [
1,
3,
4,
5] and assume, for simplicity, that the temperature in the distribution pipes remains constant. The LTB-CHS is a relatively recent concept in district energy networks, offering benefits such as improved integration of renewable heat sources, simplified coupling with distributed technologies, and reduced carbon emissions. Its bidirectional capability allows buildings to inject surplus heat into the network, lowering peak central production requirements and enabling economic incentives whereby building owners can sell excess heat. Since the supply temperature in an LTB-CHS is lower than that in conventional systems, a heat pump (HP) is required to upgrade the delivered heat to the desired level.
In our modeling approach, daily temperature variations influence both the prosumer and consumer and are represented by a common noise process. Following [
2,
6,
7], we define residual demand as the imbalance between thermal supply and demand. We assume that the prosumer can meet this residual demand either via the CHS or by using the ES, whereas the consumer relies solely on the CHS. When production falls short, the prosumer either purchases heat from the CHS or releases it from the ES. Conversely, during periods of surplus production, the prosumer may store the excess in the ES (subject to capacity limits) or sell it to the CHS. The consumer, lacking local production and storage, always faces unmet demand that must be satisfied exclusively through CHS purchases. Consistent with [
2], we assume that the CHS is responsible for fulfilling the residual thermal demands of both agents, even though this demand fluctuates with respect to the common noise. Moreover, energy transfer between the IS and ES, as well as energy exports from the prosumer to the CHS, requires an ordinary pump (OP). The prosumer aims to minimize the expected total discounted cost associated with meeting its thermal demand, while accounting for uncertain weather conditions and variability in solar output. In contrast, the consumer—lacking local production or storage—continuously faces unmet thermal demand that must be supplied entirely from the CHS.
Including both agents in our framework enables us to determine the maximum expected investment that would make it economically reasonable for a consumer to adopt distributed renewable heating technologies and storage infrastructure, thereby transitioning into a prosumer.
Previous work, such as [
2], has formulated an RHS model and solved a stochastic optimal control problem using semi-Lagrangian and dynamic programming approaches. In Ref. [
7], the authors addressed a similar problem for a stand-alone system with geothermal storage. However, these studies did not explicitly model the dependence of residual demand on daily temperature variations via a common noise process, nor did they include ES charging and discharging inefficiencies. Our model fills this gap by incorporating these features, which increase realism. Models with common noise are advantageous because they reflect uncertainties that affect all agents simultaneously, potentially altering both qualitative and quantitative system behavior. Applications of common noise models in the energy sector include [
6,
8,
9,
10,
11,
12,
13].
Unlike in [
2,
7], we incorporate ES charging and discharging efficiencies, which account for storage losses when heat is stored or released. For simplicity, we assume that these efficiency factors depend solely on the residual demand, as in [
14].
Our contributions include first modeling a consumer connected to the CHS. We also motivate a common noise in the dynamics of the residual demands. This allows us to capture the impact of daily temperature variations on the residual demand. In addition, we include charging/discharging efficiencies in the dynamics of the ES temperature level. In reality, losses are observed during charging or discharging processes of the ES. Therefore, modeling these efficiencies is required. Furthermore, we perform a sensitivity analysis on the common noise, charging and discharging parameters to evaluate their impact on the expected total discounted cost. We also show that the value function is a viscosity solution of the associated partial differential equation (PDE). We derive the discrete-time state-dependent control set from the state constraint without imposing charging and discharging thresholds. In this work, the state-dependent control intervals depend on the charging/discharging efficiencies. We compare the costs of satisfying residual demands for both the consumer and the prosumer, and we estimate the expected investment that a consumer would need to undertake to transition into a prosumer. Finally, we perform extensive numerical experiments and provide economic interpretations.
The remainder of this paper is structured as follows:
Section 2 introduces the model, including state variables, control variables, constraints, and the heat price specification.
Section 3 presents the optimal control problems for both agents.
Section 4 and
Section 5 describe the semi-Lagrangian discretization and numerical results, including sensitivity analysis.
Section 6 concludes and outlines directions for future research.
2. Model Formulation
In what follows, we study a model that includes both a prosumer and a consumer connected to a CHS. The prosumer is able to generate thermal energy locally while also drawing from, or supplying heat to, the CHS. In contrast, the consumer has neither local production capabilities nor on-site storage units. We present a mathematical framework and corresponding optimization problems for both agents. Throughout this paper, we work on a fixed probability space endowed with a filtration that satisfies the usual conditions and supports two independent standard Brownian motions and . The parameter denotes the finite planning horizon.
An RHS is designed to supply thermal energy for both space heating and domestic hot water in a building. The prosumer is equipped with a solar collector, two storage units, a heat pump, and ordinary pumps. Thermal energy generated by the solar collector is first directed to the internal storage (IS) to meet immediate demand, while the external storage (ES) serves as a long-term buffer to handle periods of insufficient or excess production. We describe the imbalance between thermal supply and demand, resulting from stochastic fluctuations in solar collector output, by a stochastic process . This process is decomposed as , where denotes the seasonal average and represents random deviations from this mean.
The IS is modeled as a cylindrical tank whose water temperature must remain within prescribed bounds, and . In this study, we treat the IS as a black box and do not model its internal thermodynamic behavior explicitly. The ES is also represented as a cylindrical water tank with a fixed mass of stored water, which can be heated up to a maximum temperature through transfers of thermal energy from the IS. Conversely, it can be cooled to a minimum temperature when heat is withdrawn to satisfy the residual demand. For simplicity, we assume that charging and discharging the ES involves only ordinary pumps.
At any time , the prosumer’s state variables consist of the exogenous, deseasonalized residual demand and the endogenous ES temperature level Q. We therefore define the prosumer’s state process as .
For the consumer, the state is given solely by the deseasonalized residual demand , which is entirely exogenous.
Residual Demand: The deseasonalized residual demand processes
and
, associated with the prosumer and the consumer, respectively, evolve according to
where
represents the idiosyncratic noise capturing uncertainties specific to the prosumer’s heat demand, and
is the common noise accounting for shared weather-driven fluctuations.
The seasonal behavior of the residual demands is modeled by bounded and deterministic seasonality functions
for the prosumer and the consumer, respectively. Typical choices of
include
where
is the long-term mean residual demand;
represent the amplitudes of seasonality component
j of the cosine and sine terms, respectively;
represent the length and a reference time of seasonality component
j, respectively;
c is the coefficient of the linear term; and
is the number of seasonality components.
Since the prosumer is equipped with a local production unit, which can lead to overproduction, the expression of agrees with our modeling perspectives. Similarly, we model and choose parameters of and for which there exists such that . Below, is referred to as unsatisfied demand and as overproduction.
The control
denotes the proportion of residual demand satisfied by the CHS. As in Ref. [
2], we assume the decomposition
, where
is the residual demand satisfied by the ES, and
is the residual demand satisfied by the CHS. Satisfying the residual demand via the CHS suggests either buying (for
) or selling (for
). Likewise, satisfying the residual demand via the ES implies either discharging (for
) or charging (for
).
External Storage: In the following, we consider as storage a water tank where the water mass and specific heat capacity are given by
and
, respectively. The surface area of the tank is denoted as
. From the heat fluxes and the Newton cooling law with the heat transfer coefficient
[
], the change in the thermal energy of the water inside the ES is given by
The first term
represents the ES’s charging or discharging rate. Indeed, for an unsatisfied demand (
) and for a non-empty ES (
), the prosumer discharges the storage at a rate
. For an overproduction (
) and for a non-full ES (
), the prosumer can charge the storage at the rate
. The second term
is the rate of heat transfer with the environment.
represents the charging or discharging efficiency of the ES. Letting
, we model
for simplicity as in [
14] by
Remark 1.
A large γ implies large losses per unit of time, prohibiting long-term storage. Similarly, a small γ implies small losses per unit of time, allowing for long-term storage.
In the case , the prosumer does not satisfy its residual demand via the CHS. In the event of an unsatisfied demand (), implies that the prosumer satisfies all of the residual demand via the CHS. However, for an overproduction (), implies that the prosumer sells all the residual demand to the CHS.
State and Control Constraints: In order to reflect physical limitations of our external storage, we suggest that , where and are the minimum and maximum storage levels, respectively. is referred to as an empty storage, while is a full storage.
The operational limitations experienced by the prosumer give rise to state-dependent control constraints:
- 1.
If , only charging is feasible. Therefore,
If , all residual demand is satisfied by the CHS, implying .
If , there are no control constraints other than the requirement .
- 2.
If , we examine the following cases:
Hence, the state-dependent set of feasible controls,
, is defined by
Heat Price Formulation: We introduce time-varying heat buying and selling prices, denoted by
and
, respectively, for all
. We assume a contractual agreement between the prosumer and the CHS, binding the latter to always satisfy the residual demand of the former. To incentivize the CHS, it retains the right to determine the values of
and
. We model
as a deterministic function composed of a constant baseline and multiple seasonal fluctuations.
is a fixed markdown from the buying price through the spread parameter
. Therefore, we obtain
The constant term
corresponds to the long-term average heat price, while each cosine term introduces a seasonal component with amplitude
, period
, and phase shift
;
represents the number of seasonalities. The sum in the heat price model means that it is not driven by a simple seasonal pattern but by the combined effects of several independent and interpretable cycles, each corresponding to a different physical, operational, or economic rhythm of the heating system. The deterministic seasonal structure makes prices transparent and predictable for the prosumer, while the positive spread guarantees economic viability for the CHS. The bid–ask spread reflects transaction costs, operational constraints, or the market power of the CHS. It ensures that the CHS is compensated for providing balancing and backup services.
Assumption 1.
Let and denote the heat pump inlet and outlet temperatures, respectively. Similar to [2], we assume that the condition holds. Assumption 1 suggests that no heat pumps are necessary when satisfying the residual demand via the ES. This justifies the use of ordinary pumps in our model.
4. Semi-Lagrangian Discretization
In this section, we recall the discrete-time numerical scheme in [
2]. We focus on the prosumer’s problem, since the consumer’s problem can be solved directly. We start by discussing the state discretization.
State Discretization: Let , and denote the number of grid points in the t-, -, and q-directions, respectively. For computational reasons, we truncate the domain to , such that for a tolerance , for all . and represent the minimum and maximum values of the deseasonalized residual demand , respectively. Given the asymptotic standard deviation of , the 3- rule motivates and .
Let
,
, and
be a finite number of grid points in the
and
q-directions. We define
where
,
,
, for
,
and
, as a 3-dimensional equidistant grid on
with the temporal and spatial step sizes
We now recall the discrete-time numerical scheme discussed in [
2]. This is an alternative to the semi-Lagrangian approach introduced in [
16] and extended in [
17,
18]. It is a finite difference scheme based on the theory presented in [
19].
The control problem in (
12) can be solved through dynamic programming techniques that rely on the following dynamic programming principle (DPP). The subsequent result is useful for solutions to the control problem in (
12).
Theorem 1
(DPP).
For all and , the value function , satisfies the DPP Proof. For a proof, we refer to [
20]. □
The following result shows that the value function V, defined in (
12), is a viscosity solution of an associated partial differential equation (PDE).
Proposition 1.
Let . Thus, there exists such that Therefore, the value function V is a viscosity solution of the PDEwith the terminal condition and , . Proof. First, we note that the functions
are linear in the states
and
q. Then, there exits
, such that
In addition, we have
. Finally, the result follows from Theorem 2.3 in [
21]. □
Idea of the Scheme: We begin by fixing the triple and assume that, for , the deseasonalized residual demand remains constant, i.e., , where is fixed and known. Next, we assume that the control is constant over this interval, i.e., , which is fixed but unknown. Under these assumptions, and using the explicit solution, we compute the arrival point of the ES temperature level, given that at time , the storage level was , the residual demand was , and constant action was taken. We then apply the DPP in two steps: In the first step, using the above discretization, we obtain an approximation of the optimal control . In the second step, we substitute this approximate optimal control in the DPP and “release” the deseasonalized residual demand . Finally, by applying the Feynman–Kac formula to the second step, we derive a one-period PDE, which we discretize using finite difference methods to obtain a discrete-time scheme. This scheme is implemented in Algorithm 1.
From the above discussion, we formulate the following assumptions:
Assumption 4
(Piecewise Constant Control).
For and , the control α and the associated decision rule θ are kept constant between two consecutive grid points of the time discretization. That is, | Algorithm 1: Backward Recursion Algorithm |
![Mathematics 14 00489 i001 Mathematics 14 00489 i001]() |
Assumption 5
(Piecewise Constant Model Parameters).
For and , the time-dependent seasonality and the efficiency parameter are kept constant between two consecutive grid points of the time discretization. That is, Assumptions 4 and 5 suggest that the system’s time-dependent parameters are adjusted only at discrete-time points and remain constant within two consecutive discrete-time points. This situation is also consistent with reality.
Let
denote the solution of the ODE (
7) for the ES temperature level on the time interval
for a fixed but unknown control
, satisfying
Lemma 1.
Let Assumptions 4 and 5 hold and . Then, for , , and , the closed-from solution of is given by Moreover, letting and , (
23)
becomes Proof. Let
. For
and
, assume that
. Under Assumptions 4 and 5, (
22) is a linear first-order ODE with constant coefficients and source term, which is solved to obtain the desired result. Now, substituting
in (
23) yields
Rearranging the terms in (
25) yields (
24). □
denotes the ES temperature level at time knowing that, at time , the ES was at the level with a residual demand and an action was taken.
Discrete-Time State-Dependent Control Constraints: In order for
to always satisfy the condition
, we reformulate
to adapt to the discrete-time setting, where the control can only be adjusted at the end of the time interval
. We obtain
In the following lemma, we give the full expression of .
Lemma 2.
Under Assumptions 4
and 5,
the set of discrete-time state-dependent constraints iswhere Proof. From the condition
, we obtain
If , , and we obtain . Similarly, if , , and we have . Therefore, for , , and for , . □
One-Step Terminal Value Problem: Starting from the DPP as in [
22], we derive the following proposition, which is analogous to Theorem 4.3 in [
2]. This result provides the one-step approximate optimal control together with the associated terminal value problem. The latter is then solved numerically to determine the value and optimal strategy of the prosumer’s optimization problem.
Proposition 2.
Let be fixed, and suppose that Assumptions 4
and 5
hold. Then, starting from the DPP, the one-step approximate optimal control is given by In addition, setting , we obtain the one-step terminal value problemwhere . Proof. The proof is similar to that of Theorem 4.3 in [
2], taking
. □
Positivity Condition: In order to solve the one-step terminal value problem (
28) using numerical techniques, we first discretize the differential operator
. We let
denote the discretization operator of
and denote
. Given that the sign of
changes according to
and cannot easily be determined, we apply the upwind discretization for the convection term
. Subsequently, we apply the central second-order finite difference for the diffusion term
. Letting
, we obtain
where the expressions of
,
, and
change depending on the sign of
. The following result gives us the upper bound for
and defines the positivity condition for the coefficients
, and
.
Lemma 3
(Positivity Condition).
For and , the coefficients , and remain positive provided Proof. Similar to the proof of Proposition 4.4 in [
2]. □
CFL Condition: In the following, we formulate the Courant–Friedrichs–Lewy (CFL) condition, as introduced in [
23]. It relates the spatial step size
to the time step
and ensures that the arrival point
consistently lies within the interval defined by the neighboring grid points
and
adjacent to
. From this assumption, the following inequalities can be derived
In the following, we obtain the Courant–Friedrichs–Lewy (CFL) condition ([
23]) relating the time step size
to the ES step size
. This ensures the stability of the derived numerical scheme. Let
,
. Therefore, from the above inequalities and the state-dependent set of feasible controls, the CFL condition is given by
Interpolation: As noted in [
2], the arrival point
does not necessarily coincide with a grid point
. This prompts an interpolation of
based on the function values
at the grid points of
. Following [
17], a linear interpolation is sufficient to construct a monotone difference scheme. In what follows, we denote by
, the interpolated values of
defined in the result below.
Proposition 3.
Let , and assume that the CFL condition holds. Then, the interpolated value is given byfor and where .
Furthermore, we obtain that for and , Proof. See Appendix C.3 in [
2]. □
Now, we discretize the one-step terminal value problem (
28) to obtain
Finally, we obtain the fully implicit scheme given by
From the first equation in (
35), we want to form a system of linear algebraic equations that are useful to obtain the values of
. In that regard, we set
and assume that, for fixed
n and
k, the optimal strategy
, the CFL condition, and the terms in (
33) for all
i are known. We denote by
the known right-hand side of the difference equation (
35) for fixed
and for all
i. Hence, for
, we obtain
At the boundary
, i.e.,
, we recall that
. Similarly, at the boundary
, i.e.,
, we have
. Therefore, we have the following
Boundary Conditions: To ensure that the one-step terminal value problem, formulated as a PDE, is well posed, we specify boundary conditions at
and
. These conditions arise from truncating the computational domain of the PDE from
to a bounded domain
. Accordingly, we require that
We note that the corner values
, and
are computed using previously obtained values
for
,
, so that
Combining (
40), the boundary conditions, and the difference equation (
35), we proceed to the matrix formulation below.
Matrix Formulation: Simultaneously varying the indices
, for
n fixed in the difference equation (
35), and using (
40), we obtain the following system of linear equations:
where
,
, with
G an
tridiagonal matrix given as
where
It now remains to obtain the values
, and
. To do so, we substitute the boundary conditions (
38) in the difference equation (
35) to obtain
where for
, while for
. Following similar steps as above, we obtain the following for
:
,
,
.
Similarly, for
, we have
,
,
. Letting
denote the
identity matrix,
K and
M are
diagonal matrices given by
Substituting
and
, respectively, in the difference equation (
35), we obtain the following for
:
,
,
,
. Further details can be obtained in [
2].
Backward Recursion Algorithm: The approximate optimal control presented in (
27), along with the value functions in (
41), (
44), (
45), and (
47), can be computed using Algorithm 1, proceeding backward in time from the terminal time step
. To determine
, we take into account the storage level and distinguish between scenarios of unsatisfied demand and overproduction. This classification indicates which subinterval of
should be evaluated. Subsequently, an optimization procedure is carried out to identify the control value that minimizes the objective function. The resulting control is then interpreted as the optimal decision for the given state variables at grid points
and
. This procedure is applied iteratively across all combinations of grid points to recover the complete set of optimal controls.
5. Numerical Results
In this section, we discuss the numerical solution for the prosumer’s problem. The results are based on the implementation of Algorithm 1 to find the optimal strategies and the value functions as well as studying the properties of the obtained value functions. As the terminal condition, we consider a penalization problem modeled as
For the purpose of the numerical simulations, the seasonality function and heat price are modeled, respectively, by
The full description of the model parameter values is given in the
Table 1 below.
Parameters
, and
are calibrated to the model, and the idea for the calibration is provided in [
2].
Terminal Cost:Figure 2 shows the terminal cost
as a function of the residual demand
r and the ES storage level
q. Here, the terminal cost is formulated as a penalization problem. By construction as in (
48), we observe that the value function is constant with respect to the residual demand at the terminal time. However, if the storage level falls below the reference temperature
= 40 °C, the prosumer incurs a cost proportional to the deviation from
and the charging efficiency
. This cost increases the further the storage temperature is below the reference. For temperatures above the reference, no additional cost is incurred, and the storage is effectively considered to have no residual value.
Value Function and Optimal Strategy for Time-Dependent Heat Buying and Selling Prices:Figure 3 depicts the value functions and optimal strategies of the prosumer at the initial time
and on day
. From the top- and bottom-left panels, we can observe that as the ES temperature increases, the prosumer incurs lower costs. Conversely, as the residual demand increases, the prosumer incurs higher costs. The top-right panel shows that, for an unsatisfied demand (
), the prosumer satisfies all residual demand via the CHS if the ES is empty; otherwise, it discharges the ES. In the case of overproduction (
), all excess production is sold to the CHS. From the bottom-right panel, we can note that, for an unsatisfied demand, the prosumer satisfies all residual demand via the CHS when
°C. For
°C, all residual demand is satisfied by the ES. In the case of overproduction, the prosumer first stores some energy in the ES and subsequently sells any remaining excess to the CHS. Since the horizon is one year (365 days), with a penalization cost at the terminal time, we can observe that on day 362, the prosumer begins filling the storage close to the penalty temperature
°C to avoid higher terminal costs.
Figure 4 shows the prosumer’s value functions and optimal strategies as functions of the residual demand
r and the ES temperature level
q on day
. In the top-left panel, we can observe that, for a given residual demand, the prosumer incurs lower costs as the ES temperature increases. The expected aggregated discounted cost is higher for the strongest unsatisfied residual demand and lower for the strongest overproduction. On the other hand, the bottom-left panel shows that the cost increases with respect to the residual demand, with the highest cost incurred for an empty storage. The smallest cost is incurred for a full storage. In the top-right panel, we can observe that, for both the strongest and smallest unsatisfied demand, the prosumer first purchases thermal energy from the CHS. Afterwards, for a sufficiently filled ES, it discharges the storage to meet the unsatisfied demand. For the strongest overproduction, the prosumer stores all excess production in the ES and only sells to the CHS if the ES is full. In the bottom-right panel, for both an empty and
-full ES, the prosumer stores the excess production in the ES for an overproduction and satisfies all unsatisfied demand via the CHS for an unsatisfied residual demand. Now, for a full ES, the prosumer compensates the loss to the environment of the ES in the case of overproduction. For an unsatisfied demand, all residual demand is satisfied by the ES.
Value Function and Optimal Strategy for Constant Heat Buying and Selling Prices: For the case of constant heat buying and selling prices, we focus on the value function and optimal strategies as functions of the residual demand
r and the ES temperature level
q. Let
and
denote the constant heat buying and selling prices, respectively. In the following, we model
and
as
where
, and
are the same as in (
49). In
Figure 5, we focus on the top- and bottom-right panels since the top- and bottom-left panels have the same interpretation as in
Figure 4. In the top-right panel of
Figure 5, for both the strongest and the smallest unsatisfied demand, the prosumer discharges the ES if it is not empty; otherwise, all residual demand is satisfied by the CHS, at a higher cost. For the strongest overproduction, all excess thermal energy is sold to the CHS for revenue. As shown in the bottom-right panel, for an empty ES and overproduction, the prosumer sells all residual demand to the CHS. However, for an unsatisfied demand, all residual demand is satisfied by the CHS. For a half-full or full ES, the prosumer sells all residual demand to the CHS in the event of overproduction. For an unsatisfied demand, it discharges the ES.
Let denote the maximum value function of the prosumer for time-dependent heat buying and selling prices. denotes the maximum value function of the prosumer for constant heat buying and selling prices, and is the maximum value function of the consumer for time-dependent heat buying and selling prices.
In
Table 2, we note that the prosumer incurs a higher expected aggregated discounted cost under the time-dependent heat prices model than with its constant counterpart. This is due to the fact that the time-dependent heat prices model reflects the changes in heat prices during cold and warm seasons, which is not observed in the constant pricing case. Since the consumer is not equipped with heat production and storage units, it relies solely on the CHS for its unsatisfied residual demand, hence leading to a much higher expected aggregated discounted cost. From the values of
and
, we can compute the expected consumer investment cost into heat production and storage units in order to reduce the cost of satisfying its heating and hot water demands. This investment cost is denoted by
.
5.1. Sensitivity Analysis
In this section, we perform a sensitivity analysis on
, and
to study their impact on the expected aggregate discounted cost. The results presented correspond to the case of time-dependent heat buying and selling prices. All parameters are fixed, with values given in
Table 1, except for
and
, which are varied. Throughout this section, we let
denote the maximum value function, as in
Table 2.
In
Table 3, we can observe that as the impact of the weather conditions increases, the aggregated discounted cost becomes higher. This is the case because higher values of
increase the residual demand, which, in turn, increases the prosumer’s cost. Thus, the more pronounced the impact of weather conditions is on the heating system, the higher the aggregated discounted cost the prosumer will incur. For example, for
, the prosumer incurs a maximum cost of
EUR whereas for
,
EUR, which is approximately a
increase from the case of no common noise.
In
Table 4, we can observe that the better the discharging efficiency, the smaller the cost incurred by the prosumer. This is due to the fact that, for a weak discharging efficiency, the prosumer, when satisfying residual demand via the ES, discharges more thermal energy to compensate for the loss during the process. Hence, a better discharging efficiency reduces losses during the discharge, hence contributing to the reduction in the prosumer’s aggregated discounted cost. For a discharging efficiency
, we can observe an increase of approximately
in the aggregated discounted cost as compared to the case of a perfect discharging efficiency
.
As the charging efficiency improves in
Table 5, we can observe that the prosumer incurs a smaller aggregated discounted cost. For a weak charging efficiency, not all overproduction can be stored in the ES, due to the losses to the environment during charging. Therefore, as the charging efficiency improves, more thermal energy can be stored in the ES for further use. Hence, for a charging efficiency of 0.9, we observe an approximate
increase in the aggregated discounted cost as compared to a perfect charging efficiency.
5.2. Optimal Path of ES Level
In
Figure 6, we show the optimal path of the ES temperature level
Q together with the residual demand
R, the seasonality function
, and the absolute optimal control
for a time-dependent heat price. At the initial time, we assume that the prosumer starts with a full storage. Hence, for an unsatisfied residual demand, the prosumer discharges the ES until it becomes empty. For overproduction, the prosumer slowly charges the ES and drives it almost full in late summer. We further observe that for
, the prosumer discharges the ES to satisfy the unsatisfied demand and charges the ES for
.