diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst index af3a37f45a814dce74a952767cc92da04bec31b7..a1bb5afb5759c0eb78d7e0ca3bafa3f94f33b9ce 100644 --- a/doc/manual/source/the-model-file.rst +++ b/doc/manual/source/the-model-file.rst @@ -2915,6 +2915,9 @@ Finding the steady state with Dynare nonlinear solver along. Iteration will cease when the attempted step size is smaller than ``tolx``. Default: ``eps^(2/3)`` + .. option:: non_zero + + See :opt:`non_zero`. .. _solvalg: diff --git a/matlab/default_option_values.m b/matlab/default_option_values.m index d3773fc9377e6432e8e1689878908ca1e5743213..7b0ef485c8438bcba2f2e7f191438c5c61867d2e 100644 --- a/matlab/default_option_values.m +++ b/matlab/default_option_values.m @@ -57,6 +57,7 @@ options_.trust_region_initial_step_bound_factor = 1; options_.dr_display_tol=1e-6; options_.dp.maxit = 3000; options_.steady.maxit = 50; +options_.steady.non_zero = false; options_.simul.maxit = 50; options_.simul.robust_lin_solve = false; diff --git a/matlab/display_static_residuals.m b/matlab/display_static_residuals.m index 331d4a67a8eab95c7a0480c4ba3249ab4d1ef17b..ed03f8b695559962d973672064927017cdd61a88 100644 --- a/matlab/display_static_residuals.m +++ b/matlab/display_static_residuals.m @@ -1,5 +1,5 @@ -function z = display_static_residuals(M_, options_, oo_,options_resid_) -% function z = display_static_residuals(M_, options_, oo_,options_resid_) +function z = display_static_residuals(M_, options_, oo_) +% function z = display_static_residuals(M_, options_, oo_) % % Computes static residuals associated with the guess values. % @@ -7,7 +7,6 @@ function z = display_static_residuals(M_, options_, oo_,options_resid_) % M: [structure] storing the model information % options: [structure] storing the options % oo: [structure] storing the results -% options_resid_: options to resid % % OUTPUTS % z: residuals @@ -32,8 +31,6 @@ function z = display_static_residuals(M_, options_, oo_,options_resid_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <https://www.gnu.org/licenses/>. -non_zero = (nargin > 3 && isfield(options_resid_, 'non_zero') && options_resid_.non_zero); - tags = M_.equations_tags; istag = 0; if ~isempty(tags) @@ -104,7 +101,7 @@ if nargout == 0 tg = tags(cell2mat(tags(:,1)) == i,2:3); % all tags for equation i ind = strmatch('name', cellstr( tg(:,1) ) ); end - if ~(non_zero && tmp == 0) + if ~(options_.steady.non_zero && tmp == 0) if ~istag || length(ind) == 0 if ~isreal(z) fprintf('Equation number %u: %g (imaginary part: %g)\n', i, real(tmp), imag(tmp)); @@ -120,7 +117,7 @@ if nargout == 0 end end end - if non_zero && ~any_non_zero_residual + if options_.steady.non_zero && ~any_non_zero_residual disp('All residuals are zero') end skipline(2) diff --git a/preprocessor b/preprocessor index a091c26ced0fba215851485e824502230fccb73f..2746a21702a1bcc89a25083d3e7b3ab3c925edd5 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit a091c26ced0fba215851485e824502230fccb73f +Subproject commit 2746a21702a1bcc89a25083d3e7b3ab3c925edd5