Commit 263e97da authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'check_model' into 'master'

check_model.m: fix logic of check for non-contemporaneous variables and remove redundant checks

Closes #1792

See merge request Dynare/dynare!1885
parents 41814bec 3d5601ca
...@@ -17,19 +17,8 @@ function check_model(DynareModel) ...@@ -17,19 +17,8 @@ function check_model(DynareModel)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <>. % along with Dynare. If not, see <>.
xlen = DynareModel.maximum_exo_lag+DynareModel.maximum_exo_lead + 1; if ~all(DynareModel.lead_lag_incidence(DynareModel.maximum_lag+1,:) > 0)
if ~ DynareModel.lead_lag_incidence(DynareModel.maximum_lag+1,:) > 0 warning('Problem in the model specification: some variables don''t appear as current. Check whether this is desired.');
error ('RESOL: Error in model specification: some variables don"t appear as current') ;
if xlen > 1
error (['RESOL: stochastic exogenous variables must appear only at the' ...
' current period. Use additional endogenous variables']) ;
if (DynareModel.exo_det_nbr > 0) && (DynareModel.maximum_lag > 1 || DynareModel.maximum_lead > 1)
error(['Exogenous deterministic variables are currently only allowed in' ...
' models with leads and lags on only one period'])
end end
if ~check_consistency_covariances(DynareModel.Sigma_e) if ~check_consistency_covariances(DynareModel.Sigma_e)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment