Commit 540fb1be authored by MichelJuillard's avatar MichelJuillard
Browse files

fixing bug in discretionary_policy and implementing option solve_maxit

parent 12980236
...@@ -20,6 +20,10 @@ function [dr,ys,info]=discretionary_policy_1(oo_,Instruments) ...@@ -20,6 +20,10 @@ function [dr,ys,info]=discretionary_policy_1(oo_,Instruments)
global M_ options_ global M_ options_
persistent Hold persistent Hold
dr = [];
ys = [];
info = 0;
options_ = set_default_option(options_,'qz_criterium',1.000001); options_ = set_default_option(options_,'qz_criterium',1.000001);
options_ = set_default_option(options_,'solve_maxit',3000); options_ = set_default_option(options_,'solve_maxit',3000);
......
...@@ -111,7 +111,7 @@ class ParsingDriver; ...@@ -111,7 +111,7 @@ class ParsingDriver;
%token KALMAN_ALGO KALMAN_TOL SUBSAMPLES OPTIONS %token KALMAN_ALGO KALMAN_TOL SUBSAMPLES OPTIONS
%token LABELS LAPLACE LIK_ALGO LIK_INIT LINEAR LOAD_IDENT_FILES LOAD_MH_FILE LOAD_PARAMS_AND_STEADY_STATE LOGLINEAR LYAPUNOV %token LABELS LAPLACE LIK_ALGO LIK_INIT LINEAR LOAD_IDENT_FILES LOAD_MH_FILE LOAD_PARAMS_AND_STEADY_STATE LOGLINEAR LYAPUNOV
%token LYAPUNOV_FIXED_POINT_TOL LYAPUNOV_DOUBLING_TOL LYAPUNOV_SQUARE_ROOT_SOLVER_TOL MARKOWITZ MARGINAL_DENSITY MAX MAXIT %token LYAPUNOV_FIXED_POINT_TOL LYAPUNOV_DOUBLING_TOL LYAPUNOV_SQUARE_ROOT_SOLVER_TOL MARKOWITZ MARGINAL_DENSITY MAX MAXIT
%token MFS MH_DROP MH_INIT_SCALE MH_JSCALE MH_MODE MH_NBLOCKS MH_REPLIC MH_RECOVER MIN MINIMAL_SOLVING_PERIODS %token MFS MH_DROP MH_INIT_SCALE MH_JSCALE MH_MODE MH_NBLOCKS MH_REPLIC MH_RECOVER MIN MINIMAL_SOLVING_PERIODS SOLVE_MAXIT
%token MODE_CHECK MODE_COMPUTE MODE_FILE MODEL MODEL_COMPARISON MODEL_INFO MSHOCKS ABS SIGN %token MODE_CHECK MODE_COMPUTE MODE_FILE MODEL MODEL_COMPARISON MODEL_INFO MSHOCKS ABS SIGN
%token MODIFIEDHARMONICMEAN MOMENTS_VARENDO DIFFUSE_FILTER SUB_DRAWS %token MODIFIEDHARMONICMEAN MOMENTS_VARENDO DIFFUSE_FILTER SUB_DRAWS
%token <string_val> NAME %token <string_val> NAME
...@@ -1662,6 +1662,7 @@ discretionary_policy_options_list : discretionary_policy_options_list COMMA disc ...@@ -1662,6 +1662,7 @@ discretionary_policy_options_list : discretionary_policy_options_list COMMA disc
discretionary_policy_options : ramsey_policy_options discretionary_policy_options : ramsey_policy_options
| o_discretionary_tol; | o_discretionary_tol;
| o_solve_maxit;
; ;
ramsey_policy_options_list : ramsey_policy_options_list COMMA ramsey_policy_options ramsey_policy_options_list : ramsey_policy_options_list COMMA ramsey_policy_options
...@@ -2190,6 +2191,7 @@ o_hp_ngrid : HP_NGRID EQUAL INT_NUMBER { driver.option_num("hp_ngrid", $3); }; ...@@ -2190,6 +2191,7 @@ o_hp_ngrid : HP_NGRID EQUAL INT_NUMBER { driver.option_num("hp_ngrid", $3); };
o_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("periods", $3); }; o_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("periods", $3); };
o_solver_periods : SOLVER_PERIODS EQUAL INT_NUMBER { driver.option_num("solver_periods", $3); }; o_solver_periods : SOLVER_PERIODS EQUAL INT_NUMBER { driver.option_num("solver_periods", $3); };
o_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("maxit_", $3); }; o_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("maxit_", $3); };
o_solve_maxit : SOLVE_MAXIT EQUAL INT_NUMBER { driver.option_num("solve_maxit", $3); };
o_cutoff : CUTOFF EQUAL non_negative_number { driver.cutoff($3); }; o_cutoff : CUTOFF EQUAL non_negative_number { driver.cutoff($3); };
o_markowitz : MARKOWITZ EQUAL non_negative_number { driver.option_num("markowitz", $3); }; o_markowitz : MARKOWITZ EQUAL non_negative_number { driver.option_num("markowitz", $3); };
o_minimal_solving_periods : MINIMAL_SOLVING_PERIODS EQUAL non_negative_number { driver.option_num("minimal_solving_periods", $3); }; o_minimal_solving_periods : MINIMAL_SOLVING_PERIODS EQUAL non_negative_number { driver.option_num("minimal_solving_periods", $3); };
......
...@@ -414,6 +414,7 @@ string eofbuff; ...@@ -414,6 +414,7 @@ string eofbuff;
<DYNARE_STATEMENT>max_block_iterations {return token::MAX_BLOCK_ITERATIONS;} <DYNARE_STATEMENT>max_block_iterations {return token::MAX_BLOCK_ITERATIONS;}
<DYNARE_STATEMENT>max_repeated_optimization_runs {return token::MAX_REPEATED_OPTIMIZATION_RUNS;} <DYNARE_STATEMENT>max_repeated_optimization_runs {return token::MAX_REPEATED_OPTIMIZATION_RUNS;}
<DYNARE_STATEMENT>maxit {return token::MAXIT;} <DYNARE_STATEMENT>maxit {return token::MAXIT;}
<DYNARE_STATEMENT>solve_maxit {return token::SOLVE_MAXIT;}
<DYNARE_STATEMENT>function_convergence_criterion {return token::FUNCTION_CONVERGENCE_CRITERION;} <DYNARE_STATEMENT>function_convergence_criterion {return token::FUNCTION_CONVERGENCE_CRITERION;}
<DYNARE_STATEMENT>parameter_convergence_criterion {return token::PARAMETER_CONVERGENCE_CRITERION;} <DYNARE_STATEMENT>parameter_convergence_criterion {return token::PARAMETER_CONVERGENCE_CRITERION;}
<DYNARE_STATEMENT>number_of_large_perturbations {return token::NUMBER_OF_LARGE_PERTURBATIONS;} <DYNARE_STATEMENT>number_of_large_perturbations {return token::NUMBER_OF_LARGE_PERTURBATIONS;}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment