@@ -646,13 +646,15 @@ function constraints_couple(m, 𝒩::Vector{<:Node}, ℒ::Vector{<:Link}, 𝒫,
646646 for n ∈ 𝒩
647647 ℒᶠʳᵒᵐ, ℒᵗᵒ = link_sub (ℒ, n)
648648
649+ # Constraint for output flowrate and input links.
649650 if has_output (n)
650651 @constraint (m, [t ∈ 𝒯, p ∈ outputs (n)],
651652 m[:flow_out ][n, t, p] ==
652653 sum (m[:link_in ][l, t, p] for l ∈ ℒᶠʳᵒᵐ if p ∈ inputs (l))
653654 )
654655 end
655656
657+ # Constraint for input flowrate and output links.
656658 if has_input (n)
657659 @constraint (m, [t ∈ 𝒯, p ∈ inputs (n)],
658660 m[:flow_in ][n, t, p] ==
@@ -991,7 +993,7 @@ available node except if one wants to include as well transport between differen
991993function create_node (m, n:: Availability , 𝒯, 𝒫, modeltype:: EnergyModel )
992994
993995 @constraint (m, [t ∈ 𝒯, p ∈ inputs (n)],
994- m[:flow_in ][n, t, p] == m[:flow_out ][n, t, p]
996+ m[:flow_in ][n, t, p] == m[:flow_out ][n, t, p]
995997 )
996998end
997999
@@ -1015,17 +1017,17 @@ function create_link(m, l::Link, 𝒯, 𝒫, modeltype::EnergyModel)
10151017 )
10161018 return create_link (m, 𝒯, 𝒫, l, modeltype, formulation (l))
10171019end
1018- function create_link (m, l:: Direct , 𝒯, 𝒫:: Vector{<:Resource} , modeltype:: EnergyModel )
1020+ function create_link (m, l:: Direct , 𝒯, 𝒫, modeltype:: EnergyModel )
10191021
10201022 @constraint (m, [t ∈ 𝒯, p ∈ link_res (l)],
1021- m[:link_out ][l, t, p] == m[:link_in ][l, t, p]
1023+ m[:link_out ][l, t, p] == m[:link_in ][l, t, p]
10221024 )
10231025end
1024- function create_link (m, l :: Link , 𝒯, 𝒫:: Vector{<:Resource} , modeltype:: EnergyModel , formulation:: Formulation )
1026+ function create_link (m, 𝒯, 𝒫, l :: Link , modeltype:: EnergyModel , formulation:: Formulation )
10251027
10261028 # Generic link in which each output corresponds to the input
10271029 @constraint (m, [t ∈ 𝒯, p ∈ link_res (l)],
1028- m[:link_out ][l, t, p] == m[:link_in ][l, t, p]
1030+ m[:link_out ][l, t, p] == m[:link_in ][l, t, p]
10291031 )
10301032
10311033 # Call of the function for limiting the capacity to the maximum installed capacity
0 commit comments