Multiple building types sink node

The MultipleBuildingTypes node creates sinks for all demand resources with penalties for both surplus and deficit. The implementation uses Dict structures for the fields cap, penalty_surplus, and penalty_deficit to facilitate multiple Resources. This approach allows modeling building demands with flexible penalty mechanisms for over- and under-supply. The type is also used to enable a specialized constructor that samples the Tecnalia_Building-Stock-Energy-Model module.

Sampling Tecnalia_Building-Stock-Energy-Model module

To use the constructor for MultipleBuildingTypes that samples the Tecnalia_Building-Stock-Energy-Model module, follow the installation in the Use nodes section.

Danger

Investments are currently not available for this node.

Introduced type and its field

The MultipleBuildingTypes is a subtype of Sink and is implemented as a specialized sink node. Hence, it utilizes the same functions declared in EnergyModelsBase.

Standard fields

Standard fields of a MultipleBuildingTypes node are given as:

  • id:
    The field id is only used for providing a name to the node. This is similar to the approach utilized in EnergyModelsBase.

  • input::Dict{<:Resource, <:Real}:
    The field input includes Resources with their corresponding conversion factors as dictionaries. All values have to be non-negative.

  • data::Vector{Data}:
    An entry for providing additional data to the model. In the current version, it is not applicable. We intend to change this in future releases to enable investments.

    Constructor for `MultipleBuildingTypes`

    The field data is not required as we include a constructor when the value is excluded.

    Using `CaptureData`

    As a Sink node does not have any output, it is not possible to utilize CaptureData. If you still plan to specify it, you will receive an error in the model building.

Additional fields

MultipleBuildingTypes nodes introduce additional fields for demand and penalty specifications:

  • cap::Dict{<:Resource,<:TimeProfile}:
    The demand capacity for each of the input resources. All values have to be non-negative.
  • penalty_surplus::Dict{<:Resource,<:TimeProfile}:
    The penalties applied for surplus (over-supply) for each of the input resources. These penalties are added to the variable operating expenses. All values have to be non-negative.
  • penalty_deficit::Dict{<:Resource,<:TimeProfile}:
    The penalties applied for deficit (under-supply) for each of the input resources. These penalties are added to the variable operating expenses. All values have to be non-negative.

Mathematical description

In the following mathematical equations, we use the name for variables and functions used in the model. Variables are in general represented as

$\texttt{var\_example}[index_1, index_2]$

with square brackets, while functions are represented as

$func\_example(index_1, index_2)$

with parantheses.

Variables

Standard variables

The MultipleBuildingTypes node type utilizes standard variables from the Sink node type and includes:

cap\_use and cap\_inst

A MultipleBuildingTypes has an individual capacity for all its resources, that is each Resource has its own capacity which must be satisfied. As a consequence, the standard variables $\texttt{cap\_use}$ and $\texttt{cap\_use}$ are not defined for MultipleBuildingTypes nodes through a new method for the function has_capacity.

Additional variables

MultipleBuildingTypes introduces the following variables:

  • $\texttt{buildings\_surplus}[n, t, p]$: Surplus (over-supply) for node $n$ in operational period $t$ for resource $p$.
  • $\texttt{buildings\_deficit}[n, t, p]$: Deficit (under-supply) for node $n$ in operational period $t$ for resource $p$.
  • $\texttt{sink\_surplus}[n, t]$: Total surplus aggregated across all resources.
  • $\texttt{sink\_deficit}[n, t]$: Total deficit aggregated across all resources.

Constraints

The following sections omit the direct inclusion of the vector of MultipleBuildingTypes nodes. Instead, it is implicitly assumed that the constraints are valid $\forall n ∈ N^{\text{MultipleBuildingTypes}}$ if not stated differently. In addition, all constraints are valid $\forall t \in T$ (that is in all operational periods) or $\forall t_{inv} \in T^{Inv}$ (that is in all strategic periods). Finally, all constraints are valid $\forall p \in inputs(n)$ (that is in all input resources).

Standard constraints

MultipleBuildingTypes nodes utilize the following standard constraint functions:

  • constraints_opex_fixed:
    The current implementation fixes the fixed operating expenses of a sink to 0.

    \[\texttt{opex\_fixed}[n, t_{inv}] = 0\]

  • constraints_ext_data:
    This function is only called for specified additional data, see above.

The function constraints_capacity is extended with a new method to account for the multiple inputs that must be satisfied within this Sink node:

\[\frac{\texttt{flow\_in}[n, t, p]}{inputs(n, p)} + \texttt{buildings\_deficit}[n, t, p] = capacity(n, t, p) + \texttt{buildings\_surplus}[n, t, p] \qquad \forall p \in inputs(n)\]

\[\texttt{sink\_deficit}[n, t] = \texttt{buildings\_deficit}[n, t, p]\]

\[\texttt{sink\_surplus}[n, t] = \texttt{buildings\_surplus}[n, t, p]\]

The function constraints_flow_in is extended with a new method that does not add any constraint.

The function constraints_capacity_installed is not called within constraints_capacity. Thus, the node does not support investments.

The function constraints_opex_var is extended with a new method to allow for individual penalties for the different demands.

\[\texttt{opex\_var}[n, t_{inv}] = \sum_{t \in t_{inv},\, p \in inputs(n)} \left( \texttt{buildings\_surplus}[n, t, p] \times penalty\_surplus(n, t, p) + \texttt{buildings\_deficit}[n, t, p] \times penalty\_deficit(n, t, p) \right) \times scale\_op\_sp(t_{inv}, t)\]

The function `scale_op_sp`

The function $scale\_op\_sp(t_{inv}, t)$ calculates the scaling factor between operational and strategic periods. It also takes into account potential operational scenarios and their probability as well as representative periods.

Additional constraints

MultipleBuildingTypes nodes do not add additional constraints.