The network#
This file states the buses and the balance at each bus. It is one of the 25 whole specs of one topic each (fragments) that merge composes into the spec of examples/pypsa.yaml. It lists the sum Bus_injection under given and adds nothing to it. Every component adds its injection to that sum. Bus_nodal_balance is the row Bus_injection == 0.
given:
expressions:
Bus_injection:
dims: [bus, scenario, snapshot]
description: >-
what every component puts into a bus, less what it takes out of it.
PyPSA writes each term into the balance, and a load on its right-hand
side
dimensions:
scenario:
description: the futures dispatch is chosen in, each with a weight
snapshot:
description: dispatch periods
dtype: datetime
ordered: true
bus:
description: network nodes
parameters:
Bus_attached:
description: >-
whether a load, a unit, a port or a branch that is active in the
snapshot's period is attached to the bus, data prep. A bus nothing is
attached to has no balance row
dims: [bus, snapshot]
dtype: bool
constraints:
Bus_nodal_balance:
description: >-
`Bus-nodal_balance` — what is generated at a bus meets the load there,
less half of every incident line's and transformer's loss. What is
generated includes storage dispatch and stores. It is net of what the
links take away, plus what arrives over them after losses and any delay
at every port they deliver to. Each process port draws or delivers at
its own rate, and each passive branch carries its flow. PyPSA dissipates
a branch's loss half at either end. Each generator, storage unit, store
and load term enters with its component's `sign`
(`constraints.py:1480-1481`, `:1592`), and an inactive load not at all.
A bus nothing is attached to has no row. PyPSA refuses one that carries
load. The file states no assumption for it.
dims: [scenario, snapshot, bus]
where: Bus_attached
expression: Bus_injection == 0
Given#
| Symbol | Meaning |
|---|---|
| \(\mathit{Bus\_injection}\) | Bus_injection over \(\mathcal{N} \times \Xi \times \mathcal{T}\), an expression another file defines — what every component puts into a bus, less what it takes out of it. PyPSA writes each term into the balance, and a load on its right-hand side |
Sets#
| Symbol | Meaning |
|---|---|
| \(\mathcal{N}\) | index \(n\) — bus — network nodes |
| \(\Xi\) | index \(\xi\) — scenario — the futures dispatch is chosen in, each with a weight |
| \(\mathcal{T}\) | index \(t\) — snapshot — dispatch periods |
Parameters#
| Symbol | Meaning |
|---|---|
| \(\mathrm{Bus\_attached}\) | Bus_attached over \(\mathcal{N} \times \mathcal{T}\) — whether a load, a unit, a port or a branch that is active in the snapshot's period is attached to the bus, data prep. A bus nothing is attached to has no balance row |
Subject to#
Bus_nodal_balance
\[
\mathit{Bus\_injection}_{n,\xi,t} = 0 \qquad \forall\, n \in \mathcal{N},\ \xi \in \Xi,\ t \in \mathcal{T} \,:\, \mathrm{Bus\_attached}_{n,t}
\]
See also
- PyPSA in 25 files, for how the fragments compose
- PyPSA in one file, for the same spec as one file, rung by rung