From 89873517178c3e3945a7a1e46538e27a260db002 Mon Sep 17 00:00:00 2001 From: thorek1 Date: Fri, 15 Nov 2024 21:58:07 +0100 Subject: [PATCH] if precompile = true, start from 0 init guess SS --- src/MacroModelling.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index a72e52fb..d39ff768 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -3635,6 +3635,13 @@ function solve_steady_state!(𝓂::ℳ; verbose::Bool = false) end end + # Zero initial value if startin without guess + for i in 1:2:length(closest_solution) + if !isfinite(sum(abs,closest_solution[i+1])) + closest_solution[i] = zeros(length(closest_solution[i])) + end + end + # println(closest_solution) if all(isfinite,closest_solution[end]) && initial_parameters != closest_solution_init[end]