Source
EnSource
¶
Bases: EnBaseModel
Represents an energy source model within the system.
This class is used to define a source object with unique attributes such as a label and outputs. It is part of a model system and can interface with external libraries to represent energy system components.
Attributes:
Name | Type | Description |
---|---|---|
label |
str
|
A string holding the label of the Source object. The label of each object must be unique to ensure proper identification. |
outputs |
dict[str, EnFlow]
|
A dictionary mapping input nodes to their corresponding outflows (i.e., output values) within the system. |
Source code in backend/app/ensys/components/source.py
to_oemof(energysystem)
¶
Builds and returns an oemof.solph Source component from the specified energy system.
This method constructs necessary keyword arguments for creating an
oemof.solph Source component using the provided energy system. It utilizes
the build_kwargs
method to generate the required arguments, and then creates
and returns the corresponding Source component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
energysystem
|
EnergySystem
|
Energy system for which the oemof.solph Source component is to be built. |
required |
Returns:
Type | Description |
---|---|
solph.components.Source
|
An instance of solph.components.Source created based on the provided energy system. |