Skip to content

Commit

Permalink
format, p.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Sep 15, 2024
1 parent 7b43966 commit 92529e3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
14 changes: 13 additions & 1 deletion ogcore/SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,19 @@ def SS_solver(
if not p.budget_balance and not p.baseline_spending:
Y = TR / p.alpha_T[-1]

outer_loop_vars = (bmat, nmat, r_p, r, w, p_m, Y, BQ, TR, Ig_baseline, factor)
outer_loop_vars = (
bmat,
nmat,
r_p,
r,
w,
p_m,
Y,
BQ,
TR,
Ig_baseline,
factor,
)

(
euler_errors,
Expand Down
2 changes: 1 addition & 1 deletion ogcore/fiscal.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def D_G_path(r_gov, dg_fixed_values, p):
D[0] = D0_baseline

if p.baseline_spending:
G = alpha_bs_G[:T] * Gbaseline[: p.T]
G = p.alpha_bs_G[:T] * Gbaseline[: p.T]
else:
G = p.alpha_G[: p.T] * Y[: p.T]

Expand Down
28 changes: 26 additions & 2 deletions tests/test_SS.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,37 @@ def test_inner_loop(baseline, r_p, param_updates, filename, dask_client):
factor = 100000
BQ = np.ones(p.J) * 0.00019646295986015257
if p.budget_balance:
outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, None, factor)
outer_loop_vars = (
bssmat,
nssmat,
r_p,
r,
w,
p_m,
Y,
BQ,
TR,
None,
factor,
)
else:
if p.baseline_spending:
Ig_baseline = 0.0
else:
Ig_baseline = None
outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, Ig_baseline, factor)
outer_loop_vars = (
bssmat,
nssmat,
r_p,
r,
w,
p_m,
Y,
BQ,
TR,
Ig_baseline,
factor,
)
test_tuple = SS.inner_loop(outer_loop_vars, p, dask_client)

try:
Expand Down

0 comments on commit 92529e3

Please sign in to comment.