Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Release Notes

## Unversioned
## Version 0.8.0 (2026-04-13)

* Adjusted to [`EnergyModelsBase` v0.10.0](https://github.com/EnergyModelsX/EnergyModelsBase.jl/releases/tag/v0.10.0):
* Model worked without adjustments.
* Adjustments required due to different behavior when investments are included due to the change in [`EnergyModelsInvestments` 0.9](https://github.com/EnergyModelsX/EnergyModelsInvestments.jl/releases/tag/v0.9.0).
* Removed requirement of `CO2Storage` to use `AccumulatingStrategic` to allow for a simpler application of the receding horizon framework.
* Reworked the test set of `CO2Storage`.

## Version 0.7.6 (2025-02-10)

Expand Down
10 changes: 6 additions & 4 deletions docs/src/nodes/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ It introduces a new *[storage behavior](@extref EnergyModelsBase lib-pub-nodes-s
This storage behavior is called [`EnergyModelsCO2.AccumulatingStrategic`](@ref).

!!! info "`StorageBehaviour` for `CO2Storage` nodes"
[`CO2Storage`](@ref) nodes utilize an inner constructor for specifying the storage behavior.
This means that they can only be created with [`EnergyModelsCO2.AccumulatingStrategic`](@ref).
If you plan to include a temporary CO₂ storage node, *e.g.* for storing captured CO₂ for subsequent utilization, it is best to utilize the [`RefStorage`](@extref EnergyModelsBase.RefStorage) node.
[`CO2Storage`](@ref) nodes utilize an outer constructor for specifying the storage behavior.
This means that they can be automatically created with [`EnergyModelsCO2.AccumulatingStrategic`](@ref).
If you plan to include a temporary CO₂ storage node, *e.g.* for storing captured CO₂ for subsequent utilization, it is best to utilize the [`RefStorage`](@extref EnergyModelsBase.RefStorage) node.

The application of [`EnergyModelsRecedingHorizon`](https://github.com/EnergyModelsX/EnergyModelsRecedingHorizon.jl) requires you however to specify [`RecedingAccumulating`](https://github.com/EnergyModelsX/EnergyModelsRecedingHorizon.jl/blob/bc8832727c5df81f0f678618058bf524dc5d6987/src/structures/data.jl#L7).

### [Standard fields](@id nodes-co2_storage-fields-stand)

Expand Down Expand Up @@ -48,7 +50,7 @@ The standard fields are given as:
In the current version, it is only relevant for additional investment data when [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/) is used.

!!! danger "The field `output`"
CO₂ storage nodes do not allow for the specification of an outlet field.
CO₂ storage nodes do not allow for the specification of an output field.
Their sole intention is to serve as permanent storage nodes.
Hence, although the field `output` is included in the composite type, it cannot be provided.

Expand Down
41 changes: 20 additions & 21 deletions src/datastructures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ increase during all strategic periods (sp), *i.e.*, the stored resource can not
taken out of the storage.

The initial storage level in a strategic period is set to the storage level at
the end of the prevoious sp. Note that the increased storage level during a sp
the end of the previous sp. Note that the increased storage level during a sp
is multiplied with the length of the sp when the initial storage level for the
next sp is set.

This is achieved through the parametric input [`AccumulatingStrategic`](@ref). This input
is not a required input due to the utilization of an inner constructor.
is not a required input due to the utilization of an outer constructor.

# Fields
- **`id`** is the name/identifyer of the node.
Expand All @@ -80,39 +80,38 @@ struct CO2Storage{T} <: Storage{T}
stor_res::ResourceEmit
input::Dict{<:Resource,<:Real}
data::Array{<:Data}

function CO2Storage(
id::Any,
charge::EMB.UnionCapacity,
level::EMB.UnionCapacity,
stor_res::ResourceEmit,
input::Dict{<:Resource,<:Real},
data::Array{<:Data},
end
function CO2Storage{T}(
id,
charge::EMB.UnionCapacity,
level::EMB.UnionCapacity,
stor_res::Resource,
input::Dict{<:Resource,<:Real},
) where {T}
return CO2Storage{T}(
id,
charge,
level,
stor_res,
input,
Data[],
)
new{AccumulatingStrategic}(
id,
charge,
level,
stor_res,
input,
data
)
end
end
function CO2Storage(
id,
charge::EMB.UnionCapacity,
level::EMB.UnionCapacity,
stor_res::Resource,
input::Dict{<:Resource,<:Real},
data=Data[],
)
return CO2Storage(
return CO2Storage{AccumulatingStrategic}(
id,
charge,
level,
stor_res,
input,
Data[],
data,
)
end
EMB.has_emissions(n::CO2Storage) = true
Expand Down
Loading
Loading