st_storage
Classes:
-
AdditionalConstraintOperator–Possible constraint operators.
-
AdditionalConstraintVariable–Variables considered for the constraint.
-
Occurrence–Occurence of the additional constraint.
-
STStorage–Short-term storage object of modelling.
-
STStorageAdditionalConstraint–Short-term storage additional constraint.
-
STStorageAdditionalConstraintUpdate–Short-term storage additional constraint update.
-
STStorageGroup–Short-term storage group possibilities.
-
STStorageProperties–Short-term storage properties.
-
STStoragePropertiesUpdate–Short-term storage properties update.
AdditionalConstraintOperator
Possible constraint operators.
Attributes:
-
LESS–less than (<).
-
GREATER–greater than (>).
-
EQUAL–equal to (=).
AdditionalConstraintVariable
Variables considered for the constraint.
Attributes:
-
WITHDRAWAL–The constraint considers a set of withdrawal values.
-
INJECTION–The constraint considers a set of injection values.
-
NETTING–The constraint consider a set of hybrid variables equivalent to the variation of the level when there are no inflows.
Occurrence
dataclass
STStorage
STStorage(
storage_service: BaseShortTermStorageService,
area_id: str,
name: str,
properties: Optional[STStorageProperties] = None,
constraints: Optional[dict[str, STStorageAdditionalConstraint]] = None,
)
Short-term storage object of modelling.
This object allows to represent the management of any short-term storage with the following main characteristics :
- Storages managed on cycles that are sub-multiples of the Antares optimization window (week or day). By cycle we mean that at the end of the cycle the stock must return to the level at the start of the cycle
- Rule curves that frame the admissible levels hour by hour - the authorized range is a subset of the 0-100 range hourly.
- PMAX chronicles for storage and destocking.
- Natural inflows (case of open cycle Pump-Storage Plants).
Methods:
-
create_constraints–Create a new additional constraints.
-
delete_constraints–Delete additional constraints.
-
get_constraint_term–Get constraint term.
-
get_constraints–Get the associated constraints.
-
get_cost_injection–Get the injection cost time series.
-
get_cost_level–Get the level cost time series.
-
get_cost_variation_injection–Get the variation injection cost time series.
-
get_cost_variation_withdrawal–Get the variation withdrawal cost time series.
-
get_cost_withdrawal–Get the withdrawal cost time series.
-
get_lower_rule_curve–Get the lower rule curve time series.
-
get_pmax_injection–Get the maximum injection power time series.
-
get_pmax_withdrawal–Get the maximum withdrawal power time series.
-
get_storage_inflows–Get the natural inflow time series.
-
get_upper_rule_curve–Get the upper rule curve time series.
-
set_constraint_term–Set constraint term.
-
set_cost_injection–Set cost injection time series.
-
set_cost_level–Set cost level time series.
-
set_cost_variation_injection–Set cost of variation injection time series.
-
set_cost_variation_withdrawal–Set cost of variation withdrawal time series.
-
set_cost_withdrawal–Set cost withdrawal time series.
-
set_lower_rule_curve–Set the lower rule curve time series.
-
set_pmax_injection–Set the maximum injection power time series.
-
set_pmax_withdrawal–Set the maximum withdrawal power time series.
-
set_storage_inflows–Set storage inflows time series.
-
set_upper_rule_curve–Set the upper rule curve time series.
-
update_constraint–Update an additional constraint.
-
update_properties–Update short-term storage properties.
Attributes:
-
area_id(str) –Area to which the short-term storage belongs to.
-
id(str) –ID of the short-term storage.
-
name(str) –Name of the short-term storage.
-
properties(STStorageProperties) –Properties of the short-term storage.
Source code in src/antares/craft/model/st_storage.py
create_constraints
create_constraints(constraints: list[STStorageAdditionalConstraint]) -> None
Create a new additional constraints.
Parameters:
-
(constraintslist[STStorageAdditionalConstraint]) –The list of new additional constraints.
Source code in src/antares/craft/model/st_storage.py
delete_constraints
delete_constraints(constraint_ids: list[str]) -> None
Delete additional constraints.
Parameters:
Source code in src/antares/craft/model/st_storage.py
get_constraint_term
get_constraint_term(constraint_id: str) -> DataFrame
Get constraint term.
Parameters:
-
(constraint_idstr) –The constraint ID.
Returns:
-
DataFrame–The constraint term dataframe.
Source code in src/antares/craft/model/st_storage.py
get_constraints
get_constraints() -> MappingProxyType[str, STStorageAdditionalConstraint]
Get the associated constraints.
Returns:
-
MappingProxyType[str, STStorageAdditionalConstraint]–A mapping of the additional constraint ID and the object
STStorageAdditionalConstraint.
Source code in src/antares/craft/model/st_storage.py
get_cost_injection
Get the injection cost time series.
Returns:
-
DataFrame–The injection cost dataframe.
get_cost_level
Get the level cost time series.
Returns:
-
DataFrame–The level cost dataframe.
get_cost_variation_injection
Get the variation injection cost time series.
Returns:
-
DataFrame–The variation injection cost dataframe.
Source code in src/antares/craft/model/st_storage.py
get_cost_variation_withdrawal
Get the variation withdrawal cost time series.
Returns:
-
DataFrame–The variation withdrawal cost dataframe.
Source code in src/antares/craft/model/st_storage.py
get_cost_withdrawal
Get the withdrawal cost time series.
Returns:
-
DataFrame–The withdrawal cost dataframe.
Source code in src/antares/craft/model/st_storage.py
get_lower_rule_curve
Get the lower rule curve time series.
Returns:
-
DataFrame–The lower rule curve dataframe.
Source code in src/antares/craft/model/st_storage.py
get_pmax_injection
Get the maximum injection power time series.
Returns:
-
DataFrame–The maximum injection power dataframe.
Source code in src/antares/craft/model/st_storage.py
get_pmax_withdrawal
Get the maximum withdrawal power time series.
Returns:
-
DataFrame–The maximum withdrawal power dataframe.
Source code in src/antares/craft/model/st_storage.py
get_storage_inflows
Get the natural inflow time series.
Returns:
-
DataFrame–The natural inflow dataframe.
get_upper_rule_curve
Get the upper rule curve time series.
Returns:
-
DataFrame–The upper rule curve dataframe.
Source code in src/antares/craft/model/st_storage.py
set_constraint_term
set_constraint_term(constraint_id: str, matrix: DataFrame) -> None
Set constraint term.
Parameters:
-
(constraint_idstr) –The constraint ID.
-
(matrixDataFrame) –The new constraint dataframe.
Source code in src/antares/craft/model/st_storage.py
set_cost_injection
set_cost_injection(cost_injection_matrix: DataFrame) -> None
Set cost injection time series.
Parameters:
-
(cost_injection_matrixDataFrame) –The new cost injection dataframe.
Source code in src/antares/craft/model/st_storage.py
set_cost_level
set_cost_level(cost_level_matrix: DataFrame) -> None
Set cost level time series.
Parameters:
-
(cost_level_matrixDataFrame) –The new cost level dataframe.
Source code in src/antares/craft/model/st_storage.py
set_cost_variation_injection
set_cost_variation_injection(cost_variation_injection_matrix: DataFrame) -> None
Set cost of variation injection time series.
Parameters:
-
(cost_variation_injection_matrixDataFrame) –The new cost of variation injection dataframe.
Source code in src/antares/craft/model/st_storage.py
set_cost_variation_withdrawal
set_cost_variation_withdrawal(cost_variation_withdrawal_matrix: DataFrame) -> None
Set cost of variation withdrawal time series.
Parameters:
-
(cost_variation_withdrawal_matrixDataFrame) –The new cost of variation withdrawal dataframe.
Source code in src/antares/craft/model/st_storage.py
set_cost_withdrawal
set_cost_withdrawal(cost_withdrawal_matrix: DataFrame) -> None
Set cost withdrawal time series.
Parameters:
-
(cost_withdrawal_matrixDataFrame) –The new cost withdrawal dataframe.
Source code in src/antares/craft/model/st_storage.py
set_lower_rule_curve
set_lower_rule_curve(lower_rule_curve_matrix: DataFrame) -> None
Set the lower rule curve time series.
Parameters:
-
(lower_rule_curve_matrixDataFrame) –The new lower rule curve dataframe.
Source code in src/antares/craft/model/st_storage.py
set_pmax_injection
set_pmax_injection(p_max_injection_matrix: DataFrame) -> None
Set the maximum injection power time series.
Parameters:
-
(p_max_injection_matrixDataFrame) –The new maximum injection power dataframe.
Source code in src/antares/craft/model/st_storage.py
set_pmax_withdrawal
set_pmax_withdrawal(p_max_withdrawal_matrix: DataFrame) -> None
Set the maximum withdrawal power time series.
Parameters:
-
(p_max_withdrawal_matrixDataFrame) –The new maximum injection power dataframe.
Source code in src/antares/craft/model/st_storage.py
set_storage_inflows
set_storage_inflows(inflows_matrix: DataFrame) -> None
Set storage inflows time series.
Parameters:
-
(inflows_matrixDataFrame) –The new storage inflows dataframe.
Source code in src/antares/craft/model/st_storage.py
set_upper_rule_curve
set_upper_rule_curve(upper_rule_curve_matrix: DataFrame) -> None
Set the upper rule curve time series.
Parameters:
-
(upper_rule_curve_matrixDataFrame) –The new upper rule curve dataframe.
Source code in src/antares/craft/model/st_storage.py
update_constraint
update_constraint(
constraint_id: str, constraint: STStorageAdditionalConstraintUpdate
) -> STStorageAdditionalConstraint
Update an additional constraint.
Parameters:
-
(constraint_idstr) –The constraint ID.
-
(constraintSTStorageAdditionalConstraintUpdate) –The new constraint update.
Returns:
-
STStorageAdditionalConstraint–The updated constraint.
Source code in src/antares/craft/model/st_storage.py
update_properties
update_properties(properties: STStoragePropertiesUpdate) -> STStorageProperties
Update short-term storage properties.
Parameters:
-
(propertiesSTStoragePropertiesUpdate) –The properties to update.
Returns:
-
STStorageProperties–The updated properties.
Source code in src/antares/craft/model/st_storage.py
STStorageAdditionalConstraint
dataclass
STStorageAdditionalConstraint(
name: str,
variable: AdditionalConstraintVariable = NETTING,
operator: AdditionalConstraintOperator = LESS,
occurrences: list[Occurrence] = list(),
enabled: bool = True,
)
Short-term storage additional constraint.
Attributes:
-
id(str) –ID of the additional constraint.
-
name(str) –Name of the additional constraint.
-
variable(AdditionalConstraintVariable) –Variable considered for the constraint (
WITHDRAWAL,INJECTIONorNETTING). -
operator(AdditionalConstraintOperator) –Mathematical operator defining the constraint (
LESS,GREATERorEQUAL). -
occurrences(list[Occurrence]) –List of list of hours where the constraint is applied.
-
enabled(bool) –Whether the constraint is considered.
STStorageAdditionalConstraintUpdate
dataclass
STStorageAdditionalConstraintUpdate(
variable: Optional[AdditionalConstraintVariable] = None,
operator: Optional[AdditionalConstraintOperator] = None,
occurrences: Optional[list[Occurrence]] = None,
enabled: Optional[bool] = None,
)
Short-term storage additional constraint update.
See the class STStorageAdditionalConstraint
for more details on the parameters.
STStorageGroup
Short-term storage group possibilities.
Attributes:
-
PSP_OPEN–Open cycle Pump-Storage Plants.
-
PSP_CLOSED–Closed cycle Pump-Storage Plants.
-
PONDAGE–Small water storage behind the weir of a run-of-the-river hydroelectric power plant
-
BATTERY–Battery.
-
OTHER1–Other 1.
-
OTHER2–Other 2.
-
OTHER3–Other 3.
-
OTHER4–Other 4.
-
OTHER5–Other 5.
STStorageProperties
dataclass
STStorageProperties(
group: str = value,
injection_nominal_capacity: float = 0,
withdrawal_nominal_capacity: float = 0,
reservoir_capacity: float = 0,
efficiency: float = 1,
initial_level: float = 0.5,
initial_level_optim: bool = False,
enabled: bool = True,
efficiency_withdrawal: Optional[float] = None,
penalize_variation_injection: Optional[bool] = None,
penalize_variation_withdrawal: Optional[bool] = None,
allow_overflow: Optional[bool] = None,
)
Short-term storage properties.
Attributes:
-
group(str) –Group of short term storage (
PSP_OPEN,PSP_CLOSED,PONDAGE,BATTERYorOTHER). -
injection_nominal_capacity(float) –The maximal flow in MW that can be injected into the storage.
-
withdrawal_nominal_capacity(float) –The maximal flow in MW that can be withdraw from the storage.
-
reservoir_capacity(float) –The maximal capacity in MWh of the storage.
-
efficiency(float) –The injection energy efficiency which is the ratio between the stored energy and the energy taken from the system.
-
initial_level(float) –To be considered only if
initial_level_optim = False, in this case corresponds to the ratio of the storage level between empty0and full1. -
initial_level_optim(bool) –Whether to allow reoptimization of the initial storage level each week. In this case the level is discontinuous between weeks. Otherwise, the initial level is imposed by the user and is identical each week.
-
enabled(bool) –Whether the storage is included in the model.
-
efficiency_withdrawal(Optional[float]) –The withdrawal energy efficiency which is the ratio between the stored energy and the energy returned to the system.
-
penalize_variation_injection(Optional[bool]) –Whether to create new variables to penalize the variation in the injection flowrate.
-
penalize_variation_withdrawal(Optional[bool]) –Whether to create new variables to penalize the variation in the withdrawal flowrate.
-
allow_overflow(Optional[bool]) –Whether to allow overflow of the storage.
STStoragePropertiesUpdate
dataclass
STStoragePropertiesUpdate(
group: Optional[str] = None,
injection_nominal_capacity: Optional[float] = None,
withdrawal_nominal_capacity: Optional[float] = None,
reservoir_capacity: Optional[float] = None,
efficiency: Optional[float] = None,
initial_level: Optional[float] = None,
initial_level_optim: Optional[bool] = None,
enabled: Optional[bool] = None,
efficiency_withdrawal: Optional[float] = None,
penalize_variation_injection: Optional[bool] = None,
penalize_variation_withdrawal: Optional[bool] = None,
allow_overflow: Optional[bool] = None,
)
Short-term storage properties update.
Attributes:
-
group(Optional[str]) –Group of short term storage (
PSP_OPEN,PSP_CLOSED,PONDAGE,BATTERYorOTHER). -
injection_nominal_capacity(Optional[float]) –The maximal flow in MW that can be injected into the storage.
-
withdrawal_nominal_capacity(Optional[float]) –The maximal flow in MW that can be withdraw from the storage.
-
reservoir_capacity(Optional[float]) –The maximal capacity in MWh of the storage.
-
efficiency(Optional[float]) –The injection energy efficiency which is the ratio between the stored energy and the energy taken from the system.
-
initial_level(Optional[float]) –To be considered only if
initial_level_optim = False, in this case corresponds to the ratio of the storage level between empty0and full1. -
initial_level_optim(Optional[bool]) –Whether to allow reoptimization of the initial storage level each week. In this case the level is discontinuous between weeks. Otherwise, the initial level is imposed by the user and is identical each week.
-
enabled(Optional[bool]) –Whether the storage is included in the model.
-
efficiency_withdrawal(Optional[float]) –The withdrawal energy efficiency which is the ratio between the stored energy and the energy returned to the system.
-
penalize_variation_injection(Optional[bool]) –Whether to create new variables to penalize the variation in the injection flowrate.
-
penalize_variation_withdrawal(Optional[bool]) –Whether to create new variables to penalize the variation in the withdrawal flowrate.
-
allow_overflow(Optional[bool]) –Whether to allow overflow of the storage.