Using Dynare.jl for solving a perfect foresight. The model runs under stochastic simulations, so that the .mod file is correct. I am using Julia 1.12 and latest Dynare version. I post this code: Dynare.perfect_foresight!(
context = context,
periods = 1000,
datafile = “shocks_RBC6.csv”,
display = true,
maxit = 50, mcp = true,
tolf = 1e-5, tolx = 1e-5)
and get the following error: ArgumentError: Invalid buffers for SparseMatrixCSC construction n=72, colptr=75-element Vector{Int64}, rowval=90-element Vector{Int64}, nzval=90-element Vector{Float64}
Stacktrace:
[1] SparseMatrixCSC
@ C:\Users\Saint.julia\juliaup\julia-1.12.3+0.x64.w64.mingw32\share\julia\stdlib\v1.12\SparseArrays\src\sparsematrix.jl:29 [inlined]
[2] SparseArrays.SparseMatrixCSC(m::Int64, n::Int64, colptr::Vector{Int64}, rowval::Vector{Int64}, nzval::Vector{Float64})
@ SparseArrays C:\Users\Saint.julia\juliaup\julia-1.12.3+0.x64.w64.mingw32\share\julia\stdlib\v1.12\SparseArrays\src\sparsematrix.jl:44
[3] Dynare.DynamicWs(endogenous_nbr::Int64, exogenous_nbr::Int64, tmp_nbr::Int64, colptr::Vector{Int64}, rowval::Vector{Int64}; order::Int64)
@ Dynare C:\Users\Saint.julia\packages\Dynare\TkH8b\src\model.jl:24
Using the perfect foresight version of Dynare in Matlab works fine. I have also added in the PATHsolver and the Pardiso packages which are needed for this.