Skip to content

Commit 9f58fc9

Browse files
committed
Add new functions to docs and reset inline comments
1 parent 0692c5c commit 9f58fc9

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

docs/src/library/internals/functions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ emissions_operational
2828
constraints_emissions
2929
constraints_elements
3030
constraints_couple
31+
constraints_couple_resource
32+
constraints_resource
3133
constraints_level_iterate
3234
constraints_level_rp
3335
constraints_level_scp
@@ -39,6 +41,7 @@ constraints_level_bounds
3941
```@docs
4042
variables_capacity
4143
variables_flow
44+
variables_flow_resource
4245
variables_opex
4346
variables_capex
4447
variables_emission
@@ -96,4 +99,6 @@ res_sub
9699
```@docs
97100
collect_types
98101
sort_types
102+
res_types
103+
res_types_seg
99104
```

src/model.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ function create_node(m, n::Sink, 𝒯, 𝒫, modeltype::EnergyModel)
981981
end
982982

983983
"""
984-
create_node(m, n::Availability, 𝒯, 𝒫::Vector{<:Resource}, modeltype::EnergyModel)
984+
create_node(m, n::Availability, 𝒯, 𝒫, modeltype::EnergyModel)
985985
986986
Set all constraints for a `Availability`. Can serve as fallback option for all unspecified
987987
subtypes of `Availability`.
@@ -992,6 +992,7 @@ available node except if one wants to include as well transport between differen
992992
"""
993993
function create_node(m, n::Availability, 𝒯, 𝒫, modeltype::EnergyModel)
994994

995+
# Mass/energy balance constraints for an availability node.
995996
@constraint(m, [t 𝒯, p inputs(n)],
996997
m[:flow_in][n, t, p] == m[:flow_out][n, t, p]
997998
)
@@ -1018,18 +1019,17 @@ function create_link(m, l::Link, 𝒯, 𝒫, modeltype::EnergyModel)
10181019
return create_link(m, 𝒯, 𝒫, l, modeltype, formulation(l))
10191020
end
10201021
function create_link(m, l::Direct, 𝒯, 𝒫, modeltype::EnergyModel)
1021-
1022+
# Generic link in which each output corresponds to the input
10221023
@constraint(m, [t 𝒯, p link_res(l)],
10231024
m[:link_out][l, t, p] == m[:link_in][l, t, p]
10241025
)
10251026
end
10261027
function create_link(m, 𝒯, 𝒫, l::Link, modeltype::EnergyModel, formulation::Formulation)
1027-
10281028
# Generic link in which each output corresponds to the input
10291029
@constraint(m, [t 𝒯, p link_res(l)],
10301030
m[:link_out][l, t, p] == m[:link_in][l, t, p]
10311031
)
1032-
1032+
10331033
# Call of the function for limiting the capacity to the maximum installed capacity
10341034
if has_capacity(l)
10351035
constraints_capacity_installed(m, l, 𝒯, modeltype)

0 commit comments

Comments
 (0)