Skip to content

Commit

Permalink
Fixing voltage on substation.
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemarkson committed Sep 2, 2023
1 parent 4444874 commit 5b86191
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ function build_model(path2main, optimizer; is_direct=false)
# )

# This fixes the voltage of the substation nodes.
for s = Ωˢˢ, t = T, b = B, h = Sᴿᵂ
JuMP.fix(vₛₜᵦₕ[s, t, b, h], Vˢˢ; force=true)
end
# JuMP.@constraint(model, eq7_aux[s=Ωˢˢ,t=T,b=B],
# vₛₜᵦ[s,t,b] == Vˢˢ
# )
# for s = Ωˢˢ, t = T, b = B, h = Sᴿᵂ
# JuMP.fix(vₛₜᵦₕ[s, t, b, h], Vˢˢ; force=true)
# end

# This makes voltage == Vˢˢ if the node has trasnformer.
JuMP.@constraint(model, eq7_aux[s=Ωˢˢ,t=T,b=B,h=Sᴿᵂ],
vₛₜᵦₕ[s,t,b,h] == Vˢˢ * sum(sum(yᵗʳₛₖₜ[tr, s, k, t] for k in Kᵗʳ[tr]) for tr in TR)
)

JuMP.@constraint(model, eq8[l=L, r=Ωᴺ, s=Ωˡₛ[l][r], k=Kˡ[l], t=T, b=B, h=Sᴿᵂ],
fˡₛᵣₖₜᵦₕ[l, s, r, k, t, b, h] yˡₛᵣₖₜ[l, s, r, k, t] * F̅ˡₖ[l][k]
Expand Down

0 comments on commit 5b86191

Please sign in to comment.