From 77b36f103deeda9b4fc5d2d0d4559afe26fc9e8a Mon Sep 17 00:00:00 2001 From: jd-lara Date: Wed, 27 Sep 2023 23:06:11 -0600 Subject: [PATCH] dont store in full_BA --- src/ptdf_calculations.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ptdf_calculations.jl b/src/ptdf_calculations.jl index 476fbe45..6d1d9618 100644 --- a/src/ptdf_calculations.jl +++ b/src/ptdf_calculations.jl @@ -279,7 +279,7 @@ function _calculate_PTDF_matrix_MKLPardiso( end Pardiso.set_iparm!(ps, 2, 2) Pardiso.set_iparm!(ps, 59, 2) - Pardiso.set_iparm!(ps, 6, 1) + #Pardiso.set_iparm!(ps, 6, 1) Pardiso.set_iparm!(ps, 12, 1) # inizialize matrices for evaluation @@ -292,11 +292,11 @@ 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) + tmp = similar(full_BA) + Pardiso.pardiso(ps, tmp, ABA, full_BA) Pardiso.set_phase!(ps, Pardiso.RELEASE_ALL) Pardiso.pardiso(ps) - full_BA*1.0 - PTDFm_t[valid_ix, :] .= deepcopy(full_BA) + PTDFm_t[valid_ix, :] = tmp return PTDFm_t elseif length(dist_slack) == buscount @info "Distributed bus"