fix solvers and steady state tests for Julia 1.0

parent 92799de4
...@@ -55,6 +55,7 @@ struct AuxVars ...@@ -55,6 +55,7 @@ struct AuxVars
orig_lead_lag::Int orig_lead_lag::Int
eq_nbr::Int eq_nbr::Int
orig_expr::String orig_expr::String
unary_op::String
end end
struct PredVars struct PredVars
......
...@@ -189,6 +189,7 @@ function trustregion(f!::Function, j!::Function, x0::Vector{Float64}, factor::Fl ...@@ -189,6 +189,7 @@ function trustregion(f!::Function, j!::Function, x0::Vector{Float64}, factor::Fl
# Initialize scale parameter. # Initialize scale parameter.
scale, scale0 = one(Float64), one(Float64) scale, scale0 = one(Float64), one(Float64)
# Newton iterations # Newton iterations
δ = 0.0
while iter<=maxiter && info==0 while iter<=maxiter && info==0
# Compute columns norm for the Jacobian matrix. # Compute columns norm for the Jacobian matrix.
@inbounds for i=1:n @inbounds for i=1:n
......
...@@ -19,6 +19,7 @@ module SteadyState ...@@ -19,6 +19,7 @@ module SteadyState
# along with Dynare. If not, see <http://www.gnu.org/licenses/>. # along with Dynare. If not, see <http://www.gnu.org/licenses/>.
## ##
using LinearAlgebra
using DynareSolvers using DynareSolvers
using Printf using Printf
...@@ -120,7 +121,7 @@ function display_steady_state(model::Model, oo::Output) ...@@ -120,7 +121,7 @@ function display_steady_state(model::Model, oo::Output)
print(aa, " ", model.endo[i].name, "\t=\t", @sprintf("%.6f", tmp)) print(aa, " ", model.endo[i].name, "\t=\t", @sprintf("%.6f", tmp))
println(aa) println(aa)
end end
print(STDOUT, aa) print(aa)
end end
function display_steady_state(model::Model, oo::Output, ys::Vector{Float64}) function display_steady_state(model::Model, oo::Output, ys::Vector{Float64})
...@@ -135,7 +136,7 @@ function display_steady_state(model::Model, oo::Output, ys::Vector{Float64}) ...@@ -135,7 +136,7 @@ function display_steady_state(model::Model, oo::Output, ys::Vector{Float64})
print(aa, " ", model.endo[i].name, "\t=\t", @sprintf("%.6f", tmp)) print(aa, " ", model.endo[i].name, "\t=\t", @sprintf("%.6f", tmp))
println(aa) println(aa)
end end
print(STDOUT, aa) print(aa)
end end
function issteadystate(model::Model, oo::Output, ys::Vector{Float64}) function issteadystate(model::Model, oo::Output, ys::Vector{Float64})
......
module CyclicReduction module CyclicReduction
using LinearAlgebra
import ...DynLinAlg.LinSolveAlgo: LinSolveWS, linsolve_core! import ...DynLinAlg.LinSolveAlgo: LinSolveWS, linsolve_core!
import Base.LinAlg.BLAS: scal!, gemm! import Base.LinAlg.BLAS: scal!, gemm!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment