From e0e719ae1550aba19ce2840f991c8ca0ae30cc0f Mon Sep 17 00:00:00 2001 From: David M Fobes Date: Thu, 12 Sep 2024 12:29:19 -0600 Subject: [PATCH] FIX: power balance eq. for lindistflow --- CHANGELOG.md | 2 +- src/form/lindistflow.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd1c7dd..a0473593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## staged -- none +- Fixed bug in `constraint_mc_power_balance_shed_block` (`LPUBFDiagPowerModel` version) where `pd_zblock_zdemand` was used instead of `qd_zblock_zdemand` ## v3.5.0 diff --git a/src/form/lindistflow.jl b/src/form/lindistflow.jl index 6853ff53..00b5a9a4 100644 --- a/src/form/lindistflow.jl +++ b/src/form/lindistflow.jl @@ -152,7 +152,7 @@ function constraint_mc_power_balance_shed_block(pm::PMD.LPUBFDiagModel, nw::Int, == sum(qg[g][t] for (g, conns) in bus_gens if t in conns) - sum(qs[s][t] for (s, conns) in bus_storage if t in conns) - - sum(pd_zblock_zdemand[l][t] for (l, conns) in bus_loads if t in conns) + - sum(qd_zblock_zdemand[l][t] for (l, conns) in bus_loads if t in conns) - sum((-w[t] * LinearAlgebra.diag(Bt')[idx]) for (sh, conns) in uncontrolled_shunts if t in conns) - sum(-var(pm, nw, :capacitor_reactive_power, sh)[t] for (sh, conns) in controlled_shunts if t in conns) )