Skip to content
Snippets Groups Projects
Verified Commit a6c7d56b authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'macos_doc' of git.dynare.org:JohannesPfeifer/dynare

Ref. !2351
parents e3ff2f10 7888786f
No related branches found
No related tags found
No related merge requests found
...@@ -100,15 +100,8 @@ Debian, Ubuntu and Linux Mint). ...@@ -100,15 +100,8 @@ Debian, Ubuntu and Linux Mint).
On macOS On macOS
-------- --------
With MATLAB .. warning::
^^^^^^^^^^^
To install Dynare for use with MATLAB, execute the automated installer called
``dynare-x.y-arch.pkg`` (where *x.y* is the version number and *arch* is either arm64 for Apple Silicon or x86_64 for Intel architectures),
and follow the instructions.
This installation does not require administrative privileges.
If for some reason admin rights are requested, use *Change Install Location* and select *Install for me only*.
The default installation directory is ``/Applications/Dynare/x.y-arch``.
Installing into ``/Applications/dynare`` might fail if you have older versions of Dynare already installed in ``/Applications/Dynare``. Installing into ``/Applications/dynare`` might fail if you have older versions of Dynare already installed in ``/Applications/Dynare``.
To fix this, modify the ownership by executing the following command in Terminal.app:: To fix this, modify the ownership by executing the following command in Terminal.app::
...@@ -119,6 +112,16 @@ After installation, the folder will contain several sub-directories, among which ...@@ -119,6 +112,16 @@ After installation, the folder will contain several sub-directories, among which
Several versions of Dynare can coexist (by default in ``/Applications/Dynare``), Several versions of Dynare can coexist (by default in ``/Applications/Dynare``),
as long as you correctly adjust your path settings (see :ref:`words-warning`). as long as you correctly adjust your path settings (see :ref:`words-warning`).
With MATLAB
^^^^^^^^^^^
To install Dynare for use with MATLAB, execute the automated installer called
``dynare-x.y-arch.pkg`` (where *x.y* is the version number and *arch* is either arm64 for Apple Silicon or x86_64 for Intel architectures),
and follow the instructions.
This installation does not require administrative privileges.
If for some reason admin rights are requested, use *Change Install Location* and select *Install for me only*.
The default installation directory is ``/Applications/Dynare/x.y-arch``.
It is recommended to install the Xcode Command Line Tools (this is an Apple product) It is recommended to install the Xcode Command Line Tools (this is an Apple product)
and GCC via Homebrew_ (see :ref:`prerequisites-macos`). and GCC via Homebrew_ (see :ref:`prerequisites-macos`).
...@@ -142,6 +145,8 @@ once):: ...@@ -142,6 +145,8 @@ once)::
octave:1> pkg install -forge io statistics control struct optim octave:1> pkg install -forge io statistics control struct optim
If you want to use the `x13` functionality of `dseries`, you also need to build the `x13as` binary. [#fx13]_
On FreeBSD On FreeBSD
---------- ----------
...@@ -334,3 +339,8 @@ Dynare unusable. ...@@ -334,3 +339,8 @@ Dynare unusable.
.. _Dynare wiki: https://git.dynare.org/Dynare/dynare/wikis .. _Dynare wiki: https://git.dynare.org/Dynare/dynare/wikis
.. _Octave-Forge: https://octave.sourceforge.io/ .. _Octave-Forge: https://octave.sourceforge.io/
.. _Homebrew: https://brew.sh .. _Homebrew: https://brew.sh
.. rubric:: Footnotes
.. [#fx13] See the instructions at `<https://forum.dynare.org/t/missing-installation-package/27350/4>`__.
\ No newline at end of file
...@@ -4015,7 +4015,7 @@ speed-up on large models. ...@@ -4015,7 +4015,7 @@ speed-up on large models.
shooting and relaxation approaches. Note that round off errors shooting and relaxation approaches. Note that round off errors
are more important with this mixed strategy (user should check are more important with this mixed strategy (user should check
the reported value of the maximum absolute error). Only the reported value of the maximum absolute error). Only
available with option ``stack_solve_algo==0``. available with ``stack_solve_algo`` option equal to ``0``.
   
   
.. option:: linear_approximation .. option:: linear_approximation
...@@ -4024,8 +4024,8 @@ speed-up on large models. ...@@ -4024,8 +4024,8 @@ speed-up on large models.
model. The model must be stationary and a steady state model. The model must be stationary and a steady state
needs to be provided. Linearization is conducted about the needs to be provided. Linearization is conducted about the
last defined steady state, which can derive from ``initval``, last defined steady state, which can derive from ``initval``,
``endval`` or a subsequent ``steady``. Only available with option ``endval`` or a subsequent ``steady``. Only available with
``stack_solve_algo==0`` or ``stack_solve_algo==7``. ``stack_solve_algo`` option equal to ``0`` or ``7``.
   
.. option:: steady_solve_algo = INTEGER .. option:: steady_solve_algo = INTEGER
   
......
...@@ -17,7 +17,7 @@ function [y, success, maxerror, iter, per_block_status] = perfect_foresight_solv ...@@ -17,7 +17,7 @@ function [y, success, maxerror, iter, per_block_status] = perfect_foresight_solv
% - iter [integer] Number of iterations of the underlying nonlinear solver (empty for non-iterative methods) % - iter [integer] Number of iterations of the underlying nonlinear solver (empty for non-iterative methods)
% - per_block_status [struct] In the case of block decomposition, provides per-block solver status information (empty if no block decomposition) % - per_block_status [struct] In the case of block decomposition, provides per-block solver status information (empty if no block decomposition)
% Copyright © 2015-2024 Dynare Team % Copyright © 2015-2025 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -43,15 +43,39 @@ end ...@@ -43,15 +43,39 @@ end
periods = get_simulation_periods(options_); periods = get_simulation_periods(options_);
if options_.linear_approximation && ~(isequal(options_.stack_solve_algo,0) || isequal(options_.stack_solve_algo,7)) if options_.linear_approximation
error('perfect_foresight_solver: Option linear_approximation is only available with option stack_solve_algo equal to 0 or 7.') if ~ismember(options_.stack_solve_algo, [0 7])
error('perfect_foresight_solver: option linear_approximation is only available with stack_solve_algo option equal to 0 or 7')
end
if options_.block
error('perfect_foresight_solver: option linear_approximation is not available with the block option')
end
if options_.bytecode
error('perfect_foresight_solver: option linear_approximation is not available with the bytecode option')
end
if M_.maximum_endo_lead == 0 || M_.maximum_endo_lag == 0
error('perfect_foresight_solver: option linear_approximation is not available with purely backward, purely forward or static models')
end
end end
if options_.endogenous_terminal_period && options_.stack_solve_algo ~= 0 if options_.endogenous_terminal_period
error('perfect_foresight_solver: option endogenous_terminal_period is only available with option stack_solve_algo equal to 0') if options_.stack_solve_algo ~= 0
error('perfect_foresight_solver: option endogenous_terminal_period is only available with stack_solve_algo option equal to 0')
end
if options_.block
error('perfect_foresight_solver: option endogenous_terminal_period is not available with the block option')
end
if options_.bytecode
error('perfect_foresight_solver: option endogenous_terminal_period is not available with the bytecode option')
end
if M_.maximum_endo_lead == 0 || M_.maximum_endo_lag == 0
error('perfect_foresight_solver: option endogenous_terminal_period is not available with purely backward, purely forward or static models')
end
end end
if options_.linear && (isequal(options_.stack_solve_algo, 0) || isequal(options_.stack_solve_algo, 7))
if options_.linear && ismember(options_.stack_solve_algo, [0 7]) && ~options_.block ...
&& ~options_.bytecode && M_.maximum_endo_lead > 0 && M_.maximum_endo_lag > 0
options_.linear_approximation = true; options_.linear_approximation = true;
end end
...@@ -98,22 +122,16 @@ else ...@@ -98,22 +122,16 @@ else
switch options_.stack_solve_algo switch options_.stack_solve_algo
case {0 2 3} case {0 2 3}
if options_.linear_approximation if options_.linear_approximation
if ismember(options_.stack_solve_algo, [2 3])
error('Invalid value of stack_solve_algo option!')
end
[y, success, maxerror] = sim1_linear(y, exo_simul, steady_state, exo_steady_state, M_, options_); [y, success, maxerror] = sim1_linear(y, exo_simul, steady_state, exo_steady_state, M_, options_);
else else
[y, success, maxerror, iter] = sim1(y, exo_simul, steady_state, M_, options_); [y, success, maxerror, iter] = sim1(y, exo_simul, steady_state, M_, options_);
end end
case {1 6} case {1 6}
if options_.linear_approximation
error('Invalid value of stack_solve_algo option!')
end
[y, success, maxerror, iter] = sim1_lbj(y, exo_simul, steady_state, M_, options_); [y, success, maxerror, iter] = sim1_lbj(y, exo_simul, steady_state, M_, options_);
case 7 case 7
if options_.linear_approximation if options_.linear_approximation
if options_.solve_algo == 10 || options_.solve_algo == 11 if options_.solve_algo == 10 || options_.solve_algo == 11
warning('Since you are requesting an MCP solver, you should not specify your model as model(linear)!') warning('Since you are requesting an MCP solver, you should not specify your model as model(linear) or use the linear_approximation option!')
end end
[y, success] = solve_stacked_linear_problem(y, exo_simul, steady_state, exo_steady_state, M_, options_); [y, success] = solve_stacked_linear_problem(y, exo_simul, steady_state, exo_steady_state, M_, options_);
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment