From 2ad6b31d76285b4a821a4b31a958d51f5cc02ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Thu, 4 Jul 2019 18:37:27 +0200 Subject: [PATCH] Option endogenous_terminal_period is only available for stack_solve_algo=0 --- .../perfect-foresight-models/perfect_foresight_solver_core.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matlab/perfect-foresight-models/perfect_foresight_solver_core.m b/matlab/perfect-foresight-models/perfect_foresight_solver_core.m index e842e818ff..b336c4d035 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_solver_core.m +++ b/matlab/perfect-foresight-models/perfect_foresight_solver_core.m @@ -39,6 +39,10 @@ if options_.linear_approximation && ~(isequal(options_.stack_solve_algo,0) || is error('perfect_foresight_solver: Option linear_approximation is only available with option stack_solve_algo equal to 0 or 7.') end +if options_.endogenous_terminal_period && options_.stack_solve_algo ~= 0 + error('perfect_foresight_solver: option endogenous_terminal_period is only available with option stack_solve_algo equal to 0') +end + if options_.linear && (isequal(options_.stack_solve_algo, 0) || isequal(options_.stack_solve_algo, 7)) options_.linear_approximation = true; end -- GitLab