|
283 | 283 | variables_flow_resource(m, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) |
284 | 284 | variables_flow_resource(m, 𝒩::Vector{<:Node}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) |
285 | 285 |
|
286 | | -Declaration of flow variables for the differrent resource types. |
| 286 | +Create resource-specific flow variables for links or nodes. |
287 | 287 |
|
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. |
289 | 293 | """ |
290 | 294 | function variables_flow_resource(m, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end |
291 | 295 | function variables_flow_resource(m, 𝒩::Vector{<:Node}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end |
@@ -618,18 +622,16 @@ end |
618 | 622 |
|
619 | 623 | """ |
620 | 624 | constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) |
| 625 | + constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) |
621 | 626 |
|
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). |
626 | 630 |
|
| 631 | +The function is empty by default and can be implemented in extension packages. |
627 | 632 | """ |
628 | | - constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) |
| 633 | +function constraints_resource(m, n::Node, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end |
629 | 634 |
|
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 | | -""" |
633 | 635 | function constraints_resource(m, l::Link, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel) end |
634 | 636 |
|
635 | 637 | """ |
|
675 | 677 | """ |
676 | 678 | constraints_couple_resource(m, 𝒩::Vector{<:Node}, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) |
677 | 679 |
|
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. |
679 | 687 | """ |
680 | 688 | function constraints_couple_resource(m, 𝒩::Vector{<:Node}, ℒ::Vector{<:Link}, 𝒫::Vector{<:Resource}, 𝒯, modeltype::EnergyModel) end |
681 | 689 |
|
|
0 commit comments