Skip to content

Commit c6bbd26

Browse files
Copilotthorek1
andcommitted
Add additional cache clear before solve_steady_state! when all parameters are provided
Co-authored-by: thorek1 <[email protected]>
1 parent 32a467c commit c6bbd26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/MacroModelling.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8063,6 +8063,11 @@ function write_parameters_input!(𝓂::ℳ, parameters::OrderedDict{Symbol,Float
80638063
if needs_ss_setup
80648064
if verbose println("All parameters now provided. Setting up non-stochastic steady state problem...") end
80658065

8066+
# Clear the cache again before calling solve_steady_state! to ensure clean state
8067+
while length(𝓂.NSSS_solver_cache) > 0
8068+
pop!(𝓂.NSSS_solver_cache)
8069+
end
8070+
80668071
# Call solve_steady_state! to create SS_solve_func with the correct parameter order
80678072
solve_steady_state!(𝓂, verbose = verbose)
80688073

0 commit comments

Comments
 (0)