Skip to content

Commit

Permalink
change order of operations
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 28, 2023
1 parent a14f032 commit e56491b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ptdf_calculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ function _calculate_PTDF_matrix_MKLPardiso(
)
elseif isempty(dist_slack) && length(ref_bus_positions) != buscount
Pardiso.pardiso(ps, PTDFm_t[valid_ix, :], ABA, full_BA)
Pardiso.set_phase!(ps, Pardiso.RELEASE_ALL)
Pardiso.pardiso(ps)
full_BA*1.0
PTDFm_t[valid_ix, :] .= deepcopy(full_BA)
Pardiso.set_phase!(ps, Pardiso.RELEASE_ALL)
Pardiso.pardiso(ps, Float64[], ABA, full_BA)
return PTDFm_t
elseif length(dist_slack) == buscount
@info "Distributed bus"
Expand Down

0 comments on commit e56491b

Please sign in to comment.