Skip to content

Commit 4cffb4b

Browse files
committed
Updated docs-strings
1 parent 9f58fc9 commit 4cffb4b

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

src/model.jl

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,13 @@ end
283283
variables_flow_resource(m, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel)
284284
variables_flow_resource(m, 𝒩::Vector{<:Node}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel)
285285
286-
Declaration of flow variables for the differrent resource types.
286+
Create resource-specific flow variables for links or nodes.
287287
288-
The default method is empty but it is required for multiple dispatch in energy flow models.
288+
This function is called from [`variables_flow`](@ref) for each subset of resources
289+
sharing the same type. It can be used to add variables and bounds for specialized
290+
resource classes while keeping the default flow variables unchanged.
291+
292+
The default methods are empty and intended to be implemented in extension packages.
289293
"""
290294
function variables_flow_resource(m, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end
291295
function variables_flow_resource(m, 𝒩::Vector{<:Node}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end
@@ -618,18 +622,16 @@ end
618622

619623
"""
620624
constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel)
625+
constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel)
621626
622-
Create constraints for the flow of resources through a node for specific resource types.
623-
The function is empty by default and can be implemented in the extension packages.
624-
"""
625-
function constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end
627+
Create constraints for the flow of resources through an [`AbstractElement`](@ref) for
628+
specific resource types. In `EnergyModelsBase`, this method is provided for
629+
[`Node`](@ref EnergyModelsBase.Node) and [`Link`](@ref).
626630
631+
The function is empty by default and can be implemented in extension packages.
627632
"""
628-
constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel)
633+
function constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end
629634

630-
Create constraints for the flow of resources through a link for specific resource types.
631-
The function is empty by default and can be implemented in the extension packages.
632-
"""
633635
function constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end
634636

635637
"""
@@ -675,7 +677,13 @@ end
675677
"""
676678
constraints_couple_resource(m, 𝒩::Vector{<:Node}, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel)
677679
678-
Create constraints for output flowrate and input links.
680+
Create resource-specific coupling constraints between nodes and links.
681+
682+
This function is called from [`constraints_couple`](@ref) for each subset of resources
683+
sharing the same type. It can be used to add additional coupling constraints for
684+
specialized resource classes while keeping the default node-link flow balance unchanged.
685+
686+
The default method is empty and intended to be implemented in extension packages.
679687
"""
680688
function constraints_couple_resource(m, 𝒩::Vector{<:Node}, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end
681689

0 commit comments

Comments
 (0)