Skip to content

Commit

Permalink
add default const
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomha committed Aug 12, 2024
1 parent 392da2f commit 5b6589d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/definitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const MAX_INIT_RESIDUAL = 10.0
const MAX_NLSOLVE_INTERATIONS = 10
const BOUNDS_TOLERANCE = 1e-6
const MAX_REACTIVE_POWER_ITERATIONS = 10
const DEFAULT_MAX_REDISTRIBUTION_ITERATIONS = 10

const ISAPPROX_ZERO_TOLERANCE = 1e-6

Expand Down
3 changes: 2 additions & 1 deletion src/nlsolve_ac_powerflow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function solve_ac_powerflow!(system::PSY.System; kwargs...)
system;
check_connectivity = get(kwargs, :check_connectivity, true),
)
max_iterations = get(kwargs, :max_redistribution_iterations, 10)
max_iterations =
get(kwargs, :max_redistribution_iterations, DEFAULT_MAX_REDISTRIBUTION_ITERATIONS)
res = _solve_powerflow!(data, check_reactive_power_limits; kwargs...)
if res.f_converged
write_powerflow_solution!(system, res.zero, max_iterations)
Expand Down

0 comments on commit 5b6589d

Please sign in to comment.