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
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release notes

## Unversioned
## Version 0.12.0 (2026-04-16)

### Breaking changes

Expand All @@ -11,6 +11,10 @@
* Removed legacy constructors for `TransInvData` (you can see how to update existing models in *[the documentation of `EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/stable/how-to/update-models/#how_to-update-05-inv_data)).
* Removed legacy constructors for `GeoAvailability`, `PipeSimple`, and `PipeLinepackSimple` (you can see how to update existing models in *[the documentation of `EnergyModelsGeography`](https://energymodelsx.github.io/EnergyModelsGeography.jl/stable/how-to/update-models/#how_to-update-09))

### Minor updates

* Adjustments to the documentation.

## Version 0.11.6 (2026-04-15)

### Add support for resource-specific constraint functions
Expand Down
4 changes: 2 additions & 2 deletions docs/src/area_mode/area.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ with square brackets, while functions are represented as

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

with paranthesis.
with parantheses.

In addition, we simplify the description as:

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

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

with paranthesis.
with parantheses.

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

Expand Down
4 changes: 2 additions & 2 deletions docs/src/area_mode/mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The fields of the types are given as:
The transmission loss is calculated as a ratio of the transported resource.
It is an absolute ratio, *i.e.*, it is not dependent on the distance of the transmission corridor.
- **`opex_var::TimeProfile`**:\
The variable operational expenses are based on the capacity utilization through the variable [`:trans_out`](@ref man-opt_var-transmission_mode).
The variable operating expenses are based on the capacity utilization through the variable [`:trans_out`](@ref man-opt_var-transmission_mode).
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 @@ -97,7 +97,7 @@ with square brackets, while functions are represented as

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

with paranthesis.
with parantheses.

### [Variables](@id area_mode-trans_mode-math-var)

Expand Down
2 changes: 1 addition & 1 deletion ext/EMIExt/EMIExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EMI.get_var_inst(m, prefix::Symbol, tm::EMG.TransmissionMode) = m[Symbol(prefix
EMI.investment_data(tm::EMG.TransmissionMode, field::Symbol)

Return the `InvestmentData` of the transmission mode `tm` or if `field` is specified, it
returns the `InvData` for the corresponding capacity.
returns the `InvestmentData` for the corresponding capacity.
"""
EMI.investment_data(tm::EMG.TransmissionMode) =
tm.data[findfirst(data -> typeof(data) <: InvestmentData, mode_data(tm))]
Expand Down
8 changes: 5 additions & 3 deletions src/constraint_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ end
"""
constraints_capacity(m, tm::PipeLinepackSimple, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the maximum capacity of a [`PipeLinepackSimple`](@ref).
Method for creating the constraint on the maximum capacity of a [`PipeLinepackSimple`](@ref).

The difference is given by the inclusion of the linepack storage level constraint.
The function introduces in addition an upper bound on the linepack storage level.
"""
function constraints_capacity(m, tm::PipeLinepackSimple, 𝒯::TimeStructure, modeltype::EnergyModel)

Expand Down Expand Up @@ -157,7 +157,9 @@ end
"""
constraints_trans_balance(m, tm::PipeLinepackSimple, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the transmission balance for a [`PipeLinepackSimple`](@ref).
Method for creating the transmission balance for a [`PipeLinepackSimple`](@ref).

It adds the linepack level balance.
"""
function constraints_trans_balance(m, tm::PipeLinepackSimple, 𝒯::TimeStructure, modeltype::EnergyModel)

Expand Down
15 changes: 11 additions & 4 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Declaration of different OPEX variables for the element types introduced in
only `ℒᵗʳᵃⁿˢ::Vector{Transmission}` requires operational expense variables.

!!! note "Transmission variables"
The operational expenses variables are only created for [`TransmissionMode`](@ref)s and
The operating expenses variables are only created for [`TransmissionMode`](@ref)s and
not [`Transmission`](@ref) corridors. The OPEX variables are furthermore only created
for nodes, if the function [`has_opex(tm::TransmissionMode)`](@ref) has received an
additional method for a given mode `m` returning the value `true`. By default, this
Expand Down Expand Up @@ -161,8 +161,13 @@ function EMB.variables_opex(m, 𝒜::Vector{<:Area}, 𝒳ᵛᵉᶜ, 𝒯, modelt
EMB.variables_capex(m, ℒᵗʳᵃⁿˢ::Vector{Transmission}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)
EMB.variables_capex(m, 𝒜::Vector{<:Area}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel)

Create variables for the capital costs for the investments in transmission.
Empty function to allow for multiple dispatch in the `EnergyModelsInvestment` package.

Declaration of different capital expenditures variables for the element types introduced in
`EnergyModelsGeography`. `EnergyModelsGeography` introduces two elements for an energy
system, and hence, provides the user with two individual methods.

!!! note
The function is included for legacy support but will be removed in the near future.
"""
function EMB.variables_capex(m, ℒᵗʳᵃⁿˢ::Vector{Transmission}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel) end
function EMB.variables_capex(m, 𝒜::Vector{<:Area}, 𝒳ᵛᵉᶜ, 𝒯, modeltype::EnergyModel) end
Expand Down Expand Up @@ -503,7 +508,7 @@ end
EMB.objective_operational(m, 𝒜::Vector{<:Area}, 𝒯ᴵⁿᵛ::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 Expand Up @@ -551,6 +556,8 @@ function EMB.create_node(m, n::GeoAvailability, 𝒯, 𝒫, modeltype::EnergyMod

Set all constraints for an [`Area`](@ref). Can serve as fallback option for all unspecified
subtypes of `Area`.

The default method does not add any constraints.
"""
function create_area(m, a::Area, 𝒯, ℒᵗʳᵃⁿˢ, modeltype) end

Expand Down
6 changes: 3 additions & 3 deletions src/structures/area.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
Area <: AbstractElement
abstract type Area <: AbstractElement

Declaration of the general type for areas.
"""
abstract type Area <: AbstractElement end

"""
RefArea <: Area
struct RefArea <: Area

A `RefArea` is an area representation with no additional constraints on energy/mass exchange.

Expand All @@ -27,7 +27,7 @@ end
Base.show(io::IO, a::Area) = print(io, "$(a.name)")

"""
LimitedExchangeArea <: Area
struct LimitedExchangeArea <: Area

A `LimitedExchangeArea` is an area in which the export is limited in each individual
operational period for the provided resources. This can be necessary when an area is
Expand Down
4 changes: 2 additions & 2 deletions src/structures/mode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ directions(tm::TransmissionMode) = tm.directions
"""
has_opex(tm::TransmissionMode)

Checks whether transmission mode `tm` has operational expenses.
Checks whether transmission mode `tm` has operating expenses.

By default, all transmission modes have operational expenses.
By default, all transmission modes have operating expenses.
"""
EMB.has_opex(tm::TransmissionMode) = true

Expand Down
Loading