Skip to content

Commit

Permalink
bugfix shape penalty factors
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Bolgaryn committed Jan 17, 2025
1 parent d2fb7b6 commit 2106c0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/newton_ac_powerflow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ function _newton_powerflow(
else
solver_data.J = J
solver_data.dSbus_dV_ref =
[vec(real.(dSbus_dVa[ref, :][:, pvpq])); vec(real.(dSbus_dVm[ref, :][:, pvpq]))]
[vec(real.(dSbus_dVa[ref, :][:, pvpq])); vec(real.(dSbus_dVm[ref, :][:, pq]))]
@info("The powerflow solver with KLU converged after $i iterations")
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_utils/legacy_pf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function _newton_powerflow(
Sbus_result = V .* conj(Ybus * V)
solver_data.J = J
solver_data.dSbus_dV_ref =
[vec(real.(dSbus_dVa[ref, :][:, pvpq])); vec(real.(dSbus_dVm[ref, :][:, pvpq]))]
[vec(real.(dSbus_dVa[ref, :][:, pvpq])); vec(real.(dSbus_dVm[ref, :][:, pq]))]
@info("The powerflow solver with KLU converged after $i iterations")
end
return (converged, V, Sbus_result)
Expand Down

0 comments on commit 2106c0c

Please sign in to comment.