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: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* Breaking change required as early retirement is now allowed.
* Early retirement can change the model behavior.

### Other

* Minor updates to the documentation.

## Version 0.8.3 (2025-08-17)

### Bugfix
Expand Down
20 changes: 10 additions & 10 deletions docs/src/library/internals/methods-EMB.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ Pages = ["methods-EMB.md"]
## [Extension methods](@id lib-int-met_emb-ext)

```@docs
EnergyModelsBase.variables_node
EnergyModelsBase.create_node
EMB.variables_node
EMB.create_node
```

## [Constraint methods](@id lib-int-met_emb-con)

```@docs
EnergyModelsBase.constraints_capacity
EnergyModelsBase.constraints_flow_in
EnergyModelsBase.constraints_flow_out
EnergyModelsBase.constraints_opex_var
EMB.constraints_capacity
EMB.constraints_flow_in
EMB.constraints_flow_out
EMB.constraints_opex_var
```

## [Check methods](@id lib-int-met_emb-check)

```@docs
EnergyModelsBase.check_node
EnergyModelsBase.check_node_data
EMB.check_node
EMB.check_node_data
```

## [Field extraction methods](@id lib-int-met_emb-field)

```@docs
EnergyModelsBase.inputs
EnergyModelsBase.outputs
EMB.inputs
EMB.outputs
```
36 changes: 18 additions & 18 deletions docs/src/library/internals/methods-EMH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ Pages = ["methods-EMH.md"]
## [Constraint methods](@id lib-int-met-con)

```@docs
EnergyModelsHydrogen.constraints_usage
EnergyModelsHydrogen.constraints_usage_sp
EnergyModelsHydrogen.constraints_usage_iterate
EnergyModelsHydrogen.constraints_previous_usage
EnergyModelsHydrogen.constraints_rate_of_change_iterate
EnergyModelsHydrogen.constraints_rate_of_change
EnergyModelsHydrogen.constraints_state_seq_iter
EnergyModelsHydrogen.constraints_state_seq
EnergyModelsHydrogen.constraints_state_time_iter
EMH.constraints_usage
EMH.constraints_usage_sp
EMH.constraints_usage_iterate
EMH.constraints_previous_usage
EMH.constraints_rate_of_change_iterate
EMH.constraints_rate_of_change
EMH.constraints_state_seq_iter
EMH.constraints_state_seq
EMH.constraints_state_time_iter
```

## [Check methods](@id lib-int-met-check)

```@docs
EnergyModelsHydrogen.check_load_lim
EnergyModelsHydrogen.check_commitment_profile
EMH.check_load_lim
EMH.check_commitment_profile
```

## [Utility methods](@id lib-int-met-util)

```@docs
EnergyModelsHydrogen.capacity_max
EnergyModelsHydrogen.linear_reformulation
EnergyModelsHydrogen.multiplication_variables
EnergyModelsHydrogen.fix_elect_on_b
EnergyModelsHydrogen.ramp_disjunct
EnergyModelsHydrogen.compression_energy
EnergyModelsHydrogen.energy_curve
EMH.capacity_max
EMH.linear_reformulation
EMH.multiplication_variables
EMH.fix_elect_on_b
EMH.ramp_disjunct
EMH.compression_energy
EMH.energy_curve
```
56 changes: 28 additions & 28 deletions docs/src/library/internals/methods-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,73 @@ Pages = ["methods-fields.md"]
## [`AbstractElectrolyzer` types](@id lib-int-met_field-elec)

```@docs
EnergyModelsHydrogen.degradation_rate
EnergyModelsHydrogen.stack_replacement_cost
EnergyModelsHydrogen.stack_lifetime
EMH.degradation_rate
EMH.stack_replacement_cost
EMH.stack_lifetime
```

## [`AbstractReformer` types](@id lib-int-met_field-ref)

```@docs
EnergyModelsHydrogen.opex_startup
EnergyModelsHydrogen.opex_shutdown
EnergyModelsHydrogen.opex_off
EnergyModelsHydrogen.time_startup
EnergyModelsHydrogen.time_shutdown
EnergyModelsHydrogen.time_off
EnergyModelsHydrogen.ramp_limit
EMH.opex_startup
EMH.opex_shutdown
EMH.opex_off
EMH.time_startup
EMH.time_shutdown
EMH.time_off
EMH.ramp_limit
```

## [`AbstractH2Storage` types](@id lib-int-met_field-abst_h2_stor)

```@docs
EnergyModelsHydrogen.discharge_charge
EnergyModelsHydrogen.level_charge
EMH.discharge_charge
EMH.level_charge
```

## [`HydrogenStorage` types](@id lib-int-met_field-h2_stor)

```@docs
EnergyModelsHydrogen.p_charge
EnergyModelsHydrogen.p_min
EnergyModelsHydrogen.p_max
EnergyModelsHydrogen.electricity_resource
EMH.p_charge
EMH.p_min
EMH.p_max
EMH.electricity_resource
```

## [`LoadLimit` and `Node` types](@id lib-int-met_field-loadlim)

```@docs
EnergyModelsHydrogen.min_load
EnergyModelsHydrogen.max_load
EMH.min_load
EMH.max_load
```

## [`AbstractRampParameters` and `AbstractReformer` types](@id lib-int-met_field-ramp)

```@docs
EnergyModelsHydrogen.ramp_up
EnergyModelsHydrogen.ramp_down
EMH.ramp_up
EMH.ramp_down
```

## [`CommitParameters` types](@id lib-int-met_field-commit)

```@docs
EnergyModelsHydrogen.opex_state
EnergyModelsHydrogen.time_state
EMH.opex_state
EMH.time_state
```

## [`ElecPeriods` types](@id lib-int-met_field-elec_per)

```@docs
TimeStruct.strat_periods
EnergyModelsHydrogen.strat_per
EnergyModelsHydrogen.op_per
EnergyModelsHydrogen.is_last
EMH.strat_per
EMH.op_per
EMH.is_last
```

## [`RefPeriods` types](@id lib-int-met_field-ref_per)

```@docs
EnergyModelsHydrogen.prev_op
EnergyModelsHydrogen.current_op
EnergyModelsHydrogen.last_op
EMH.prev_op
EMH.current_op
EMH.last_op
```
16 changes: 8 additions & 8 deletions docs/src/library/internals/types-EMH.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ Pages = ["types-EMH.md"]
## [Nodal supertypes](@id lib-int-types-node)

```@docs
EnergyModelsHydrogen.AbstractHydrogenNetworkNode
EnergyModelsHydrogen.AbstractElectrolyzer
EnergyModelsHydrogen.AbstractReformer
EnergyModelsHydrogen.AbstractH2Storage
EMH.AbstractHydrogenNetworkNode
EMH.AbstractElectrolyzer
EMH.AbstractReformer
EMH.AbstractH2Storage
```

## [Parameter supertypes](@id lib-int-types-para)

```@docs
EnergyModelsHydrogen.AbstractLoadLimits
EnergyModelsHydrogen.AbstractRampParameters
EMH.AbstractLoadLimits
EMH.AbstractRampParameters
```

## [Auxiliary types](@id lib-int-types-aux)

```@docs
EnergyModelsHydrogen.ElecPeriods
EnergyModelsHydrogen.RefPeriods
EMH.ElecPeriods
EMH.RefPeriods
```
4 changes: 2 additions & 2 deletions docs/src/nodes/electrolyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The standard fields are given as:
If the node should contain investments through the application of [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/stable/), 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 of an electrolysis node are based on the capacity utilization through the variable [`:cap_use`](@extref EnergyModelsBase man-opt_var-cap).
The variable operating expenses of an electrolysis node are based on the capacity utilization through the variable [`:cap_use`](@extref EnergyModelsBase 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 @@ -96,7 +96,7 @@ with square brackets, while functions are represented as

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

with paranthesis.
with parantheses.

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

Expand Down
4 changes: 2 additions & 2 deletions docs/src/nodes/h2_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ with square brackets, while functions are represented as

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

with paranthesis.
with parantheses.

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

Expand Down Expand Up @@ -362,7 +362,7 @@ The non-linear compression curve is implemented using a piecewise linear approac
```

Given the formulation, it is possible that some pressures are included twice and that the pressures are not sorted.
Hence, the ``\hat{\textbef{p}}`` is sorted and all duplicates are removed resulting in ``n_p`` break points.
Hence, the ``\hat{\textbf{p}}`` is sorted and all duplicates are removed resulting in ``n_p`` break points.

The required relative compression energy at each breakpoint ``\hat{W}_p`` is then calculated using the function [`energy_curve`](@ref EnergyModelsHydrogen.energy_curve) as described on *[Compression train](@ref aux-p_calc-train)*.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/nodes/reformer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The standard fields are given as:
If the node should contain investments through the application of [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/stable/), 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`](@extref EnergyModelsBase man-opt_var-cap).
The variable operating expenses are based on the capacity utilization through the variable [`:cap_use`](@extref EnergyModelsBase 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 @@ -83,7 +83,7 @@ with square brackets, while functions are represented as

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

with paranthesis.
with parantheses.

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

Expand Down
4 changes: 1 addition & 3 deletions src/checks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ additional check on the data.
- The values of the dictionary `input` are required to be non-negative.
- The values of the dictionary `output` are required to be non-negative.

- The lower limit on capacity utilization is required ot be non-negative while the upper
- The lower limit on capacity utilization is required to be non-negative while the upper
limit is required to be larger or equal than the lower limit as described in the
[`check_load_lim()`](@ref)

- The field `degradation_rate` is required to be in the range [0,1).
- The `TimeProfile` of the field `stack_replacement` is required to be non-negative and
accessible through a `StrategicPeriod` as outlined in the function
Expand Down Expand Up @@ -83,7 +82,6 @@ additional check on the data.
- The lower limit on capacity utilization is required ot be non-negative while the upper
limit is required to be larger or equal than the lower limit as described in the
[`check_load_lim()`](@ref)

- The field `opex` of the `CommitParameters` of the fields `startup`, `shutdown`, and `off`
is required to be non-negative.
- The field `time` of the `CommitParameters` of the fields `startup`, `shutdown`, and `off`
Expand Down
11 changes: 6 additions & 5 deletions src/constraints/electrolyzer.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""
constraints_usage(m, n::AbstractElectrolyzer, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the usage constraints for an AbstractElectrolyzer. These constraints
calculate the usage of the electrolyzer up to each time step for both the lifetime and the
degradation calculations.
Function for creating the usage constraints for an [`AbstractElectrolyzer`](@ref).

These constraints calculate the usage of the electrolyzer up to each time step for both the
lifetime and the degradation calculations.
"""
function constraints_usage(m, n::AbstractElectrolyzer, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)
# Mass/energy balance constraints for stored energy carrier.
Expand Down Expand Up @@ -204,8 +205,8 @@ end
modeltype::EnergyModel,
)

Returns the previous usage of an `AbstractElectrolyzer` node depending on the type of
[`PreviousPeriods`](@extref EnergyModelsBase.PreviousPeriods).
Function for creating the previous usage of an [`AbstractElectrolyzer`](@ref) node depending
on the type of [`PreviousPeriods`](@extref EnergyModelsBase.PreviousPeriods).

The basic functionality is used in the case when the previous operational period is a
`TimePeriod`, in which case it just returns the previous operational period.
Expand Down
18 changes: 9 additions & 9 deletions src/constraints/general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
modeltype::EnergyModel
)

Function for creating operational limits of an `AbstractHydrogenNetworkNode`.
Function for creating operational limits of an [`AbstractHydrogenNetworkNode`](@ref).

The operational limits limit the capacity usage of the electrolyzer node between a minimimum
and maximum load based on the installed capacity.
Expand Down Expand Up @@ -43,7 +43,7 @@ end
modeltype::EnergyModel
)

Function for creating the constraints on the `:stor_level`, `:stor_charge_use`, and
Method for creating the constraints on the `:stor_level`, `:stor_charge_use`, and
`:stor_discharge_use` variables for a [`AbstractH2Storage`](@ref) node.

The discharge `:stor_discharge_use` is limited by the installed charging capacity
Expand Down Expand Up @@ -80,13 +80,11 @@ end
"""
EMB.constraints_flow_in(m, n::HydrogenStorage, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the inlet flow to a [`HydrogenStorage`](@ref) node.
Method for creating the constraint on the inlet flow to a [`HydrogenStorage`](@ref) node.

It differs from the reference description by considering the dependency of the compression
power on the storage level.

This is achieved through calling the subfunction [`energy_curve`](@ref) for the different
breakpoints in the compression curve.
power on the storage level. This is achieved through calling the subfunction
[`energy_curve`](@ref) for the different breakpoints in the compression curve.
"""
function EMB.constraints_flow_in(m, n::HydrogenStorage, 𝒯::TimeStructure, modeltype::EnergyModel)
# Declaration of the required subsets
Expand Down Expand Up @@ -154,7 +152,8 @@ end
"""
EMB.constraints_flow_out(m, n::Electrolyzer, 𝒯::TimeStructure, modeltype::EnergyModel)

Function for creating the constraint on the outlet flow from an `Electrolyzer` node.
Method for creating the constraint on the outlet flow from an [`Electrolyzer`](@ref) node.

It differs from the reference description by taking into account stack degradation through
the variable `:elect_efficiency_penalty`.
"""
Expand All @@ -172,7 +171,8 @@ end
"""
EMB.constraints_opex_var(m, n::Reformer, 𝒯ᴵⁿᵛ, modeltype::EnergyModel)

Function for creating the constraint on the variable OPEX of a `Reformer` node.
Method for creating the constraint on the variable OPEX of a [`Reformer`](@ref) node.

It differs from the reference description through the incorporation of additional costs
in each state of the node.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ end
"""
EMB.create_node(m, n::AbstractElectrolyzer, 𝒯, 𝒫, modeltype::EnergyModel)

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

It differs from the function for a standard [`RefNetworkNode`](@extref EnergyModelsBase.RefNetworkNode)
node through both calling additional functions as well as for calculations within the function.
Expand Down
Loading
Loading