Skip to content

Commit

Permalink
fix penalty factors function
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Bolgaryn committed Jan 17, 2025
1 parent 685a6b0 commit d2fb7b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/PowerFlows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export PSSEExporter
export update_exporter!
export write_export
export get_psse_export_paths
export penalty_factors

import Logging
import DataFrames
Expand Down
7 changes: 0 additions & 7 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,3 @@ function make_powerflowdata(
solver_data,
)
end

# work in progress - quick but not optimized function for POC
function penalty_factors(solver_data::SolverData)
J_t = transpose(solver_data.J)
f = J_t \ solver_data.dSbus_dV_ref
return f
end
7 changes: 7 additions & 0 deletions src/post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -757,3 +757,10 @@ function set_system_time_step(sys::PSY.System, data::PowerFlowData; time_step =
end
end
end

# work in progress - quick but not optimized function for POC
function penalty_factors(solver_data::SolverData)
J_t = transpose(solver_data.J)
f = J_t \ solver_data.dSbus_dV_ref
return f
end

0 comments on commit d2fb7b6

Please sign in to comment.