oemof.solph.buses.Bus

class oemof.solph.buses._bus.Bus(label=None, *, inputs=None, outputs=None, balanced=True, custom_properties=None)[source]

Bases: Node

A balance object. Every component has to be connected to buses.

The sum of all inputs of a Bus object must equal the sum of all outputs within one time step.

Variables:

balanced (boolean) – Indicates if bus is balanced, i.e. if the sum of inflows equals to the sum of outflows for each timestep; defaults to True

Notes

The following sets, variables, constraints and objective parts are created
constraint_group()[source]
class oemof.solph.buses._bus.BusBlock(*args, **kwds)[source]

Bases: ScalarBlock

Block for all balanced buses.

The sum of all inputs of a Bus object must equal the sum of all outputs within one time step.

The following constraints are build:

Bus balance: om.Bus.balance[i, o, t]
\[\begin{split}\sum_{i \in INPUTS(n)} P_{i}(p, t) = \sum_{o \in OUTPUTS(n)} P_{o}(p, t), \\ \forall p, t \in \textrm{TIMEINDEX}, \\ \forall i \in \textrm{INPUTS}, \\ \forall o \in \textrm{OUTPUTS}\end{split}\]

While INPUTS is the set of Component objects connected with the input of the Bus object and OUPUTS the set of Component objects connected with the output of the Bus object.

The index \(n\) is the index for the Bus node itself. Therefore, a \(flow[i, n, p, t]\) is a flow from the Component i to the Bus n at time index p, t.

symbol

attribute

explanation

\(P_{i}(p, t)\)

flow[i, n, p, t]

Bus, inflow

\(P_{o}(p, t)\)

flow[n, o, p, t]

Bus, outflow