From f1303a0d960726641cc86e259bd6b6597a7d8880 Mon Sep 17 00:00:00 2001 From: thorek1 Date: Fri, 27 Oct 2023 13:07:32 +0100 Subject: [PATCH] fix SPPC related issues --- src/MacroModelling.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index 3b460409..f71390cc 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -7,7 +7,6 @@ import ThreadedSparseArrays using PrecompileTools import SpecialFunctions: erfcinv, erfc import SymPyPythonCall as SPyPyC -import SymPyPythonCall: ↓ import Symbolics import ForwardDiff as ℱ # import Zygote @@ -1376,7 +1375,8 @@ function solve_steady_state!(𝓂::ℳ, symbolic_SS, Symbolics::symbolics; verbo end numerical_sol = true # continue - elseif length(intersect(vars_to_solve,reduce(union,map(x->x.atoms(),collect(soll[1]))))) > 0 + # elseif length(intersect(vars_to_solve,reduce(union,map(x->x.atoms(),collect(soll[1]))))) > 0 + elseif length(intersect((reduce(union,map(x->SPyPyC.free_symbols(x),soll[1])) .|> SPyPyC.:↓),(vars_to_solve .|> SPyPyC.:↓))) > 0 if verbose println("Failed finding solution symbolically for: ",vars_to_solve," in: ",eqs_to_solve,". Solving numerically.") end @@ -1420,7 +1420,7 @@ function solve_steady_state!(𝓂::ℳ, symbolic_SS, Symbolics::symbolics; verbo for i in eqs_to_solve # push!(syms_in_eqs, Symbol.(PythonCall.pystr.(i.atoms()))...) - push!(syms_in_eqs, Symbol.(↓(SPyPyC.free_symbols(i)))...) + push!(syms_in_eqs, Symbol.(SPyPyC.:↓(SPyPyC.free_symbols(i)))...) end # println(syms_in_eqs)