Generators#
This fragment states Generator from
an open-source power system framework (PyPSA). The file declares its three dimensions, the
relation Generator_port, two parameters and the variable Generator_p. The file
lists Port_p and total_cost under given, and
the surface declares them. Generator_cost is a
named expression that adds to
total_cost (a term). Generator_injection equates Generator_p with the flow at the port through
at, so the balance of the
surface contains no generator variable.
description: >-
PyPSA's `Generator`, wired to a port rather than straight to a bus, and cut
to what a dispatch spec needs: a fixed capacity, no availability profile, no
ramp limits.
given:
variables:
Port_p:
dims: [snapshot, port]
description: declared by the surface, and fixed at each generator's port by `Generator_injection`
expressions:
total_cost: { dims: [] }
dimensions:
snapshot: { dtype: datetime, description: dispatch periods }
port: { dtype: str, description: "the connections components make, one label per connection" }
generator: { dtype: str, description: "generating units, each on one port" }
maps:
generator: { port: port }
parameters:
Generator_p_nom: { dims: [generator], description: nominal power }
Generator_marginal_cost: { dims: [generator], description: cost of one unit of output }
variables:
Generator_p:
dims: [snapshot, generator]
bounds: { lower: 0, upper: Generator_p_nom }
description: "`Generator-p` — what a generator produces in a snapshot"
constraints:
Generator_injection:
description: >-
What a generator produces is what its port injects. PyPSA has no row for
this constraint, because PyPSA writes the generator into the balance.
dims: [snapshot, generator]
expression: at(Port_p, by=generator[port]) == Generator_p
expressions:
Generator_cost:
expression: sum(Generator_p * Generator_marginal_cost)
adds_to: total_cost
PyPSA's Generator, wired to a port rather than straight to a bus, and cut to what a dispatch spec needs: a fixed capacity, no availability profile, no ramp limits.
Given#
| Symbol | Meaning |
|---|---|
| \(f\) | Port_p over \(\mathcal{J} \times \mathcal{T}\) — declared by the surface, and fixed at each generator's port by Generator_injection |
| \(\mathit{total\_cost}\) | total_cost (scalar), an expression this file adds Generator_cost to |
Sets#
| Symbol | Meaning |
|---|---|
| \(\mathcal{G}\) | index \(g\) — generator with \(\mathrm{port}: \mathcal{G} \to \mathcal{J}\) — generating units, each on one port |
| \(\mathcal{J}\) | index \(j\) — port with \(\mathrm{port}: \mathcal{G} \to \mathcal{J}\) — the connections components make, one label per connection |
| \(\mathcal{T}\) | index \(t\) — snapshot — dispatch periods |
Parameters#
| Symbol | Meaning |
|---|---|
| \(\mathrm{c}\) | Generator_marginal_cost over \(\mathcal{G}\) — cost of one unit of output |
| \(\mathrm{p}^{\mathrm{nom}}\) | Generator_p_nom over \(\mathcal{G}\) — nominal power |
Variables#
| Symbol | Meaning |
|---|---|
| \(p\) | Generator_p over \(\mathcal{G} \times \mathcal{T}\) — Generator-p — what a generator produces in a snapshot |
Definitions#
| Symbol | Meaning |
|---|---|
| \(\mathit{Generator\_cost}\) | Generator_cost (scalar) |
Variable domains#
Generator_p
\[
0 \le p_{g,t} \le \mathrm{p}^{\mathrm{nom}}_{g} \qquad \forall\, g \in \mathcal{G},\ t \in \mathcal{T}
\]
Definitions#
Generator_cost
\[
\mathit{Generator\_cost} = \sum_{g \in \mathcal{G},\ t \in \mathcal{T}} p_{g,t} \cdot \mathrm{c}_{g}
\]
Subject to#
Generator_injection
\[
f_{\mathrm{port}(g),t} = p_{g,t} \qquad \forall\, g \in \mathcal{G},\ t \in \mathcal{T}
\]
See also
- The coupling surface, for the entries this file lists under
given - The composed spec, for the spec once
mergejoins this file with the surface and the loads - PyPSA in one file, for the generator with every attribute PyPSA has