Storage
EnGenericStorage
¶
Bases: EnBaseModel
Represents a generic energy storage model with various attributes related to inputs, outputs, capacities, efficiencies, and losses.
This class models an energy storage system with different properties such as storage capacity, inflow and outflow conversions, losses, and investment options. The class is designed to handle energy optimization tasks and can be translated into an oemof (Open Energy Modelling Framework)-compatible GenericStorage object.
Attributes:
Name | Type | Description |
---|---|---|
label |
str
|
Default label for the energy storage instance. |
inputs |
dict[str, EnFlow]
|
Dictionary representing inflows to the storage. Keys are the ending nodes of the inflows. |
outputs |
dict[str, EnFlow]
|
Dictionary representing outflows from the storage. Keys are the ending nodes of the outflows. |
nominal_storage_capacity |
float | EnInvestment
|
Absolute nominal storage capacity. This can be a fixed value or an EnInvestment object for investment optimization. |
invest_relation_input_capacity |
float | None
|
Ratio between the investment variable of the input flow and the investment variable of the storage. |
invest_relation_output_capacity |
float | None
|
Ratio between the investment variable of the output flow and the investment variable of the storage. |
invest_relation_input_output |
float | None
|
Ratio between the investment variable of the output flow and the investment variable of the input flow. Used to fix relationships between flow investments. |
initial_storage_level |
float | None
|
Relative storage content before the first timestep of optimization (value between 0 and 1). Cannot be used with investment mode in multi-period models. |
balanced |
bool
|
Indicates whether the total inflow and outflow are balanced (coupling the storage level of the first and last time step). |
loss_rate |
float | list[float]
|
Relative loss of storage content per hour. |
fixed_losses_relative |
float | list[float] | None
|
Losses proportional to the nominal storage capacity but independent of storage content. Not supported in investment mode. |
fixed_losses_absolute |
float | list[float] | None
|
Losses independent of both storage content and nominal storage capacity. Not supported in investment mode. |
inflow_conversion_factor |
float | list[float]
|
Efficiency associated with inflow to the storage. |
outflow_conversion_factor |
float | list[float]
|
Efficiency associated with outflow from the storage. |
min_storage_level |
float | list[float]
|
Minimum storage level as a fraction of nominal storage capacity or invested capacity. Value between 0 and 1. Can be set for each timestep using a sequence. |
max_storage_level |
float | list[float]
|
Maximum storage level as a fraction of nominal storage capacity or invested capacity. Value between 0 and 1. Can be set for each timestep using a sequence. |
investment |
EnInvestment | None
|
Object determining whether nominal storage capacity is optimized. If used, nominal_storage_capacity should not be set. |
storage_costs |
float | list[float] | None
|
Cost (per energy unit) for maintaining energy in the storage. |
lifetime_inflow |
int | None
|
Lifetime of inflow, applicable for multi-period models with investment in storage capacity and defined invest_relation_input_capacity. |
lifetime_outflow |
int | None
|
Lifetime of outflow, applicable for multi-period models with investment in storage capacity and defined invest_relation_output_capacity. |
Source code in backend/app/ensys/components/genericstorage.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
|
to_oemof(energysystem)
¶
Converts the current storage object to an oemof-compatible GenericStorage component.
This method takes an oemof EnergySystem object as input, builds the appropriate arguments for an oemof GenericStorage, and then returns the created GenericStorage component.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
energysystem
|
EnergySystem
|
The specified oemof EnergySystem object required for creating the GenericStorage component. |
required |
Returns:
Type | Description |
---|---|
solph.components.GenericStorage
|
A GenericStorage component created and populated using the provided EnergySystem and associated parameters. |