diff --git a/matlab/perfect-foresight-models/private/initialize_stacked_problem.m b/matlab/perfect-foresight-models/private/initialize_stacked_problem.m
index ad2374a4c..b56fec828 100644
--- a/matlab/perfect-foresight-models/private/initialize_stacked_problem.m
+++ b/matlab/perfect-foresight-models/private/initialize_stacked_problem.m
@@ -1,4 +1,5 @@
-function [options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, dynamicmodel] = initialize_stack_solve_algo_7(endogenousvariables, options, M)
+function [options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, ...
+ dynamicmodel] = initialize_stack_solve_algo_7(endogenousvariables, options, M, steadystate_y)
% Copyright (C) 2015 Dynare Team
%
@@ -21,12 +22,20 @@ periods = options.periods;
if (options.solve_algo == 10)
if ~isfield(options.lmmcp,'lb')
[lb,ub,pfm.eq_index] = get_complementarity_conditions(M,options.ramsey_policy);
+ 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,pfm.eq_index] = get_complementarity_conditions(M,options.ramsey_policy);
+ 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
diff --git a/matlab/perfect-foresight-models/solve_stacked_linear_problem.m b/matlab/perfect-foresight-models/solve_stacked_linear_problem.m
index fba7478dd..52a2efe48 100644
--- a/matlab/perfect-foresight-models/solve_stacked_linear_problem.m
+++ b/matlab/perfect-foresight-models/solve_stacked_linear_problem.m
@@ -18,7 +18,7 @@ function [endogenousvariables, info] = solve_stacked_linear_problem(endogenousva
% along with Dynare. If not, see .
[options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, dynamicmodel] = ...
- initialize_stacked_problem(endogenousvariables, options, M);
+ initialize_stacked_problem(endogenousvariables, options, M, steadystate_y);
ip = find(M.lead_lag_incidence(1,:)');
ic = find(M.lead_lag_incidence(2,:)');
diff --git a/matlab/perfect-foresight-models/solve_stacked_problem.m b/matlab/perfect-foresight-models/solve_stacked_problem.m
index 7b340138c..3211fbfb1 100644
--- a/matlab/perfect-foresight-models/solve_stacked_problem.m
+++ b/matlab/perfect-foresight-models/solve_stacked_problem.m
@@ -18,7 +18,7 @@ function [endogenousvariables, info] = solve_stacked_problem(endogenousvariables
% along with Dynare. If not, see .
[options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, dynamicmodel] = ...
- initialize_stacked_problem(endogenousvariables, options, M);
+ initialize_stacked_problem(endogenousvariables, options, M, steadystate);
[y, check] = dynare_solve(@perfect_foresight_problem,z(:),options, ...
dynamicmodel, y0, yT, ...