Skip to content

Commit

Permalink
enable use of spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Jun 12, 2024
1 parent 297fa88 commit 724056d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/devices_models/devices/AC_branches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function _make_flow_expressions!(

t1_ = time()
jump_model = get_jump_model(container)
#=

tasks = map(branches) do name
ptdf_col = ptdf[name, :]
Threads.@spawn _make_flow_expressions!(
Expand All @@ -500,8 +500,9 @@ function _make_flow_expressions!(
name, expressions = fetch(task)
branch_flow_expr[name, :] .= expressions
end
=#


#= Leaving serial code commented out for debugging purposes in the future
for name in branches
ptdf_col = ptdf[name, :]
branch_flow_expr[name, :] .= _make_flow_expressions!(
Expand All @@ -512,6 +513,7 @@ function _make_flow_expressions!(
nodal_balance_expressions.data,
)
end
=#

t2_ = time()
@error "time to build PTDF expressions $branch_Type $(t2_ - t1_)"
Expand Down

0 comments on commit 724056d

Please sign in to comment.