Skip to content

Commit

Permalink
one more try
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 28, 2023
1 parent 2e1eb70 commit 643f7d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ptdf_calculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,14 @@ function _calculate_PTDF_matrix_MKLPardiso(
"Distibuted slack is not supported for systems with multiple reference buses.",
)
elseif isempty(dist_slack) && length(ref_bus_positions) != buscount
Pardiso.pardiso(ps, PTDFm_t[valid_ix, :], ABA, full_BA)
Pardiso.pardiso(ps, similar(full_BA), ABA, full_BA)
PTDFm_t[valid_ix, :] .= full_BA
Pardiso.set_phase!(ps, Pardiso.RELEASE_ALL)
Pardiso.pardiso(ps, PTDFm_t[valid_ix, :], ABA, full_BA)
Pardiso.pardiso(ps, Float64[], ABA, full_BA)
return PTDFm_t
elseif length(dist_slack) == buscount
@info "Distributed bus"
Pardiso.pardiso(ps, PTDFm_t[valid_ix, :], ABA, full_BA)
Pardiso.pardiso(ps, similar(full_BA), ABA, full_BA)
PTDFm_t[valid_ix, :] .= full_BA
Pardiso.set_phase!(ps, Pardiso.RELEASE_ALL)
Pardiso.pardiso(ps, PTDFm_t[valid_ix, :], ABA, full_BA)
Expand Down

0 comments on commit 643f7d3

Please sign in to comment.