From ec76bda254c265c536f576d0ec0760db11529b06 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Fri, 8 Dec 2023 15:41:36 +0100
Subject: [PATCH] Remove obsolete Sylvester options

dr_block has been removed
---
 doc/manual/source/the-model-file.rst          | 44 -------------------
 matlab/+mom/default_option_mom_values.m       |  2 -
 matlab/default_option_values.m                |  6 ---
 .../AnScho/AnScho_MoM_common.inc              |  2 -
 .../RBC/RBC_MoM_Andreasen.mod                 |  2 -
 .../method_of_moments/RBC/RBC_MoM_SMM_ME.mod  |  2 -
 .../RBC/RBC_MoM_prefilter.mod                 |  2 -
 7 files changed, 60 deletions(-)

diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst
index c03f136fb9..990fc9b22a 100644
--- a/doc/manual/source/the-model-file.rst
+++ b/doc/manual/source/the-model-file.rst
@@ -4787,31 +4787,6 @@ Computing the stochastic solution
        and this option has no effect. More references can be found
        `here <https://archives.dynare.org/DynareWiki/PartialInformation>`__ .
 
-    .. option:: sylvester = OPTION
-
-       Determines the algorithm used to solve the Sylvester equation
-       for block decomposed model. Possible values for OPTION are:
-
-           ``default``
-
-                Uses the default solver for Sylvester equations
-                (``gensylv``) based on Ondra Kamenik’s algorithm (see
-                `here
-                <https://www.dynare.org/assets/team-presentations/sylvester.pdf>`__
-                for more information).
-
-           ``fixed_point``
-
-                Uses a fixed point algorithm to solve the Sylvester
-                equation (``gensylv_fp``). This method is faster than
-                the default one for large scale models.
-
-       |br| Default value is ``default``.
-
-    .. option:: sylvester_fixed_point_tol = DOUBLE
-
-       The convergence criterion used in the fixed point
-       Sylvester solver. Its default value is ``1e-12``.
 
     .. option:: dr = OPTION
 
@@ -7923,15 +7898,6 @@ observed variables.
 
        See :opt:`aim_solver`.
 
-    .. option:: sylvester = OPTION
-
-       See :opt:`sylvester <sylvester = OPTION>`.
-
-    .. option:: sylvester_fixed_point_tol = DOUBLE
-
-       See :opt:`sylvester_fixed_point_tol <sylvester_fixed_point_tol
-       = DOUBLE>` .
-
     .. option:: lyapunov = OPTION
 
        Determines the algorithm used to solve the Lyapunov equation to
@@ -9475,16 +9441,6 @@ adding prior information comes at the cost of a loss in efficiency of the estima
         See :opt:`lyapunov_doubling_tol <lyapunov_doubling_tol = DOUBLE>`.
         Default: ``1e-16``.
 
-    .. option:: sylvester = OPTION
-
-        See :opt:`sylvester <sylvester = OPTION>`.
-        Default: ``default``, i.e. uses ``gensylv``.
-
-    .. option:: sylvester_fixed_point_tol = DOUBLE
-
-        See :opt:`sylvester_fixed_point_tol <sylvester_fixed_point_tol = DOUBLE>`.
-        Default: ``1e-12``.
-
     .. option:: qz_criterium = DOUBLE
 
         See :opt:`qz_criterium <qz_criterium = DOUBLE>`.
diff --git a/matlab/+mom/default_option_mom_values.m b/matlab/+mom/default_option_mom_values.m
index 38ad0cf201..3c105e27d7 100644
--- a/matlab/+mom/default_option_mom_values.m
+++ b/matlab/+mom/default_option_mom_values.m
@@ -160,8 +160,6 @@ options_mom_ = set_default_option(options_mom_,'lyapunov_srs',false);
 options_mom_ = set_default_option(options_mom_,'lyapunov_complex_threshold',1e-15);     % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver
 options_mom_ = set_default_option(options_mom_,'lyapunov_fixed_point_tol',1e-10);       % convergence criterion used in the fixed point Lyapunov solver
 options_mom_ = set_default_option(options_mom_,'lyapunov_doubling_tol',1e-16);          % convergence criterion used in the doubling algorithm
-options_mom_ = set_default_option(options_mom_,'sylvester_fp',false);                   % determines whether to use fixed point algorihtm to solve Sylvester equation (gensylv_fp), faster for large scale models
-options_mom_ = set_default_option(options_mom_,'sylvester_fixed_point_tol',1e-12);      % convergence criterion used in the fixed point Sylvester solver
 
 % mode check plot
 options_mom_.mode_check.nolik = false;                                                          % we don't do likelihood (also this initializes mode_check substructure)
diff --git a/matlab/default_option_values.m b/matlab/default_option_values.m
index b913eac89a..cbaa775a23 100644
--- a/matlab/default_option_values.m
+++ b/matlab/default_option_values.m
@@ -664,12 +664,6 @@ options_.use_dll = false;
 % model evaluated using bytecode.dll
 options_.bytecode = false;
 
-% if true, use a fixed point method to solve Sylvester equation (for large scale models)
-options_.sylvester_fp = false;
-
-% convergence criteria to solve iteratively a sylvester equations
-options_.sylvester_fixed_point_tol = 1e-12;
-
 % if true, use a fixed point method to solve Lyapunov equation (for large scale models)
 options_.lyapunov_fp = false;
 % if true, use a doubling algorithm to solve Lyapunov equation (for large scale models)
diff --git a/tests/estimation/method_of_moments/AnScho/AnScho_MoM_common.inc b/tests/estimation/method_of_moments/AnScho/AnScho_MoM_common.inc
index cd0d1f06a4..67655ab402 100644
--- a/tests/estimation/method_of_moments/AnScho/AnScho_MoM_common.inc
+++ b/tests/estimation/method_of_moments/AnScho/AnScho_MoM_common.inc
@@ -269,8 +269,6 @@ method_of_moments(
     % , lyapunov_complex_threshold = 1e-15     % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver
     % , lyapunov_fixed_point_tol = 1e-10       % convergence criterion used in the fixed point Lyapunov solver
     % , lyapunov_doubling_tol = 1e-16          % convergence criterion used in the doubling algorithm
-    % , sylvester = default                    % algorithm to solve Sylvester equation; possible values are DEFAULT, FIXED_POINT
-    % , sylvester_fixed_point_tol = 1e-12      % convergence criterion used in the fixed point Sylvester solver
     % , qz_criterium = 0.999999                % value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving first order problems
     % , qz_zero_threshold = 1e-6               % value used to test if a generalized eigenvalue is 0/0 in the generalized Schur decomposition
     % , schur_vec_tol=1e-11                    % tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix
diff --git a/tests/estimation/method_of_moments/RBC/RBC_MoM_Andreasen.mod b/tests/estimation/method_of_moments/RBC/RBC_MoM_Andreasen.mod
index 7441e12f03..f34b58d752 100644
--- a/tests/estimation/method_of_moments/RBC/RBC_MoM_Andreasen.mod
+++ b/tests/estimation/method_of_moments/RBC/RBC_MoM_Andreasen.mod
@@ -218,8 +218,6 @@ method_of_moments(
         % , lyapunov_complex_threshold = 1e-15     % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver
         % , lyapunov_fixed_point_tol = 1e-10       % convergence criterion used in the fixed point Lyapunov solver
         % , lyapunov_doubling_tol = 1e-16          % convergence criterion used in the doubling algorithm
-        % , sylvester = default                    % algorithm to solve Sylvester equation; possible values are DEFAULT, FIXED_POINT
-        % , sylvester_fixed_point_tol = 1e-12      % convergence criterion used in the fixed point Sylvester solver
         % , qz_criterium = 0.999999                % value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving first order problems
         % , qz_zero_threshold = 1e-6               % value used to test if a generalized eigenvalue is 0/0 in the generalized Schur decomposition
         % , schur_vec_tol=1e-11                    % tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix
diff --git a/tests/estimation/method_of_moments/RBC/RBC_MoM_SMM_ME.mod b/tests/estimation/method_of_moments/RBC/RBC_MoM_SMM_ME.mod
index df46d56fe8..ea351a4013 100644
--- a/tests/estimation/method_of_moments/RBC/RBC_MoM_SMM_ME.mod
+++ b/tests/estimation/method_of_moments/RBC/RBC_MoM_SMM_ME.mod
@@ -205,8 +205,6 @@ end
         % , lyapunov_complex_threshold = 1e-15     % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver
         % , lyapunov_fixed_point_tol = 1e-10       % convergence criterion used in the fixed point Lyapunov solver
         % , lyapunov_doubling_tol = 1e-16          % convergence criterion used in the doubling algorithm
-        % , sylvester = default                    % algorithm to solve Sylvester equation; possible values are DEFAULT, FIXED_POINT
-        % , sylvester_fixed_point_tol = 1e-12      % convergence criterion used in the fixed point Sylvester solver
         % , qz_criterium = 0.999999                % value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving first order problems
         % , qz_zero_threshold = 1e-6               % value used to test if a generalized eigenvalue is 0/0 in the generalized Schur decomposition
         % , schur_vec_tol=1e-11                    % tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix
diff --git a/tests/estimation/method_of_moments/RBC/RBC_MoM_prefilter.mod b/tests/estimation/method_of_moments/RBC/RBC_MoM_prefilter.mod
index 7b1fc4758c..7bdd1aa5e0 100644
--- a/tests/estimation/method_of_moments/RBC/RBC_MoM_prefilter.mod
+++ b/tests/estimation/method_of_moments/RBC/RBC_MoM_prefilter.mod
@@ -177,8 +177,6 @@ save('test_matrix.mat','weighting_matrix')
         % , lyapunov_complex_threshold = 1e-15     % complex block threshold for the upper triangular matrix in symmetric Lyapunov equation solver
         % , lyapunov_fixed_point_tol = 1e-10       % convergence criterion used in the fixed point Lyapunov solver
         % , lyapunov_doubling_tol = 1e-16          % convergence criterion used in the doubling algorithm
-        % , sylvester = default                    % algorithm to solve Sylvester equation; possible values are DEFAULT, FIXED_POINT
-        % , sylvester_fixed_point_tol = 1e-12      % convergence criterion used in the fixed point Sylvester solver
         % , qz_criterium = 0.999999                % value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving first order problems
         % , qz_zero_threshold = 1e-6               % value used to test if a generalized eigenvalue is 0/0 in the generalized Schur decomposition
         % , schur_vec_tol=1e-11                    % tolerance level used to find nonstationary variables in Schur decomposition of the transition matrix
-- 
GitLab