zen_garden.model.technology.conversion_technology

Class defining the parameters, variables, and constraints of the conversion technologies. The class takes the abstract optimization model as an input and adds parameters, variables, and constraints of the conversion technologies.

Classes

ConversionTechnology(tech, optimization_setup)

Class defining conversion technologies.

ConversionTechnologyRules(optimization_setup)

Rules for the ConversionTechnology class.

class zen_garden.model.technology.conversion_technology.ConversionTechnology(tech, optimization_setup)

Class defining conversion technologies.

__init__(tech, optimization_setup)

Init conversion technology object.

Parameters:
  • tech – name of added technology

  • optimization_setup – The OptimizationSetup the element is part of

calculate_capex_of_single_capacity(capacity, index)

This method calculates the annualized capex of a single existing capacity.

Parameters:
  • capacity – existing capacity of technology

  • index – index of capacity specifying node and time

Returns:

annualized capex of a single existing capacity

classmethod calculate_capex_pwa_breakpoints_values(optimization_setup, set_pwa)

Calculates breakpoints and function values for piecewise affine constraint. :param optimization_setup: The OptimizationSetup the element is part of. :param set_pwa: Set of variable indices in capex approximation for :param which pwa is performed.:

Returns:

Dict of pwa breakpoint values indexed by variable indices. pwa_values: Dict of pwa function values indexed by variable indices.

Return type:

pwa_breakpoints

classmethod construct_constraints(optimization_setup)

Constructs the Constraints of the class <ConversionTechnology>.

Parameters:

optimization_setup – optimization setup

classmethod construct_params(optimization_setup)

Constructs the pe.Params of the class <ConversionTechnology>.

Parameters:

optimization_setup – The OptimizationSetup the element is part of

classmethod construct_sets(optimization_setup)

Constructs the pe.Sets of the class <ConversionTechnology>.

Parameters:

optimization_setup – The OptimizationSetup the element is part of

classmethod construct_vars(optimization_setup)

Constructs the pe.Vars of the class <ConversionTechnology>.

Parameters:

optimization_setup – The OptimizationSetup the element is part of

convert_to_fraction_of_capex()

This method retrieves the total capex and converts it to annualized capex.

classmethod get_capex_all_elements(optimization_setup, index_names=None)

Similar to Element.get_attribute_of_all_elements but only for capex. If select_pwa, extract pwa attributes, otherwise linear.

Parameters:
  • optimization_setup – The OptimizationSetup the element is part of

  • index_names – list of index names

Returns:

dict_of_attributes: returns dict of attribute values

get_conversion_factor()

Retrieves and stores conversion_factor.

store_carriers()

Retrieves and stores information on reference, input and output carriers.

store_input_data()

Retrieves and stores input data for element as attributes.

Each Child class overwrites method to store different attributes.

class zen_garden.model.technology.conversion_technology.ConversionTechnologyRules(optimization_setup)

Rules for the ConversionTechnology class.

__init__(optimization_setup)

Inits the rules for a given EnergySystem.

Parameters:

optimization_setup – The OptimizationSetup the element is part of

constraint_capacity_capex_coupling()

Couples capacity variables based on modeling technique.

\[\Delta S_{h,p,y} = \Delta S_{h,p,y}^\mathrm{approx}\]

\(\Delta S_{h,p,y}\): capacity addition of the technology \(h\) at node \(p\) in year \(y\)

\(\Delta S_{h,p,y}^\mathrm{approx}\): approximated capacity addition of the technology \(h\) at node \(p\) in year \(y\)

constraint_capacity_factor_conversion()

Load is limited by the installed capacity and the maximum load factor.

\[G_{i,n,t}^\mathrm{r} \leq m^{\mathrm{max}}_{i,n,t}S_{i,n,y}\]

\(m_{i,n,t}^{\mathrm{max}}\): maximum load factor of the technology \(i\) at node \(n\) in time step \(t\)

\(S_{i,n,y}\): installed capacity of the technology \(i\) at node \(n\) in year \(y\)

\(G_{i,n,t}^\mathrm{r}\): reference carrier flow of the technology \(i\) at node \(n\) in time step \(t\)

constraint_carrier_conversion()

Conversion factor between reference carrier and dependent carrier.

\[G^\mathrm{d}_{i,n,t} = \eta_{i,c,n,y}G^\mathrm{r}_{i,n,t}\]

\(G^\mathrm{d}_{i,n,t}\): dependent carrier flow of the technology \(i\) at node \(n\) in time step \(t\)

\(\eta_{i,c,n,y}\): conversion factor of the technology \(i\) from reference carrier to dependent carrier \(c\) at node \(n\) in year \(y\)

\(G^\mathrm{r}_{i,n,t}\): reference carrier flow of the technology \(i\) at node \(n\) in time step \(t\)

constraint_linear_capex()

If capacity and capex have a linear relationship.

\[A_{h,p,y}^{approximation} = \alpha_{h,n,y} \Delta S_{h,p,y}^{approx}\]

\(A_{h,p,y}^{approx}\): approximated capex of the technology \(h\) at node \(p\) in year \(y\)

\(\alpha_{h,n,y}\): specific capex of the technology \(h\) at node \(n\) in year \(y\)

\(\Delta S_{h,p,y}^{approx}\): approximated capacity of the technology \(h\) at node \(p\) in year \(y\)

constraint_minimum_full_load_hours()

Sets minimum full load hours for each unit.

This constraint requires that a minimum number of full_load_hours be met over the course of year. Full load hours are the amount of hours that a conversion technology would need to run at full capacity in order to produce an output equivalent to its yearly total. The constraint can be used to require a conversion technology to always operate at baseload capacity. This can be helpful for technologies where ramping is not possible or economical for reasons not captured by the model.

Mathematical formulation:

\[\sum_t G_{i,n,t,y}^\mathrm{r} \geq \bigg( \sum_{t \in\mathcal{T}} \tau_t \bigg) \underline{\pi}_{i,n,y} S_{i,n,y} \qquad \forall i,n,y\]

The sum simply yields the unaggregated time steps per year, set in the systems.json file.

Constraint parameters:

  • \(\underline{\pi}_{i,n,y}\): minimum number of full load hours, expressed as a fraction of the unaggregated time steps per year. Takes separate values for each technology \(i\) at node \(n\) and planning period \(y\)

Constraint variables:

  • \(S_{i,n,y}\): installed capacity of the technology \(i\) at node \(n\) in planning period \(y\)

  • \(G_{i,n,t}^\mathrm{r}\): reference carrier flow of the technology \(i\) at node \(n\) in time step \(t\) in planning period \(y\)

constraint_opex_emissions_technology_conversion()

Calculate opex and carbon emissions of each technology.

\[ \begin{align}\begin{aligned}O_{h,p,t}^\mathrm{t} = \beta_{h,p,t} G_{i,n,t}^\mathrm{r}\\\theta_{h,p,t} = \epsilon_h G_{i,n,t}^\mathrm{r}\end{aligned}\end{align} \]

\(O_{h,p,t}^\mathrm{t}\): variable opex of the technology \(h\) at node \(p\) in time step \(t\)

\(\beta_{h,p,t}\): specific variable opex of the technology \(h\) at node \(p\) in time step \(t\)

\(G_{i,n,t}^\mathrm{r}\): reference carrier flow of the technology \(i\) at node \(n\) in time step \(t\)

\(\theta^{\mathrm{tech}}_{h,p,t}\): carbon emissions of operating the technology \(h\) at node \(p\) in time step \(t\)

\(\epsilon_h\): carbon intensity of the reference carrier of technology \(h\)