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
15 changes: 11 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Release notes

## Unversioned
## Version 0.9.5 (2026-03-25)

* New functions (`variables_flow_resource()`, `constraints_resource()`, `constraints_couple_resource()`) that dispatch on resource types, which allow for creation of new resource-specific variables and constraints in extension packages.
* New function to indentify the unique resource types of a vector of resources
* New function that segments the vector of resources into sub-vectors based on each resource type
### Minor updates

* Minor updates in the documentation.

### Support for resource specific variables and constraints

* New functions (`variables_flow_resource()`, `constraints_resource()`, `constraints_couple_resource()`) that dispatch on resource types.
* New function to indentify the unique resource types of a vector of resources.
* New function that segments the vector of resources into sub-vectors based on each resource type.
* This allows for creation of new resource-specific variables and constraints in extension packages.

## Version 0.9.4 (2025-11-26)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/nodes/availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ with square brackets, while functions are represented as

``func\_example(index_1, index_2)``

with paranthesis.
with parantheses.

### [Variables](@id nodes-availability-math-var)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/nodes/networknode.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The fields of a [`RefNetworkNode`](@ref) are given as:
If the node should contain investments through the application of [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/), it is important to note that you can only use `FixedProfile` or `StrategicProfile` for the capacity, but not `RepresentativeProfile` or `OperationalProfile`.
In addition, all values have to be non-negative.
- **`opex_var::TimeProfile`**:\
The variable operational expenses are based on the capacity utilization through the variable [`:cap_use`](@ref man-opt_var-cap).
The variable operating expenses are based on the capacity utilization through the variable [`:cap_use`](@ref man-opt_var-cap).
Hence, it is directly related to the specified `input` and `output` ratios.
The variable operating expenses can be provided as `OperationalProfile` as well.
- **`opex_fixed::TimeProfile`**:\
Expand Down Expand Up @@ -54,7 +54,7 @@ with square brackets, while functions are represented as

``func\_example(index_1, index_2)``

with paranthesis.
with parantheses.

### [Variables](@id nodes-network_node-math-var)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/nodes/sink.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ with square brackets, while functions are represented as

``func\_example(index_1, index_2)``

with paranthesis.
with parantheses.

### [Variables](@id nodes-sink-math-var)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/nodes/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The fields of a [`RefSource`](@ref) node are given as:
If the node should contain investments through the application of [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/), it is important to note that you can only use `FixedProfile` or `StrategicProfile` for the capacity, but not `RepresentativeProfile` or `OperationalProfile`.
In addition, all values have to be non-negative.
- **`opex_var::TimeProfile`**:\
The variable operational expenses are based on the capacity utilization through the variable [`:cap_use`](@ref man-opt_var-cap).
The variable operating expenses are based on the capacity utilization through the variable [`:cap_use`](@ref man-opt_var-cap).
Hence, it is directly related to the specified `output` ratios.
The variable operating expenses can be provided as `OperationalProfile` as well.
- **`opex_fixed::TimeProfile`**:\
Expand Down Expand Up @@ -57,7 +57,7 @@ with square brackets, while functions are represented as

``func\_example(index_1, index_2)``

with paranthesis.
with parantheses.

### [Variables](@id nodes-source-math-var)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/nodes/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ As a consequence, a new abstract type is specified.
## [Philosophy of Storage nodes](@id nodes-storage-phil)

[`Storage`](@ref) nodes differ from the other nodes as they are designed per default as *[parametric types](https://docs.julialang.org/en/v1/manual/types/#man-parametric-composite-types)* using the concept of [`EnergyModelsBase.StorageBehavior`](@ref).
In addition, capacities and operational expenses are not included at the first level of the composite type, but instead on a lower level.
In addition, capacities and operating expenses are not included at the first level of the composite type, but instead on a lower level.

### [Parametric implementation](@id nodes-storage-phil-parametric)

Expand Down Expand Up @@ -106,7 +106,7 @@ with square brackets, while functions are represented as

``func\_example(index_1, index_2)``

with paranthesis.
with parantheses.

### [Variables](@id nodes-storage-math-var)

Expand Down
4 changes: 1 addition & 3 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ The default methods are empty and intended to be implemented in extension packag
function variables_flow_resource(m, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end
function variables_flow_resource(m, 𝒩::Vector{<:Node}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end


"""
variables_opex(m, 𝒩::Vector{<:Node}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)
variables_opex(m, ℒ::Vector{<:Link}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)
Expand Down Expand Up @@ -641,7 +640,6 @@ specific resource types. In `EnergyModelsBase`, this method is provided for
The function is empty by default and can be implemented in extension packages.
"""
function constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end

function constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end

"""
Expand Down Expand Up @@ -789,7 +787,7 @@ end
objective_operational(m, 𝒳, 𝒯ᴵⁿᵛ::TS.AbstractStratPers, modeltype::EnergyModel)

Create JuMP expressions indexed over the investment periods `𝒯ᴵⁿᵛ` for different elements 𝒳.
The expressions correspond to the operational expenses of the different elements.
The expressions correspond to the operating expenses of the different elements.
The expressions are not discounted and do not take the duration of the investment periods
into account.

Expand Down
6 changes: 3 additions & 3 deletions src/structures/link.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ has_capacity(l::Link) = false
"""
has_opex(l::Link)

Checks whether link `l` has operational expenses.
Checks whether link `l` has operating expenses.

By default, links do not have operational expenses. You must dispatch on this function if
you want to introduce links with operational expenses.
By default, links do not have operating expenses. You must dispatch on this function if
you want to introduce links with operating expenses.
"""
has_opex(l::Link) = false

Expand Down
4 changes: 2 additions & 2 deletions src/structures/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,9 @@ has_capacity(n::Availability) = false
"""
has_opex(n::Node)

Checks whether node `n` has operational expenses.
Checks whether node `n` has operating expenses.

By default, all nodes except for [`Availability`](@ref) nodes do have operational expenses.
By default, all nodes except for [`Availability`](@ref) nodes do have operating expenses.
"""
has_opex(n::Node) = true
has_opex(n::Availability) = false
Expand Down
Loading