From 68ea7d7cbd18fbe178c8a87a10cdc38b12cb22d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Wed, 22 May 2024 16:49:43 +0200 Subject: [PATCH] MCP: remove duplicate initialization of bounds passed to LMMCP and PATH The bounds are already initialized in solve_stacked_problem.m (and they do not make sense in solve_stacked_linear_problem.m, since the latter is for linear problems only). --- .../private/initialize_stacked_problem.m | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/matlab/perfect-foresight-models/private/initialize_stacked_problem.m b/matlab/perfect-foresight-models/private/initialize_stacked_problem.m index 5b6c00b6c3..8aea2e0f57 100644 --- a/matlab/perfect-foresight-models/private/initialize_stacked_problem.m +++ b/matlab/perfect-foresight-models/private/initialize_stacked_problem.m @@ -48,27 +48,6 @@ function [options_, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, % along with Dynare. If not, see <https://www.gnu.org/licenses/>. periods = options_.periods; -if (options_.solve_algo == 10) - if ~isfield(options_.lmmcp,'lb') - [lb, ub] = feval(sprintf('%s.dynamic_complementarity_conditions', M_.fname), M_.params); - if options_.linear_approximation - lb = lb - steadystate_y; - ub = ub - steadystate_y; - end - options_.lmmcp.lb = repmat(lb,periods,1); - options_.lmmcp.ub = repmat(ub,periods,1); - end -elseif (options_.solve_algo == 11) - if ~isfield(options_.mcppath,'lb') - [lb, ub] = feval(sprintf('%s.dynamic_complementarity_conditions', M_.fname), M_.params); - if options_.linear_approximation - lb = lb - steadystate_y; - ub = ub - steadystate_y; - end - options_.mcppath.lb = repmat(lb,periods,1); - options_.mcppath.ub = repmat(ub,periods,1); - end -end if M_.maximum_lag > 0 y0 = endogenousvariables(:, M_.maximum_lag); -- GitLab