Bus
EnBus
¶
Bases: EnBaseModel
Represents a bus in an energy system model.
This class is used to define a bus element, which is a central node in an energy system. The bus connects different components such as sources, demands, and transformers and facilitates the movement of energy between them. It also checks for balance in energy inflows and outflows at every timestep.
Attributes:
Name | Type | Description |
---|---|---|
label |
str
|
String holding the label of the Bus object. The label of each object must be unique. |
balanced |
bool
|
Indicates if the bus is balanced, i.e., if the sum of inflows equals the sum of outflows for each timestep; defaults to True. |
Source code in backend/app/ensys/components/bus.py
to_oemof(energysystem)
¶
Converts the current instance into an oemof.solph.Bus object using the provided energy system. This method prepares necessary keyword arguments from the energy system to initialize and return a solph.Bus instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
energysystem
|
EnergySystem
|
An instance of solph.EnergySystem used to build keyword arguments for the solph.Bus. |
required |
Returns:
Type | Description |
---|---|
solph.Bus
|
A solph.Bus object initialized with the built keyword arguments. |