GithubHelp home page GithubHelp logo

Comments (2)

gnawin avatar gnawin commented on July 28, 2024

Different levels of detail

Design  Feature 1 Feature 2
Simplest Total capacity Total flow (not considering vintage efficiencies)
Complicated Vintage capacity Vintage flow (directly considering vintage efficiencies)
Compact Vintage capacity Total flow (indirectly considering vintage efficiencies)

By vintage efficiencies, we mean both production efficiencies (represented by cost parameters in the obj) and conversion efficiencies (used in conversion balances).

The above table serves as a summary and will be elaborated later.

Design 1: simplest formulation

A year index is added to all the existing variables and parameters, and sets for temporal structures. It is needed for the economic representation.

This means, as shown by the below table, we will replace all $k$ with $k_y$, $\mathcal{K}$ with $\mathcal{K_y}$, $b_k$ with $b_{k_y}$, $\mathcal{B_k}$ with $\mathcal{B_{k_y}}$.

For brevity, the rest of the changes in definitions are omitted. We will also update all sets for assets and flows, as they can change per year.

Sets for Temporal Structures

Name Description Elements Superset Notes
$\mathcal{Y}$ Milestone years $y \in \mathcal{Y}$ $\mathcal{Y} \subset \mathbb{N}$
$\mathcal{Y}_a$ In-commission milestone years for asset $a$ $y \in \{\mathcal{Y}_a: p^{\text{com year}}_a \le y \le p^{\text{decom year}}_a \}$ $\mathcal{Y}_a \subseteq \mathcal{Y}$
$\mathcal{Y}_y$ Years before milestone year $y$ $i \in \{\mathcal{Y}_y: i \le y \}$ $\mathcal{Y}_y \subseteq \mathcal{Y}$
$\mathcal{Y}_{a,y}$ In-commission milestone years before milestone years $y$ for asset $a$ $i \in \{\mathcal{Y}_{a,y}: p^{\text{com year}}_a \le i \le y \}$ $\mathcal{Y}_a \subseteq \mathcal{Y}$
$\mathcal{K_y}$ Representative periods (rp) within year $y$ $k_y \in \mathcal{K_y}$ $\mathcal{K_y} \subset \mathbb{N}$ $\mathcal{K_y}$ does not have to be a subset of $\mathcal{P}$
$\mathcal{B}_{k_y}$ Timesteps blocks within a representative period $k_y$ within year $y$ $b_{k_y} \in \mathcal{B}_{k_y}$ $\mathcal{B}_{k_y}$ is a partition of timesteps in a representative period $k_y$

Parameters

omitted for now

Variables

omitted for now

Objective function

$$\begin{aligned} \text{{minimize}} \quad & assets\_investment\_cost + assets\_fixed\_cost \\ & flows\_investment\_cost + flows\_fixed\_cost\\\ & + flows\_variable\_cost \end{aligned}$$

To be added:

  • fixed cost for storage energy
  • weights see next comment
  • decommission for existing capacities
  • decommission variables
$$\begin{aligned} assets\_investment\_cost &= \sum_{y \in \mathcal{Y} } \bigg( \sum_{a \in \mathcal{A}_y^{\text{i}} } p^{\text{inv cost}}_{a, y} \cdot p^{\text{capacity}}_{a, y} \cdot v^{\text{inv}}_{a, y} \\ &+ \sum_{a \in \mathcal{A}_y^{\text{se}} \cap \mathcal{A}_y^{\text{i}} } p^{\text{inv cost energy}}_{a, y} \cdot p^{\text{energy capacity}}_{a, y} \cdot v^{\text{inv energy}}_{a, y} \bigg) \\\ \\\ flows\_investment\_cost &= \sum_{y \in \mathcal{Y} } \sum_{ f \in \mathcal{F}_y^{\text{ti}} } p^{\text{inv cost}}_{f, y} \cdot p^{\text{capacity}}_{f, y} \cdot v^{\text{inv}}_{f, y} \\\ flows\_fixed\_cost & = \sum_{ (f,y) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f) } p^{\text{fixed cost}}_{f, y} \cdot ( v^{\text{accumulated init}}_{f, y} + p^{\text{capacity}}_{f, y} \cdot v^{\text{accumulated}}_{f, y}) \\\ flows\_variable\_cost &= \sum_{ y \in \mathcal{Y} } \sum_{f \in \mathcal{F}_{y}} \sum_{k_y \in \mathcal{K_y}} \sum_{b_{k_y} \in \mathcal{B_{k_y}}} p^{\text{rp weight}}_{k_y} \cdot p^{\text{variable cost}}_{f, y} \cdot p^{\text{duration}}_{b_{k_y}} \cdot v^{\text{flow}}_{f, k_y, b_{k_y}} \end{aligned}$$ $$\begin{aligned} assets\_fixed\_cost & = \sum_{ (a, y) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a ) } p^{\text{fixed cost}}_{a, y} \cdot \left(v^{\text{accumulated init}}_{a, y} + p^{\text{capacity}}_{a, y} \cdot v^{\text{accumulated}}_{a, y} \right) \end{aligned}$$

Note we use lots of tuples for summation because those tuples are the indice domains of the relevant variables, which is needed for implementation. Otherwise you would get an variable "undefined" error. Maybe in the documentation it is better to use simpler summations, i.e., to sum over the entire sets instead of subsets.

$$\begin{aligned} v^{\text{accumulated}}_{a, y} = \sum_{i \in \mathcal{Y}_y } \bigg( v^{\text{inv}}_{a, i} - v^{\text{decom inv}}_{a, i} \bigg) \quad \forall (a,y) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a) \\\ v^{\text{accumulated}}_{f, y} = \sum_{i \in \mathcal{Y}_y } \bigg( v^{\text{inv}}_{f, i} - v^{\text{decom inv}}_{f, i} \bigg) \quad \forall (f,y) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f) \end{aligned}$$ $$\begin{aligned} v^{\text{accumulated init}}_{a, y} = \bigg( p^{\text{init capacity}}_{a, y} - \sum_{i \in \mathcal{Y}_y} v^{\text{decom init}}_{a, i} \bigg) \quad \forall (a,y) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a)\\\ v^{\text{accumulated init}}_{f, y} = \bigg( p^{\text{init capacity}}_{f, y} - \sum_{i \in \mathcal{Y}_y} v^{\text{decom init}}_{f, i} \bigg) \quad \forall (f,y) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f) \end{aligned}$$

Constraints

We would have to change every constraint since we are adding indices, but the two below are the most relevant.

Maximum Output Flows Limit

For conversion, producer, and storage without binary method

$$\begin{aligned} \sum_{f \in \mathcal{F}^{\text{out}}_{a, y}} v^{\text{flow}}_{f,k_y,b_{k_y}} \leq p^{\text{availability profile}}_{a,k_y,b_{k_y}} \cdot \left(v^{\text{accumulated init}}_{a, y} + p^{\text{capacity}}_{a, y} \cdot v^{\text{accumulated}}_{a, y} \right) \quad \\ \forall (a, y) \in \bigg(\mathcal{A}_y^{\text{cv}} \cup \left(\mathcal{A}_y^{\text{s}} \setminus \mathcal{A}_y^{\text{sb}} \right) \cup \mathcal{A}_y^{\text{p}}, \mathcal{Y}_a \bigg), \forall k_y \in \mathcal{K_y},\forall b_{k_y} \in \mathcal{B}_{k_y} \end{aligned}$$

Balance Constraint for Conversion Assets

$$\begin{aligned} \sum_{f \in \mathcal{F}^{\text{in}}_{a,y}} p^{\text{eff}}_{f,y} \cdot v^{\text{flow}}_{f,k_y,b_{k_y}} = \sum_{f \in \mathcal{F}^{\text{out}}_{a,y}} \frac{v^{\text{flow}}_{f,k_y,b_{k_y}}}{p^{\text{eff}}_{f,y}} \quad \forall (a, y) \in \left( \mathcal{A}_y^{\text{cv}}, \mathcal{Y}_a \right), \forall k_y \in \mathcal{K_y},\forall b_{k_y} \in \mathcal{B_{k_y}} \end{aligned}$$

Design 2: complicated formulation

Objective function

To be added:

  • fixed cost for storage energy
  • weights see next comment
  • decommission
$$\begin{aligned} assets\_fixed\_cost & = \sum_{ (a,y) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a) } \sum_{i \in \mathcal{Y}_y } p^{\text{fixed cost}}_{a, y, i} \cdot \left(v^{\text{accumulated init}}_{a, y, v} + p^{\text{capacity}}_{a, y, v} \cdot v^{\text{accumulated}}_{a, y, v} \right) \\\ assets\_fixed\_cost & = \sum_{ (f,y) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f) } \sum_{i \in \mathcal{Y}_y } p^{\text{fixed cost}}_{f, y, i} \cdot \left(v^{\text{accumulated init}}_{f, y, v} + p^{\text{capacity}}_{f, y, v} \cdot v^{\text{accumulated}}_{f, y, v} \right) \\\ flows\_variable\_cost &= \sum_{y \in \mathcal{Y} } \sum_{f \in \mathcal{F}_{y}} \sum_{v \in \mathcal{Y}_y} \sum_{k_y \in \mathcal{K_y}} \sum_{b_{k_y} \in \mathcal{B_{k_y}}} p^{\text{rp weight}}_{k_y} \cdot p^{\text{variable cost}}_{f, y, v} \cdot p^{\text{duration}}_{b_{k_y}} \cdot v^{\text{flow}}_{f, v, k_y, b_{k_y}} \end{aligned}$$ $$\begin{aligned} v^{\text{accumulated init}}_{a, y, v} = p^{\text{init}}_{a, v} - \sum_{i \in \mathcal{Y}_{a,y}} v^{\text{decom init}}_{a, i, v} \quad \forall (a, y, v) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a, \mathcal{Y}_y) \\\ v^{\text{accumulated}}_{a, y, v} = v^{\text{inv}}_{a, v} - \sum_{i \in \mathcal{Y}_{a,y}} v^{\text{decom inv}}_{a, i, v} \quad \forall (a, y, v) \in (\mathcal{A}_y^{\text{i}}, \mathcal{Y}_a, \mathcal{Y}_y) \\\ v^{\text{accumulated}}_{f, y, v} = v^{\text{inv}}_{f, y, v} - \sum_{i \in \mathcal{Y}_{f,y}} v^{\text{decom inv}}_{f, i, v} \quad \forall (f, y, v) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f, \mathcal{Y}_y ) \\\ v^{\text{accumulated init}}_{f, y, v} = p^{\text{init}}_{f, y, v} - \sum_{i \in \mathcal{Y}_{f,y}} v^{\text{decom inv}}_{f, i, v} \quad \forall (f, y, v) \in (\mathcal{F}_y^{\text{ti}}, \mathcal{Y}_f, \mathcal{Y}_y ) \end{aligned}$$

Constraints

Maximum Output Flows Limit

For conversion, producer, and storage without binary method

$$\begin{aligned} \sum_{f \in \mathcal{F}^{\text{out}}_{a, y}} v^{\text{flow}}_{f, v, k_y,b_{k_y}} \leq p^{\text{availability profile}}_{a, v, k_y,b_{k_y}} \cdot \left(v^{\text{accumulated init}}_{a, y, v} + p^{\text{capacity}}_{a, y, v} \cdot v^{\text{accumulated}}_{a, y, v} \right) \quad \\ \forall (a,y,v) \in \bigg( \mathcal{A}_y^{\text{cv}} \cup \left(\mathcal{A}_y^{\text{s}} \setminus \mathcal{A}_y^{\text{sb}} \right) \cup \mathcal{A}_y^{\text{p}}, \mathcal{Y}_a, \mathcal{Y}_y \bigg) \forall k_y \in \mathcal{K_y},\forall b_{k_y} \in \mathcal{B}_{k_y} \end{aligned}$$

Balance Constraint for Conversion Assets

$$\begin{aligned} \sum_{f \in \mathcal{F}^{\text{in}}_{a,y}} p^{\text{eff}}_{f,y,v} \cdot v^{\text{flow}}_{f, v, k_y,b_{k_y}} = \sum_{f \in \mathcal{F}^{\text{out}}_{a,y}} \frac{v^{\text{flow}}_{f,v,k_y,b_{k_y}}}{p^{\text{eff}}_{f,y,v}} \quad \forall (a,y,v) \in \bigg( \mathcal{A}_y^{\text{cv}}, \mathcal{Y}_a, \mathcal{Y}_y \bigg) \forall k_y \in \mathcal{K_y},\forall b_{k_y} \in \mathcal{B_{k_y}} \end{aligned}$$

Design 3: compact formulation

Objective function

$assets\_fixed\_cost$ and $flows\_fixed\_cost$ are the same with Design 2 (and thus so is accumulated capacity), $flows\_variable\_cost$ is the same with Design 1.

Here $p_{f, y}^{\text{variable cost}}$ should be carefully chosen to reflect the efficiencies for vintage years.

$$\begin{aligned} v^{\text{accumulated}}_{a, y, v} = v^{\text{inv}}_{a, v} \quad \forall a \in \mathcal{A}_y^{\text{i}}, \forall (y,v) \in \{\mathcal{Y}, \mathcal{Y_y} \} \\\ v^{\text{accumulated}}_{f, y,v} = v^{\text{inv}}_{f, v} \quad \forall f \in \mathcal{F}_y^{\text{ti}}, \forall (y,v) \in \{\mathcal{Y}, \mathcal{Y_y} \} \end{aligned}$$

Constraints

Maximum Output Flows Limit

For conversion, producer, and storage without binary method

$$\begin{aligned} \sum_{f \in \mathcal{F}^{\text{out}}_{a, y}} v^{\text{flow}}_{f, k_y,b_{k_y}} \leq \sum_{i=\min\{v\in \mathcal{Y_y}\}}^{y} p^{\text{availability profile}}_{a, v, k_y,b_{k_y}} \cdot \left(p^{\text{init capacity}}_{a, y, v} + p^{\text{capacity}}_{a, y, v} \cdot v^{\text{accumulated}}_{a, y, v} \right) \quad \\ \forall a \in \mathcal{A}_y^{\text{cv}} \cup \left(\mathcal{A}_y^{\text{s}} \setminus \mathcal{A}_y^{\text{sb}} \right) \cup \mathcal{A}_y^{\text{p}}, \forall k_y \in \mathcal{K_y},\forall b_{k_y} \in \mathcal{B}_{k_y}, \forall y \in \mathcal{Y} \end{aligned}$$

Balance Constraint for Conversion Assets

This constraint is the same as in Design 1. However, since it is a compact formulation from Design 2, we should carefully choose $p_{f,y}^{\text{eff}}$, e.g., a conservative choice $p_{f,y}^{\text{eff}} = \min p_{f,y,v}^{\text{eff}}$

from tulipaenergymodel.jl.

gnawin avatar gnawin commented on July 28, 2024

Economic representation

For economic representation we modify the cost parameters in the objective function.

Investment costs

Use this parameter instead of $p_{a, y}^{\text{inv cost}}$ for the investment cost
$p_{a, y}^{\text{discounted inv cost}}=\frac{1}{(1+p^{\text{discount rate}})^{y}}(p_{a, y}^{\text{inv cost}}-p_{a, y}^{\text{salvage value}})\quad \forall a \in \mathcal{A}_y^{\text{i}}, \forall y \in \mathcal{Y}$

where salvage value is

$$p^{\text{salvage value}}_{a, y} = p^{\text{annualized inv cost}}_{a, y} \sum_{i=y+1}^{y + p^{\text{tech lifetime}}_{a, y} - 1} \frac{1}{(1 + p^{\text{WACC}}_{a, y})^{i - y} } \quad \forall a \in \mathcal{A}_y^{\text{i}}, \forall y \in \mathcal{Y}$$

and where annualized cost is

$$p^{\text{annualized inv cost}}_{a, y} = \frac{p^{\text{WACC}}_{a, y}}{ (1+p^{\text{WACC}}_{a, y}) \cdot \bigg( 1 - \frac{1}{ (1+p^{\text{WACC}}_{a, y})^{p^{\text{tech lifetime}}_{a, y}} } \bigg) } p^{\text{inv cost}}_{a, y} \quad \forall a \in \mathcal{A}_y^{\text{i}}, \forall y \in \mathcal{Y}$$

Weights for operational cost parameters

Multiply this weight that only depends on operation year $y$ by the cost parameters
$p_{y}^{\text{discounting}}=\frac{1}{(1+p^{\text{discount rate}})^{y}} p^{\text{milestone weight}}_{y}\quad \forall y \in \mathcal{Y}$

from tulipaenergymodel.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.