The <fontcolor='blue'>**blue lines**</font> identify the decision variables, and <fontcolor='red'>**red sentences**</font> are our comments.
## 1. Objective function
In the following paragraphs, blue items specify variables and black items are parameters.
*<fontcolor='blue'>$`\pi^{Bio}_{t, i, j, b} = `$ production of output from solid biomass technologies $`i`$ at time $`t`$ for sub-sector $`j`$ and biomass product $`b`$ $`(GJ)`$</font>
*<fontcolor='blue'>$`\pi^{Gas}_{t, i, j, b} = `$ production of output from natural gas/biogas/coal technologies $`i`$ at time $`t`$ for sub-sector $`j`$ and biomass product $`b`$ $`(GJ)`$</font>
*<fontcolor='blue'>$`\pi^{nonBio}_{t, i, j} = `$ production of output from non biomass, renewable technologies $`i`$ at time $`t`$ and for sub-sector $`j`$ $`(GJ)`$</font>
*<fontcolor='blue'>$`\pi^{Beh}_{t, i, j, c} = `$ production of output within the consumer clusters $`c`$ of technology $`i`$ at time $`t`$ and for sub-sector $`j`$ $`(GJ)`$</font>
*<fontcolor='blue'>$`n^{cap}_{t, i, m, j} = `$ installed/ existing number of technologies at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{prodBeh}_{t, i, j, c} = `$ endogenously installed number of technologies $`i`$ at time $`t`$ for sub-sector $`j`$ in the consumer cluster $`c`$</font>
* $`vc_{t, i, j, b} = `$ variable cost of technology $`i`$ at time $`t`$ for sub-sector $`j`$ and biomass product $`b`$ - OPEX including feedstock inputs ($`€/GJ`$)
* $`inv_{t, i, m, j} = `$ investment cost at time $`t`$ of technology $`i`$ and technology module $`m`$ for sub-sector $`j`$ ($`€`$)
* $`vc^{Beh}_{t, i, j, c} = `$ intangible variable cost of technology $`i`$ at time $`t`$ for sub-sector $`j`$ in the consumer cluster $`c`$ ($`€/GJ`$)
* $`inv^{Beh}_{t, i, j, c} = `$ intangible investment cost at time $`t`$ of technology $`i`$ for sub-sector $`j`$ in the consumer cluster $`c`$ ($`€`$)
$`min\, cost = \overbrace{\sum_{t, i, j}(vc_{t, i, j, 1} \times pi^{nonBio}_{t, i, j}) + \sum_{t, i, j, b}(vc_{t, i, j, b} \times pi^{Bio}_{t, i, j, b}) + \sum_{t, i, j, b}(vc_{t, i, j, b} \times pi^{Gas}_{t, i, j, b})}^\text{production costs} + \underbrace{\sum_{t, i, m, j}(inv_{t, i, m, j} \times n^{cap}_{t, i, m, j})}_\text{investment cost} + \overbrace{\sum_{t, i, j, c}(vc^{Beh}_{t, i, j, c} \times pi^{Beh}_{t, i, j, c}) + \sum_{t, i, j, c}(inv^{Beh}_{t, i, j, c} \times n^{prodBeh}_{t, i, j, c})}^\text{intangible cost}`$
## 2. Constraints
### 2.1 Demand:
Heat demand per sub-sector needs to be fullfilled
*<fontcolor='blue'>$`\pi_{t, i, j} = `$ production of output from technologies $`i`$ at time $`t`$ for sub-sector $`j`$ $`(GJ)`$</font>
*<fontcolor='blue'>$`n^{prod}_{t, i, j} = `$ number of technologies $`i`$ producing heat at time $`t`$ for sub-sector $`j`$</font>
* $`d_{t, j} = `$ heat demand per sub-sector $`(GJ)`$
* $`d^{cap}_{t, j} = `$ heat demand per unit/house/heating system $`(GJ)`$
The following formulas regulate the capacity expansion, overcapacity, capacity producing heat, decomission of the initial stock and the decomission of expanded stock.
*<fontcolor='blue'>$`n^{cap}_{t, i, m, j} = `$ installed/ existing number of technologies $`i`$ at time $`t`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{prod}_{t, i, j} = `$ number of technologies $`i`$ producing heat at time $`t`$ for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{prodBeh}_{t, i, j, c} = `$ endogenously installed number of technologies $`i`$ at time $`t`$ for sub-sector $`j`$ in the consumer cluster $`c`$</font>
*<fontcolor='blue'>$`n^{cap1}_{t, i, m, j} = `$ number of existing units used for production at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{cap2}_{t, i, m, j} = `$ overcapacity of existing units at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{ext}_{t, i, m, j} = `$ number of units extended at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{dec}_{t, i, m, j} = `$ sum of all unit reductions at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
*<fontcolor='blue'>$`n^{xdec}_{t, i, m, j} = `$ number of units of $`n^{ext}`$ that reached their lifetime at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$</font>
* $`n^{sdec}_{t, i, m, j} = `$ yearly decrease of initial stock of units at time $`t`$ for technology $`i`$ for technology module $`m`$ and for sub-sector $`j`$
* $`life_{i, m, j} = `$ lifetime of technology module $`m`$ of technology $`i`$ in sub-sector $`j`$ $`(a)`$
$`n^{cap}_{t+1, i, m, j} = n^{cap}_{t, i, m, j} + n^{ext}_{t+1, i, m, j} - n^{dec}_{t+1, i, m, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{cap}_{t, i, m, j} = n^{cap1}_{t, i, m, j} + n^{cap2}_{t, i, m, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{cap2}_{t, i, m, j} = n^{cap}_{t, i, m, j} - n^{prod}_{t, i, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{cap2}_{t+1, i, 1, j} \geq n^{cap2}_{t, i, 1, j} - n^{sdec}_{t+1, i, 1, j} \; \forall (t,i,j) \in (T,I,J)`$
$`\sum_{i, j}(n^{cap2}_{t, i, 1, j}) \leq 0.01 \times \sum_{i, j}(n^{prod}_{t, i, j}) \; \forall t \in T`$
$`n^{dec}_{t, i, m, j} = n^{sdec}_{t, i, m, j} + n^{xdec}_{t, i, m, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{xdec}_{t+life_{i, m, j}, i, m, j} = n^{ext}_{t, i, m, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{prod}_{t, i, j} \leq n^{cap1}_{t, i, m, j} \; \forall (t,i,m,j) \in (T,I,M,J)`$
$`n^{prod}_{t, i, j} = n^{cap1}_{t, i, 1, j} \; \forall (t,i,j) \in (T,I,J)`$
### 2.3 Heat production:
This regulates the share of production of the hybrid heat production concepts.
* $`pm^{Bio}_{t, i, j} = `$ solid biomass share per technology $`i`$ at time $`t`$ and for sub-sector $`j`$ $`(\%)`$
* $`pm^{Gas}_{t, i, j} = `$ natural gas/biogas/coal share per technology $`i`$ at time $`t`$ and for sub-sector $`j`$ $`(\%)`$
* $`pm^{nonBio}_{t, i, j} = `$ non biomass, renewable share per technology $`i`$ at time $`t`$ and for sub-sector $`j`$ $`(\%)`$
$`n^{prod}_{t, i, j} \times pm^{Bio}_{t, i, j} \times d^{cap}_{t, j} = \sum_{b}(\pi^{Bio}_{t, i, j, b}) \; \forall (t,i,j) \in (T,I,J)`$
$`n^{prod}_{t, i, j} \times pm^{Gas}_{t, i, j} \times d^{cap}_{t, j} = \sum_{b}(\pi^{Gas}_{t, i, j, b}) \; \forall (t,i,j) \in (T,I,J)`$
$`n^{prod}_{t, i, j} \times pm^{nonBio}_{t, i, j} \times d^{cap}_{t, j} = \pi^{nonBio}_{t, i, j} \; \forall (t,i,j) \in (T,I,J)`$
$`\pi_{t, i, j} = \sum_{b}(\pi^{Bio}_{t, i, j, b}) + \sum_{b}(\pi^{Gas}_{t, i, j, b}) + \pi^{nonBio}_{t, i, j} \; \forall (t,i,j) \in (T,I,J)`$
### 2.4 Biomass consumption
*<fontcolor='blue'>$`bc_{t, i, j, b} = `$ actual consumed biomass in the technology $`i`$ at time $`t`$ in sub-sector $`j`$ and from biomass product $`b`$ $`(GJ)`$</font>
* $`ef^{Bio}_{t, i, j} = `$ conversion efficiency of solid biomass technologies $`i`$ at time $`t`$ in sub-sector $`j`$ $`(\%)`$
* $`ef^{Gas}_{t, i, j} = `$ conversion efficiency of natural gas/biogas/coal technologies $`i`$ at time $`t`$ in sub-sector $`j`$ $`(\%)`$
* $`ef^{Methan}_{t, b} = `$ conversion efficiency of biomethane feed-in plant at time $`t`$ for biomass product $`b`$ $`(\%)`$
* $`ba_{t, bm} = `$ available biomass from residues $`bmwaste`$ $`(GJ)`$ and available land for cultivation $`(ha)`$ for time $`t`$ and biomass type $`bm`$
* $`ba^{maxw}_{t} = `$ maximal allowed biomass usage from waste $`(\%)`$ at time $`t`$ = represents the biomass pre-allocation for heating
Consumed biomass equals the heat consumption divided by degree of efficiency.
$`bc_{t, i, j, b} = \frac{\pi^{Bio}_{t, i, j, b}}{ef^{Bio}_{t, i, j}} + \frac{\pi^{Gas}_{t, i, j, b}}{ef^{Gas}_{t, i, j} \times ef^{Methan}_{t, b}} \; \forall (t,i,j,b) \in (T,I,J,B)`$
Technology 'Gas boiler+Log wood stove+ST' can use different biomass products for different components. This equation regulates this issue.
Depending on the scenario, the consumed biomass from residues is limited to a certain degree of percentage (pre-allocation of biomass to the heat sector).
$`\sum_{bm^{waste}(bm)}(ba_{t, bm} \times ba^{maxw}_{t}) \geq \sum_{i,j,b^{waste}(b)}(bc_{t, i, j, b}) \; \forall t \in T`$
### 2.5 Conversion of biomass types (potential) to biomass products (price)
*<fontcolor='blue'>$`bu_{t, b, bm} = `$ actual converted biomass from biotype $`bm`$ to biomass product $`b`$ at time $`t`$ $`(GJ)`$</font>
* $`ba^{maxc}_{t} = `$ maximal allowed biomass usage from cultivation at time $`t`$ = represents the biomass/available land pre-allocation for heating $`(\%)`$
* $`yield_{t, b} = `$ yield of cultivation products $`b`$ at time $`t`$ $`(GJ/ha)`$
Which residue biomass types can be used for which biomass products.
*<fontcolor='blue'>$`ghgf_{t, i, j, b} = `$ actual feedstock GHG emissions at time $`t`$ for technology $`i`$, sub-sector $`j`$ and biomass product $`b`$ $`(t)`$</font>
*<fontcolor='blue'>$`ghgt_{t, i, j} = `$ actual technology GHG emissions at time $`t`$ for technology $`i`$ and sub-sector $`j`$ $`(t)`$</font>
* $`ghgr_{t, i, j} = `$ GHG emission factor per technology $`i`$ excluding feedstock emissions for time $`t`$ and sub-sector $`j`$ $`(t/GJ)`$
* $`alloc_{i, j} = `$ allocation factor of CHP emissions to the heat sector for technology $`i`$ and sub-sector $`j`$
* $`ghgmax_{t} = `$ GHG emission budget for time $`t`$ $`(t)`$
$`ghgf_{t, i, j, b} = alloc_{i, j} \times ghgfeed_{b} \times bc_{t, i, j, b} \; \forall (t,i,j,b) \in (T,I,J,B)`$
$`ghgt_{t, i, j} = alloc_{i, j} \times ghgr_{t, i, j} \times \pi_{t, i, j} \; \forall (t,i,j) \in (T,I,J)`$
$`ghgmax_{t} \geq \sum_{i, j, b}(ghgf_{t, i, j, b}) + \sum_{i, j}(ghgt_{t, i, j}) \; \forall t \in T`$
### 2.9 Consumer behavior
A few sub-sectors were further divided into consumer segments to represent consumer behavior by applying intangible costs. This further seperation is defined here. E.g., the demand within the comsumer clusters needs to equal the production in the clusters, the sum of production in clusters equals the production in the sub-sector.
* $`dBeh_{t, j, c} = `$ heat demand in the consumer clusters $`c`$ for time $`t`$ and sub-sector $`j`$ $`(GJ)`$