Perfect foresight: add warning when lmmcp and linear option are used together

time-shift
Sébastien Villemot 2021-04-20 16:53:54 +02:00
parent d6677f66a4
commit ec28179043
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 1 deletions

View File

@ -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