flixopt 2.1.9__py3-none-any.whl → 2.1.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flixopt might be problematic. Click here for more details.

Files changed (41) hide show
  1. flixopt/components.py +1 -1
  2. flixopt/flow_system.py +2 -1
  3. flixopt/io.py +6 -4
  4. flixopt/results.py +1 -1
  5. {flixopt-2.1.9.dist-info → flixopt-2.1.11.dist-info}/METADATA +4 -5
  6. flixopt-2.1.11.dist-info/RECORD +26 -0
  7. flixopt-2.1.11.dist-info/top_level.txt +1 -0
  8. docs/examples/00-Minimal Example.md +0 -5
  9. docs/examples/01-Basic Example.md +0 -5
  10. docs/examples/02-Complex Example.md +0 -10
  11. docs/examples/03-Calculation Modes.md +0 -5
  12. docs/examples/index.md +0 -5
  13. docs/faq/contribute.md +0 -61
  14. docs/faq/index.md +0 -3
  15. docs/images/architecture_flixOpt-pre2.0.0.png +0 -0
  16. docs/images/architecture_flixOpt.png +0 -0
  17. docs/images/flixopt-icon.svg +0 -1
  18. docs/javascripts/mathjax.js +0 -18
  19. docs/user-guide/Mathematical Notation/Bus.md +0 -33
  20. docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md +0 -132
  21. docs/user-guide/Mathematical Notation/Flow.md +0 -26
  22. docs/user-guide/Mathematical Notation/InvestParameters.md +0 -3
  23. docs/user-guide/Mathematical Notation/LinearConverter.md +0 -21
  24. docs/user-guide/Mathematical Notation/OnOffParameters.md +0 -3
  25. docs/user-guide/Mathematical Notation/Piecewise.md +0 -49
  26. docs/user-guide/Mathematical Notation/Storage.md +0 -44
  27. docs/user-guide/Mathematical Notation/index.md +0 -22
  28. docs/user-guide/Mathematical Notation/others.md +0 -3
  29. docs/user-guide/index.md +0 -124
  30. flixopt-2.1.9.dist-info/RECORD +0 -56
  31. flixopt-2.1.9.dist-info/top_level.txt +0 -5
  32. pics/architecture_flixOpt-pre2.0.0.png +0 -0
  33. pics/architecture_flixOpt.png +0 -0
  34. pics/flixOpt_plotting.jpg +0 -0
  35. pics/flixopt-icon.svg +0 -1
  36. pics/pics.pptx +0 -0
  37. scripts/extract_release_notes.py +0 -45
  38. scripts/gen_ref_pages.py +0 -54
  39. tests/ressources/Zeitreihen2020.csv +0 -35137
  40. {flixopt-2.1.9.dist-info → flixopt-2.1.11.dist-info}/WHEEL +0 -0
  41. {flixopt-2.1.9.dist-info → flixopt-2.1.11.dist-info}/licenses/LICENSE +0 -0
@@ -1,18 +0,0 @@
1
- window.MathJax = {
2
- tex: {
3
- inlineMath: [['$', '$'], ['\\(', '\\)']],
4
- displayMath: [['$$', '$$'], ['\\[', '\\]']],
5
- processEscapes: true,
6
- tags: 'all'
7
- },
8
- options: {
9
- skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
10
- }
11
- };
12
-
13
- document$.subscribe(() => {
14
- MathJax.startup.output.clearCache()
15
- MathJax.typesetClear()
16
- MathJax.texReset()
17
- MathJax.typesetPromise()
18
- })
@@ -1,33 +0,0 @@
1
- A Bus is a simple nodal balance between its incoming and outgoing flow rates.
2
-
3
- $$ \label{eq:bus_balance}
4
- \sum_{f_\text{in} \in \mathcal{F}_\text{in}} p_{f_\text{in}}(\text{t}_i) =
5
- \sum_{f_\text{out} \in \mathcal{F}_\text{out}} p_{f_\text{out}}(\text{t}_i)
6
- $$
7
-
8
- Optionally, a Bus can have a `excess_penalty_per_flow_hour` parameter, which allows to penaltize the balance for missing or excess flow-rates.
9
- This is usefull as it handles a possible ifeasiblity gently.
10
-
11
- This changes the balance to
12
-
13
- $$ \label{eq:bus_balance-excess}
14
- \sum_{f_\text{in} \in \mathcal{F}_\text{in}} p_{f_ \text{in}}(\text{t}_i) + \phi_\text{in}(\text{t}_i) =
15
- \sum_{f_\text{out} \in \mathcal{F}_\text{out}} p_{f_\text{out}}(\text{t}_i) + \phi_\text{out}(\text{t}_i)
16
- $$
17
-
18
- The penalty term is defined as
19
-
20
- $$ \label{eq:bus_penalty}
21
- s_{b \rightarrow \Phi}(\text{t}_i) =
22
- \text a_{b \rightarrow \Phi}(\text{t}_i) \cdot \Delta \text{t}_i
23
- \cdot [ \phi_\text{in}(\text{t}_i) + \phi_\text{out}(\text{t}_i) ]
24
- $$
25
-
26
- With:
27
-
28
- - $\mathcal{F}_\text{in}$ and $\mathcal{F}_\text{out}$ being the set of all incoming and outgoing flows
29
- - $p_{f_\text{in}}(\text{t}_i)$ and $p_{f_\text{out}}(\text{t}_i)$ being the flow-rate at time $\text{t}_i$ for flow $f_\text{in}$ and $f_\text{out}$, respectively
30
- - $\phi_\text{in}(\text{t}_i)$ and $\phi_\text{out}(\text{t}_i)$ being the missing or excess flow-rate at time $\text{t}_i$, respectively
31
- - $\text{t}_i$ being the time step
32
- - $s_{b \rightarrow \Phi}(\text{t}_i)$ being the penalty term
33
- - $\text a_{b \rightarrow \Phi}(\text{t}_i)$ being the penalty coefficient (`excess_penalty_per_flow_hour`)
@@ -1,132 +0,0 @@
1
- ## Effects
2
- [`Effects`][flixopt.effects.Effect] are used to allocate things like costs, emissions, or other "effects" occurring in the system.
3
- These arise from so called **Shares**, which originate from **Elements** like [Flows](Flow.md).
4
-
5
- **Example:**
6
-
7
- [`Flows`][flixopt.elements.Flow] have an attribute called `effects_per_flow_hour`, defining the effect amount of per flow hour.
8
- Associated effects could be:
9
- - costs - given in [€/kWh]...
10
- - ...or emissions - given in [kg/kWh].
11
- -
12
- Effects are allocated separately for investments and operation.
13
-
14
- ### Shares to Effects
15
-
16
- $$ \label{eq:Share_invest}
17
- s_{l \rightarrow e, \text{inv}} = \sum_{v \in \mathcal{V}_{l, \text{inv}}} v \cdot \text a_{v \rightarrow e}
18
- $$
19
-
20
- $$ \label{eq:Share_operation}
21
- s_{l \rightarrow e, \text{op}}(\text{t}_i) = \sum_{v \in \mathcal{V}_{l,\text{op}}} v(\text{t}_i) \cdot \text a_{v \rightarrow e}(\text{t}_i)
22
- $$
23
-
24
- With:
25
-
26
- - $\text{t}_i$ being the time step
27
- - $\mathcal{V_l}$ being the set of all optimization variables of element $e$
28
- - $\mathcal{V}_{l, \text{inv}}$ being the set of all optimization variables of element $e$ related to investment
29
- - $\mathcal{V}_{l, \text{op}}$ being the set of all optimization variables of element $e$ related to operation
30
- - $v$ being an optimization variable of the element $l$
31
- - $v(\text{t}_i)$ being an optimization variable of the element $l$ at timestep $\text{t}_i$
32
- - $\text a_{v \rightarrow e}$ being the factor between the optimization variable $v$ to effect $e$
33
- - $\text a_{v \rightarrow e}(\text{t}_i)$ being the factor between the optimization variable $v$ to effect $e$ for timestep $\text{t}_i$
34
- - $s_{l \rightarrow e, \text{inv}}$ being the share of element $l$ to the investment part of effect $e$
35
- - $s_{l \rightarrow e, \text{op}}(\text{t}_i)$ being the share of element $l$ to the operation part of effect $e$
36
-
37
- ### Shares between different Effects
38
-
39
- Furthermore, the Effect $x$ can contribute a share to another Effect ${e} \in \mathcal{E}\backslash x$.
40
- This share is defined by the factor $\text r_{x \rightarrow e}$.
41
-
42
- For example, the Effect "CO$_2$ emissions" (unit: kg)
43
- can cause an additional share to Effect "monetary costs" (unit: €).
44
- In this case, the factor $\text a_{x \rightarrow e}$ is the specific CO$_2$ price in €/kg. However, circular references have to be avoided.
45
-
46
- The overall sum of investment shares of an Effect $e$ is given by $\eqref{eq:Effect_invest}$
47
-
48
- $$ \label{eq:Effect_invest}
49
- E_{e, \text{inv}} =
50
- \sum_{l \in \mathcal{L}} s_{l \rightarrow e,\text{inv}} +
51
- \sum_{x \in \mathcal{E}\backslash e} E_{x, \text{inv}} \cdot \text{r}_{x \rightarrow e,\text{inv}}
52
- $$
53
-
54
- The overall sum of operation shares is given by $\eqref{eq:Effect_Operation}$
55
-
56
- $$ \label{eq:Effect_Operation}
57
- E_{e, \text{op}}(\text{t}_{i}) =
58
- \sum_{l \in \mathcal{L}} s_{l \rightarrow e, \text{op}}(\text{t}_i) +
59
- \sum_{x \in \mathcal{E}\backslash e} E_{x, \text{op}}(\text{t}_i) \cdot \text{r}_{x \rightarrow {e},\text{op}}(\text{t}_i)
60
- $$
61
-
62
- and totals to $\eqref{eq:Effect_Operation_total}$
63
- $$\label{eq:Effect_Operation_total}
64
- E_{e,\text{op},\text{tot}} = \sum_{i=1}^n E_{e,\text{op}}(\text{t}_{i})
65
- $$
66
-
67
- With:
68
-
69
- - $\mathcal{L}$ being the set of all elements in the FlowSystem
70
- - $\mathcal{E}$ being the set of all effects in the FlowSystem
71
- - $\text r_{x \rightarrow e, \text{inv}}$ being the factor between the invest part of Effect $x$ and Effect $e$
72
- - $\text r_{x \rightarrow e, \text{op}}(\text{t}_i)$ being the factor between the operation part of Effect $x$ and Effect $e$
73
-
74
- - $\text{t}_i$ being the time step
75
- - $s_{l \rightarrow e, \text{inv}}$ being the share of element $l$ to the investment part of effect $e$
76
- - $s_{l \rightarrow e, \text{op}}(\text{t}_i)$ being the share of element $l$ to the operation part of effect $e$
77
-
78
-
79
- The total of an effect $E_{e}$ is given as $\eqref{eq:Effect_Total}$
80
-
81
- $$ \label{eq:Effect_Total}
82
- E_{e} = E_{\text{inv},e} +E_{\text{op},\text{tot},e}
83
- $$
84
-
85
- ### Constraining Effects
86
-
87
- For each variable $v \in \{ E_{e,\text{inv}}, E_{e,\text{op},\text{tot}}, E_e\}$, a lower bound $v^\text{L}$ and upper bound $v^\text{U}$ can be defined as
88
-
89
- $$ \label{eq:Bounds_Single}
90
- \text v^\text{L} \leq v \leq \text v^\text{U}
91
- $$
92
-
93
- Furthermore, bounds for the operational shares can be set for each time step
94
-
95
- $$ \label{eq:Bounds_Time_Steps}
96
- \text E_{e,\text{op}}^\text{L}(\text{t}_i) \leq E_{e,\text{op}}(\text{t}_i) \leq \text E_{e,\text{op}}^\text{U}(\text{t}_i)
97
- $$
98
-
99
- ## Penalty
100
-
101
- Additionally to the user defined [Effects](#effects), a Penalty $\Phi$ is part of every FlixOpt Model.
102
- Its used to prevent unsolvable problems and simplify troubleshooting.
103
- Shares to the penalty can originate from every Element and are constructed similarly to
104
- $\eqref{Share_invest}$ and $\eqref{Share_operation}$.
105
-
106
- $$ \label{eq:Penalty}
107
- \Phi = \sum_{l \in \mathcal{L}} \left( s_{l \rightarrow \Phi} +\sum_{\text{t}_i \in \mathcal{T}} s_{l \rightarrow \Phi}(\text{t}_{i}) \right)
108
- $$
109
-
110
- With:
111
-
112
- - $\mathcal{L}$ being the set of all elements in the FlowSystem
113
- - $\mathcal{T}$ being the set of all timesteps
114
- - $s_{l \rightarrow \Phi}$ being the share of element $l$ to the penalty
115
-
116
- At the moment, penalties only occur in [Buses](Bus.md)
117
-
118
- ## Objective
119
-
120
- The optimization objective of a FlixOpt Model is defined as $\eqref{eq:Objective}$
121
- $$ \label{eq:Objective}
122
- \min(E_{\Omega} + \Phi)
123
- $$
124
-
125
- With:
126
-
127
- - $\Omega$ being the chosen **Objective [Effect](#effects)** (see $\eqref{eq:Effect_Total}$)
128
- - $\Phi$ being the [Penalty](#penalty)
129
-
130
- This approach allows for a multi-criteria optimization using both...
131
- - ... the **Weighted Sum** method, as the chosen **Objective Effect** can incorporate other Effects.
132
- - ... the ($\epsilon$-constraint method) by constraining effects.
@@ -1,26 +0,0 @@
1
- The flow_rate is the main optimization variable of the Flow. It's limited by the size of the Flow and relative bounds \eqref{eq:flow_rate}.
2
-
3
- $$ \label{eq:flow_rate}
4
- \text P \cdot \text p^{\text{L}}_{\text{rel}}(\text{t}_{i})
5
- \leq p(\text{t}_{i}) \leq
6
- \text P \cdot \text p^{\text{U}}_{\text{rel}}(\text{t}_{i})
7
- $$
8
-
9
- With:
10
-
11
- - $\text P$ being the size of the Flow
12
- - $p(\text{t}_{i})$ being the flow-rate at time $\text{t}_{i}$
13
- - $\text p^{\text{L}}_{\text{rel}}(\text{t}_{i})$ being the relative lower bound (typically 0)
14
- - $\text p^{\text{U}}_{\text{rel}}(\text{t}_{i})$ being the relative upper bound (typically 1)
15
-
16
- With $\text p^{\text{L}}_{\text{rel}}(\text{t}_{i}) = 0$ and $\text p^{\text{U}}_{\text{rel}}(\text{t}_{i}) = 1$,
17
- equation \eqref{eq:flow_rate} simplifies to
18
-
19
- $$
20
- 0 \leq p(\text{t}_{i}) \leq \text P
21
- $$
22
-
23
-
24
- This mathematical formulation can be extended by using [OnOffParameters](./OnOffParameters.md)
25
- to define the on/off state of the Flow, or by using [InvestParameters](./InvestParameters.md)
26
- to change the size of the Flow from a constant to an optimization variable.
@@ -1,3 +0,0 @@
1
- # InvestParameters
2
-
3
- This is a work in progress.
@@ -1,21 +0,0 @@
1
- [`LinearConverters`][flixopt.components.LinearConverter] define a ratio between incoming and outgoing [Flows](Flow.md).
2
-
3
- $$ \label{eq:Linear-Transformer-Ratio}
4
- \sum_{f_{\text{in}} \in \mathcal F_{in}} \text a_{f_{\text{in}}}(\text{t}_i) \cdot p_{f_\text{in}}(\text{t}_i) = \sum_{f_{\text{out}} \in \mathcal F_{out}} \text b_{f_\text{out}}(\text{t}_i) \cdot p_{f_\text{out}}(\text{t}_i)
5
- $$
6
-
7
- With:
8
-
9
- - $\mathcal F_{in}$ and $\mathcal F_{out}$ being the set of all incoming and outgoing flows
10
- - $p_{f_\text{in}}(\text{t}_i)$ and $p_{f_\text{out}}(\text{t}_i)$ being the flow-rate at time $\text{t}_i$ for flow $f_\text{in}$ and $f_\text{out}$, respectively
11
- - $\text a_{f_\text{in}}(\text{t}_i)$ and $\text b_{f_\text{out}}(\text{t}_i)$ being the ratio of the flow-rate at time $\text{t}_i$ for flow $f_\text{in}$ and $f_\text{out}$, respectively
12
-
13
- With one incoming **Flow** and one outgoing **Flow**, this can be simplified to:
14
-
15
- $$ \label{eq:Linear-Transformer-Ratio-simple}
16
- \text a(\text{t}_i) \cdot p_{f_\text{in}}(\text{t}_i) = p_{f_\text{out}}(\text{t}_i)
17
- $$
18
-
19
- where $\text a$ can be interpreted as the conversion efficiency of the **LinearConverter**.
20
- #### Piecewise Conversion factors
21
- The conversion efficiency can be defined as a piecewise linear approximation. See [Piecewise](Piecewise.md) for more details.
@@ -1,3 +0,0 @@
1
- # OnOffParameters
2
-
3
- This is a work in progress.
@@ -1,49 +0,0 @@
1
- # Piecewise
2
-
3
- A Piecewise is a collection of [`Pieces`][flixopt.interface.Piece], which each define a valid range for a variable $v$
4
-
5
- $$ \label{eq:active_piece}
6
- \beta_\text{k} = \lambda_\text{0, k} + \lambda_\text{1, k}
7
- $$
8
-
9
- $$ \label{eq:piece}
10
- v_\text{k} = \lambda_\text{0, k} * \text{v}_{\text{start,k}} + \lambda_\text{1,k} * \text{v}_{\text{end,k}}
11
- $$
12
-
13
- $$ \label{eq:piecewise_in_pieces}
14
- \sum_{k=1}^k \beta_{k} = 1
15
- $$
16
-
17
- With:
18
-
19
- - $v$: The variable to be defined by the Piecewise
20
- - $\text{v}_{\text{start,k}}$: the start point of the piece for variable $v$
21
- - $\text{v}_{\text{end,k}}$: the end point of the piece for variable $v$
22
- - $\beta_\text{k} \in \{0, 1\}$: defining wether the Piece $k$ is active
23
- - $\lambda_\text{0,k} \in [0, 1]$: A variable defining the fraction of $\text{v}_{\text{start,k}}$ that is active
24
- - $\lambda_\text{1,k} \in [0, 1]$: A variable defining the fraction of $\text{v}_{\text{end,k}}$ that is active
25
-
26
- Which can also be described as $v \in 0 \cup [\text{v}_\text{start}, \text{v}_\text{end}]$.
27
-
28
- Instead of \eqref{eq:piecewise_in_pieces}, the following constraint is used to also allow all variables to be zero:
29
-
30
- $$ \label{eq:piecewise_in_pieces_zero}
31
- \sum_{k=1}^k \beta_{k} = \beta_\text{zero}
32
- $$
33
-
34
- With:
35
-
36
- - $\beta_\text{zero} \in \{0, 1\}$.
37
-
38
- Which can also be described as $v \in \{0\} \cup [\text{v}_{\text{start_k}}, \text{v}_{\text{end_k}}]$
39
-
40
-
41
- ## Combining multiple Piecewises
42
-
43
- Piecewise allows representing non-linear relationships.
44
- This is a powerful technique in linear optimization to model non-linear behaviors while maintaining the problem's linearity.
45
-
46
- Therefore, each Piecewise must have the same number of Pieces $k$.
47
-
48
- The variables described in [Piecewise](#piecewise) are created for each Piece, but nor for each Piecewise.
49
- Rather, \eqref{eq:piece} is the only constraint that is created for each Piecewise, using the start and endpoints $\text{v}_{\text{start,k}}$ and $\text{v}_{\text{end,k}}$ of each Piece for the corresponding variable $v$
@@ -1,44 +0,0 @@
1
- # Storages
2
- **Storages** have one incoming and one outgoing **[Flow](Flow.md)** with a charging and discharging efficiency.
3
- A storage has a state of charge $c(\text{t}_i)$ which is limited by its `size` $\text C$ and relative bounds $\eqref{eq:Storage_Bounds}$.
4
-
5
- $$ \label{eq:Storage_Bounds}
6
- \text C \cdot \text c^{\text{L}}_{\text{rel}}(\text t_{i})
7
- \leq c(\text{t}_i) \leq
8
- \text C \cdot \text c^{\text{U}}_{\text{rel}}(\text t_{i})
9
- $$
10
-
11
- Where:
12
-
13
- - $\text C$ is the size of the storage
14
- - $c(\text{t}_i)$ is the state of charge at time $\text{t}_i$
15
- - $\text c^{\text{L}}_{\text{rel}}(\text t_{i})$ is the relative lower bound (typically 0)
16
- - $\text c^{\text{U}}_{\text{rel}}(\text t_{i})$ is the relative upper bound (typically 1)
17
-
18
- With $\text c^{\text{L}}_{\text{rel}}(\text t_{i}) = 0$ and $\text c^{\text{U}}_{\text{rel}}(\text t_{i}) = 1$,
19
- Equation $\eqref{eq:Storage_Bounds}$ simplifies to
20
-
21
- $$ 0 \leq c(\text t_{i}) \leq \text C $$
22
-
23
- The state of charge $c(\text{t}_i)$ decreases by a fraction of the prior state of charge. The belonging parameter
24
- $ \dot{ \text c}_\text{rel, loss}(\text{t}_i)$ expresses the "loss fraction per hour". The storage balance from $\text{t}_i$ to $\text t_{i+1}$ is
25
-
26
- $$
27
- \begin{align*}
28
- c(\text{t}_{i+1}) &= c(\text{t}_{i}) \cdot (1-\dot{\text{c}}_\text{rel,loss}(\text{t}_i) \cdot \Delta \text{t}_{i}) \\
29
- &\quad + p_{f_\text{in}}(\text{t}_i) \cdot \Delta \text{t}_i \cdot \eta_\text{in}(\text{t}_i) \\
30
- &\quad - \frac{p_{f_\text{out}}(\text{t}_i) \cdot \Delta \text{t}_i}{\eta_\text{out}(\text{t}_i)}
31
- \tag{3}
32
- \end{align*}
33
- $$
34
-
35
- Where:
36
-
37
- - $c(\text{t}_{i+1})$ is the state of charge at time $\text{t}_{i+1}$
38
- - $c(\text{t}_{i})$ is the state of charge at time $\text{t}_{i}$
39
- - $\dot{\text{c}}_\text{rel,loss}(\text{t}_i)$ is the relative loss rate (self-discharge) per hour
40
- - $\Delta \text{t}_{i}$ is the time step duration in hours
41
- - $p_{f_\text{in}}(\text{t}_i)$ is the input flow rate at time $\text{t}_i$
42
- - $\eta_\text{in}(\text{t}_i)$ is the charging efficiency at time $\text{t}_i$
43
- - $p_{f_\text{out}}(\text{t}_i)$ is the output flow rate at time $\text{t}_i$
44
- - $\eta_\text{out}(\text{t}_i)$ is the discharging efficiency at time $\text{t}_i$
@@ -1,22 +0,0 @@
1
-
2
- # Mathematical Notation
3
-
4
- ## Naming Conventions
5
-
6
- FlixOpt uses the following naming conventions:
7
-
8
- - All optimization variables are denoted by italic letters (e.g., $x$, $y$, $z$)
9
- - All parameters and constants are denoted by non italic small letters (e.g., $\text{a}$, $\text{b}$, $\text{c}$)
10
- - All Sets are denoted by greek capital letters (e.g., $\mathcal{F}$, $\mathcal{E}$)
11
- - All units of a set are denoted by greek small letters (e.g., $\mathcal{f}$, $\mathcal{e}$)
12
- - The letter $i$ is used to denote an index (e.g., $i=1,\dots,\text n$)
13
- - All time steps are denoted by the letter $\text{t}$ (e.g., $\text{t}_0$, $\text{t}_1$, $\text{t}_i$)
14
-
15
- ## Timesteps
16
- Time steps are defined as a sequence of discrete time steps $\text{t}_i \in \mathcal{T} \quad \text{for} \quad i \in \{1, 2, \dots, \text{n}\}$ (left-aligned in its timespan).
17
- From this sequence, the corresponding time intervals $\Delta \text{t}_i \in \Delta \mathcal{T}$ are derived as
18
-
19
- $$\Delta \text{t}_i = \text{t}_{i+1} - \text{t}_i \quad \text{for} \quad i \in \{1, 2, \dots, \text{n}-1\}$$
20
-
21
- The final time interval $\Delta \text{t}_\text n$ defaults to $\Delta \text{t}_\text n = \Delta \text{t}_{\text n-1}$, but is of course customizable.
22
- Non-equidistant time steps are also supported.
@@ -1,3 +0,0 @@
1
- # Work in Progress
2
-
3
- This is a work in progress.
docs/user-guide/index.md DELETED
@@ -1,124 +0,0 @@
1
- # FlixOpt Concepts
2
-
3
- FlixOpt is built around a set of core concepts that work together to represent and optimize energy and material flow systems. This page provides a high-level overview of these concepts and how they interact.
4
-
5
- ## Core Concepts
6
-
7
- ### FlowSystem
8
-
9
- The [`FlowSystem`][flixopt.flow_system.FlowSystem] is the central organizing unit in FlixOpt.
10
- Every FlixOpt model starts with creating a FlowSystem. It:
11
-
12
- - Defines the timesteps for the optimization
13
- - Contains and connects [components](#components), [buses](#buses), and [flows](#flows)
14
- - Manages the [effects](#effects) (objectives and constraints)
15
-
16
- ### Flows
17
-
18
- [`Flow`][flixopt.elements.Flow] objects represent the movement of energy or material between a [Bus](#buses) and a [Component](#components) in a predefined direction.
19
-
20
- - Have a `size` which, generally speaking, defines how fast energy or material can be moved. Usually measured in MW, kW, m³/h, etc.
21
- - Have a `flow_rate`, which is defines how fast energy or material is transported. Usually measured in MW, kW, m³/h, etc.
22
- - Have constraints to limit the flow-rate (min/max, total flow hours, on/off etc.)
23
- - Can have fixed profiles (for demands or renewable generation)
24
- - Can have [Effects](#effects) associated by their use (operation, investment, on/off, ...)
25
-
26
- #### Flow Hours
27
- While the **Flow Rate** defines the rate in which energy or material is transported, the **Flow Hours** define the amount of energy or material that is transported.
28
- Its defined by the flow_rate times the duration of the timestep in hours.
29
-
30
- Examples:
31
-
32
- | Flow Rate | Timestep | Flow Hours |
33
- |-----------|----------|------------|
34
- | 10 (MW) | 1 hour | 10 (MWh) |
35
- | 10 (MW) | 6 minutes | 0.1 (MWh) |
36
- | 10 (kg/h) | 1 hour | 10 (kg) |
37
-
38
- ### Buses
39
-
40
- [`Bus`][flixopt.elements.Bus] objects represent nodes or connection points in a FlowSystem. They:
41
-
42
- - Balance incoming and outgoing flows
43
- - Can represent physical networks like heat, electricity, or gas
44
- - Handle infeasible balances gently by allowing the balance to be closed in return for a big Penalty (optional)
45
-
46
- ### Components
47
-
48
- [`Component`][flixopt.elements.Component] objects usually represent physical entities in your system that interact with [`Flows`][flixopt.elements.Flow]. They include:
49
-
50
- - [`LinearConverters`][flixopt.components.LinearConverter] - Converts input flows to output flows with (piecewise) linear relationships
51
- - [`Storages`][flixopt.components.Storage] - Stores energy or material over time
52
- - [`Sources`][flixopt.components.Source] / [`Sinks`][flixopt.components.Sink] / [`SourceAndSinks`][flixopt.components.SourceAndSink] - Produce or consume flows. They are usually used to model external demands or supplies.
53
- - [`Transmissions`][flixopt.components.Transmission] - Moves flows between locations with possible losses
54
- - Specialized [`LinearConverters`][flixopt.components.LinearConverter] like [`Boilers`][flixopt.linear_converters.Boiler], [`HeatPumps`][flixopt.linear_converters.HeatPump], [`CHPs`][flixopt.linear_converters.CHP], etc. These simplify the usage of the `LinearConverter` class and can also be used as blueprint on how to define custom classes or parameterize existing ones.
55
-
56
- ### Effects
57
-
58
- [`Effect`][flixopt.effects.Effect] objects represent impacts or metrics related to your system, such as:
59
-
60
- - Costs (investment, operation)
61
- - Emissions (CO₂, NOx, etc.)
62
- - Resource consumption
63
- - Area demand
64
-
65
- These can be freely defined and crosslink to each other (`CO₂` ──[specific CO₂-costs]─→ `Costs`).
66
- One effect is designated as the **optimization objective** (typically Costs), while others can be constrained.
67
- This approach allows for a multi-criteria optimization using both...
68
- - ... the **Weigted Sum**Method, by Optimizing a theoretical Effect which other Effects crosslink to.
69
- - ... the ($\epsilon$-constraint method) by constraining effects.
70
-
71
- ### Calculation
72
-
73
- A [`FlowSystem`][flixopt.flow_system.FlowSystem] can be converted to a Model and optimized by creating a [`Calculation`][flixopt.calculation.Calculation] from it.
74
-
75
- FlixOpt offers different calculation modes:
76
-
77
- - [`FullCalculation`][flixopt.calculation.FullCalculation] - Solves the entire problem at once
78
- - [`SegmentedCalculation`][flixopt.calculation.SegmentedCalculation] - Solves the problem in segments (with optioinal overlap), improving performance for large problems
79
- - [`AggregatedCalculation`][flixopt.calculation.AggregatedCalculation] - Uses typical periods to reduce computational requirements
80
-
81
- ### Results
82
-
83
- The results of a calculation are stored in a [`CalculationResults`][flixopt.results.CalculationResults] object.
84
- This object contains the solutions of the optimization as well as all information about the [`Calculation`][flixopt.calculation.Calculation] and the [`FlowSystem`][flixopt.flow_system.FlowSystem] it was created from.
85
- The solutions is stored as an `xarray.Dataset`, but can be accessed through their assotiated Component, Bus or Effect.
86
-
87
- This [`CalculationResults`][flixopt.results.CalculationResults] object can be saved to file and reloaded from file, allowing you to analyze the results anytime after the solve.
88
-
89
- ## How These Concepts Work Together
90
-
91
- The process of working with FlixOpt can be divided into 3 steps:
92
-
93
- 1. Create a [`FlowSystem`][flixopt.flow_system.FlowSystem], containing all the elements and data of your system
94
- - Define the time series of your system
95
- - Add [`Components`][flixopt.components] like [`Boilers`][flixopt.linear_converters.Boiler], [`HeatPumps`][flixopt.linear_converters.HeatPump], [`CHPs`][flixopt.linear_converters.CHP], etc.
96
- - Add [`Buses`][flixopt.elements.Bus] as connection points in your system
97
- - Add [`Effects`][flixopt.effects.Effect] to represent costs, emissions, etc.
98
- - *This [`FlowSystem`][flixopt.flow_system.FlowSystem] can also be loaded from a netCDF file*
99
- 2. Translate the model to a mathematical optimization problem
100
- - Create a [`Calculation`][flixopt.calculation.Calculation] from your FlowSystem and choose a Solver
101
- - ...The Calculation is translated internaly to a mathematical optimization problem...
102
- - ...and solved by the chosen solver.
103
- 3. Analyze the results
104
- - The results are stored in a [`CalculationResults`][flixopt.results.CalculationResults] object
105
- - This object can be saved to file and reloaded from file, retaining all information about the calculation
106
- - As it contains the used [`FlowSystem`][flixopt.flow_system.FlowSystem], it can be used to start a new calculation
107
-
108
- <figure markdown>
109
- ![FlixOpt Conceptual Usage](../images/architecture_flixOpt.png)
110
- <figcaption>Conceptual Usage and IO operations of FlixOpt</figcaption>
111
- </figure>
112
-
113
- ## Advanced Usage
114
- As flixopt is build on [linopy](https://github.com/PyPSA/linopy), any model created with FlixOpt can be extended or modified using the great [linopy API](https://linopy.readthedocs.io/en/latest/api.html).
115
- This allows to adjust your model to very specific requirements without loosing the convenience of FlixOpt.
116
-
117
- <!--## Next Steps-->
118
- <!---->
119
- <!--Now that you understand the basic concepts, learn more about each one:-->
120
- <!---->
121
- <!--- [FlowSystem](api/flow_system.md) - Time series and system organization-->
122
- <!--- [Components](api/components.md) - Available component types and how to use them-->
123
- <!--- [Effects](apieffects.md) - Costs, emissions, and other impacts-->
124
- <!--- [Calculation Modes](api/calculation.md) - Different approaches to solving your model-->
@@ -1,56 +0,0 @@
1
- docs/examples/00-Minimal Example.md,sha256=TjtnI8o96YNOCFwRC8BSXFGoVqfB53BtvOG4b29FwkQ,80
2
- docs/examples/01-Basic Example.md,sha256=sZHonC6A_wtZ2IEy_6BAMY8wViyIcivmcj8GYIZ_qck,78
3
- docs/examples/02-Complex Example.md,sha256=5cczYkXFpzpQTNp9dkmOEdTXxoWLETKty417q6MyT8s,287
4
- docs/examples/03-Calculation Modes.md,sha256=FZPBXmrkir6QhQsiXwWp2sOOntIIkODCgh3lVqOrP6w,231
5
- docs/examples/index.md,sha256=KwXrsxxiHk563bny4I4B2X_CfPNiSXx8TsfI671MLdg,179
6
- docs/faq/contribute.md,sha256=CL7Z85zyPes1Kl16_8oWLU2RTTbMdPfhmvt4tsnkikU,2508
7
- docs/faq/index.md,sha256=MH_SPZllm_5npxPP6DHXbJlpLXZc-nbWTFJvMmZYz9Q,50
8
- docs/images/architecture_flixOpt-pre2.0.0.png,sha256=9RWSA3vys588aadr2437zor-_-xBTQNQ0bAf8xGcu5g,70605
9
- docs/images/architecture_flixOpt.png,sha256=KjN1bJwESbkHmTW7UsJ7dZyiKZlTO7Dx20dg8KlR1HU,260219
10
- docs/images/flixopt-icon.svg,sha256=_1a6bk2pDOVEy233LC1nM6jZ35NdzD8Hd3UqGxW1Xpg,135341
11
- docs/javascripts/mathjax.js,sha256=LJDaO5MM_5W8gI5-S5SiZ17qeMgeoVJO-inMyBNy7UE,402
12
- docs/user-guide/index.md,sha256=TBO7lk13M95w2A9WiT5asfZn9oU9GZ1O0XW9eUm5GLo,7450
13
- docs/user-guide/Mathematical Notation/Bus.md,sha256=pqjGa3PZBSmuO4YR44bK21bMmRcWC8dkzP3z0XX-PJw,1613
14
- "docs/user-guide/Mathematical Notation/Effects, Penalty & Objective.md",sha256=vXQWt-UyITOVTJWPkKfjJzucbyml2OTQ6URQiMoc9dU,5671
15
- docs/user-guide/Mathematical Notation/Flow.md,sha256=zxCp02o0t2EwB-hlwGtmh8aQveRGgcgwqMN8MvLxaI0,1099
16
- docs/user-guide/Mathematical Notation/InvestParameters.md,sha256=UeuCpAyhOfDS2C3efmi_2EFkaFBK7HcqhHeBXl9BhFw,48
17
- docs/user-guide/Mathematical Notation/LinearConverter.md,sha256=mKYbpnYxXW9xI2ybVfAyxDJdwahnj7L9ZTY0mnq3_l0,1321
18
- docs/user-guide/Mathematical Notation/OnOffParameters.md,sha256=QEgxhqb53VlyBifIdExwaQpsdeE0Cyb8aN3-aCHQ21U,47
19
- docs/user-guide/Mathematical Notation/Piecewise.md,sha256=GgTQ7dVTTb0lq14GFuuZeGYrUXtMy1wkztJLIVchchw,1993
20
- docs/user-guide/Mathematical Notation/Storage.md,sha256=-QiZN2vA-f-P8JGkQDPYBdt2xt6J0Z2jbKDuk6j-rIs,2201
21
- docs/user-guide/Mathematical Notation/index.md,sha256=2d6k4zbKET1kg7zBt1fEdKsG8jM5j2IIe6yclMTUlDw,1254
22
- docs/user-guide/Mathematical Notation/others.md,sha256=z6LOzcnvfI-1qQx0Fg7Q6wSK9tAzH2d34KbW4lYNyCE,48
23
- flixopt/__init__.py,sha256=xTxHXC-_lWa65roGUM3J3HXfiYcMCJHoQsuL5mS0Xkg,688
24
- flixopt/aggregation.py,sha256=BFy2ngr0a0By5wfBZet9fX8X5ZPmkn1x6HMRaw1ZsTo,16892
25
- flixopt/calculation.py,sha256=VBcvpQr7ZXvWZfryfilwUzK161br4ZP3zTwvYHraGjY,24476
26
- flixopt/commons.py,sha256=ZNlUN1z-h9OGHPo-s-n5OLlJaoPZKVGcAdRyGKpMk4M,1256
27
- flixopt/components.py,sha256=efUwx_eqgVPsQEn8u0HUrgkvU2eU2tgv7wKwT2eeX_I,54632
28
- flixopt/config.py,sha256=2GJ9NZl35OKMUvofIpztgKh3kdca1m1wa77RjsUaob0,9509
29
- flixopt/config.yaml,sha256=imzAnnhcJhIfKNTTXFB5Td7Pvk5ARn5j720k-oGGRug,392
30
- flixopt/core.py,sha256=HnXnUXnAL8yqBExdsXGgwu5HnfWRH0omjjMKgp_SBKc,37824
31
- flixopt/effects.py,sha256=HcalPMUaAfuzD2p1OeQ9nLY2vmHv_GxwyGLLeqNGNZ8,19435
32
- flixopt/elements.py,sha256=IWtr0zyS1GEttYMiBZxC6sEX7y8pCWEbySxok3nDxwI,33535
33
- flixopt/features.py,sha256=m61ixTFJ_Jh-Emx6QKVxo04Heswm89XsPUqbH8ezNr8,43891
34
- flixopt/flow_system.py,sha256=qvR4uktXERDKCI40w9tJidkWxt5B36XVoebCw5bJons,20886
35
- flixopt/interface.py,sha256=e5tom-aTEPfl4FQg8abyDv7g1tTvxeOWiSWg_IGti-g,47575
36
- flixopt/io.py,sha256=BziCFlHfqx1kWFBhr1EZi-odZaqTVZdfmHhl-_rf5Ug,11367
37
- flixopt/linear_converters.py,sha256=rKa0AZlJHgDsPF_LVsvrhxhsmVTRanPE0NuKP7OICtg,22668
38
- flixopt/network_app.py,sha256=LnVAlAgzL1BgMYLsJ20a62j6nQUmNccF1zo4ACUXzL4,29433
39
- flixopt/plotting.py,sha256=cGM8f5QDMOkKuBapgD6-EhN1X-f5WkDqyoxGPberjzI,59661
40
- flixopt/results.py,sha256=121FoO3WrAuHm18_-OP93_-9JxuCVVm5JWvmC33P3-8,40682
41
- flixopt/solvers.py,sha256=m38Smc22MJfHYMiqfNf1MA3OmvbTRm5OWS9nECkDdQk,2355
42
- flixopt/structure.py,sha256=vyD1lc80NH3JLexKJuar9btgHhEbcNEmihCQkBWea8k,26254
43
- flixopt/utils.py,sha256=a-YKR7C7HtD8dSIcxzlJTgryV5HMS7zELSXNYr_Lz9Q,1775
44
- flixopt-2.1.9.dist-info/licenses/LICENSE,sha256=HKsZnbrM_3Rvnr_u9cWSG90cBsj5_slaqI_z_qcxnGI,1118
45
- pics/architecture_flixOpt-pre2.0.0.png,sha256=9RWSA3vys588aadr2437zor-_-xBTQNQ0bAf8xGcu5g,70605
46
- pics/architecture_flixOpt.png,sha256=KjN1bJwESbkHmTW7UsJ7dZyiKZlTO7Dx20dg8KlR1HU,260219
47
- pics/flixOpt_plotting.jpg,sha256=zn7ZPAtXm5eRTxtOj86e4-PPhHpCar1jqGh7vMBgQGY,518862
48
- pics/flixopt-icon.svg,sha256=_1a6bk2pDOVEy233LC1nM6jZ35NdzD8Hd3UqGxW1Xpg,135341
49
- pics/pics.pptx,sha256=ImWeGGvjtWJ6BGruipsnZYmWtHj5sWdbw1NSFePbkC8,683344
50
- scripts/extract_release_notes.py,sha256=3UUE4hWhdd2t2m2x0ZpchGP-A0MvfqO2Wc5EdNN-fgE,1249
51
- scripts/gen_ref_pages.py,sha256=7bxRu2VfqFrnr7wln1BjMAqpQUzuTkLPJSBh83uikIQ,1948
52
- tests/ressources/Zeitreihen2020.csv,sha256=kbsDTKZS0iUsNZAS7m3DohzZI_OHHWe44s3GwLvcTLw,1918412
53
- flixopt-2.1.9.dist-info/METADATA,sha256=Nss3DrhLRoWw8XBa73OyIKYN_Fx34uo4y4gptjXu8Qc,8432
54
- flixopt-2.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
- flixopt-2.1.9.dist-info/top_level.txt,sha256=DEuo4R1z7GmEp5R3pjbQEJbaPRjKHFvNX2ceiBnVOL0,32
56
- flixopt-2.1.9.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- docs
2
- flixopt
3
- pics
4
- scripts
5
- tests
Binary file
Binary file
pics/flixOpt_plotting.jpg DELETED
Binary file