using Pkg
pkg"add Dynare"
It is strongly recommended to install Dynare in a fresh Julia environment in order to avoid conflicts with other packages
If you already have a version of Dynare installed (not in development mode):
using Pkg
pkg"update"
Often, it is necessary to restart Julia to load the new version of Dynare.
Note that the version of the Dynare package is printed immediately after running Dynare:
julia> context = @dynare "example1";
Dynare version: 0.9.6
...
Example (to be run in the directory Dynare.jl
):
using Dynare
context = @dynare "./test/models/example1/example1.mod";
The results are in the context
structure.
context
structure is saved in the directory
<path to modfile>/<modfilenane>/output/<modfilename>.jls
. It can be loaded with
using Serialization
DD = Serialization.deserialize("<path to modfile>/<modefilename>/output/<modefilename>.jls")``
<path to modfile>/<modfilenane>/graphs
<filename>.log
.using PATHSolver
context = @dynare ...
using MKL, Pardiso
context = @dynare ...
Dynare uses the PATH software by S. Dirkse, M.C. Ferris and T. Munson (https://pages.cs.wisc.edu/~ferris/path.html), as provided by PATHSolver.jl to solve prefect foresight models with occasionally binding constraints.
In order to use it, you need to add the free licence available at
https://pages.cs.wisc.edu/~ferris/path/LICENSE in your file
~/.julia/config/startup.jl
ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"
.julia
directory called config
.julia\config
folder create a new text file: Right click → New → Text Document
ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"
File → Save as
Save as type
option at the bottom of the pop-up window select All files
File name
write startup.jl
Save
Go to File → Open Folder
, navigate through your folders and choose the one where you want to create the startup.jl
file
Go to File → New Text File
In the new text file, type
ENV["PATH_LICENSE_STRING"] = "licence number provided in the above link"
Go to File → Save
In the dropdown Save as type
option at the bottom of the pop-up window select All files
In the field File name
write startup.jl
.
Press Save
Pardiso
, then build it, and finally install Dynare.jl