From ec2817904328003660fd23678c0e511c6eac2ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 20 Apr 2021 16:53:54 +0200 Subject: [PATCH] Perfect foresight: add warning when lmmcp and linear option are used together --- .../perfect-foresight-models/perfect_foresight_solver_core.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab/perfect-foresight-models/perfect_foresight_solver_core.m b/matlab/perfect-foresight-models/perfect_foresight_solver_core.m index 8692300c0..3dac602f6 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_solver_core.m +++ b/matlab/perfect-foresight-models/perfect_foresight_solver_core.m @@ -11,7 +11,7 @@ function [oo_, maxerror] = perfect_foresight_solver_core(M_, options_, oo_) % - oo_ [struct] contains results % - maxerror [double] contains the maximum absolute error -% Copyright (C) 2015-2020 Dynare Team +% Copyright (C) 2015-2021 Dynare Team % % This file is part of Dynare. % @@ -102,6 +102,8 @@ else if isequal(options_.solve_algo, 10) if options_.ramsey_policy && isfield(M_,'ramsey_model_constraints') && ~isempty(M_.ramsey_model_constraints) warning('Due to ramsey_constraints you should not specify your model as model(linear)!') + elseif options_.lmmcp.status + warning('Due to lmmcp option, you should not specify your model as model(linear)!') else warning('It would be more efficient to set option solve_algo equal to 0!') end