Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Adjemian
dynare
Commits
83bc67f0
Commit
83bc67f0
authored
8 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Display informative message when the model cannot be solved at the prior mode.
parent
acd8a4e7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/cli/prior.m
+6
-0
6 additions, 0 deletions
matlab/cli/prior.m
matlab/interpret_resol_info.m
+60
-0
60 additions, 0 deletions
matlab/interpret_resol_info.m
with
66 additions
and
0 deletions
matlab/cli/prior.m
+
6
−
0
View file @
83bc67f0
...
...
@@ -128,6 +128,12 @@ if ismember('moments', varargin) % Prior simulations (2nd order moments).
oo__
.
dr
=
set_state_space
(
oo__
.
dr
,
Model
,
options_
);
% Solve model
[
dr
,
info
,
Model
,
options__
,
oo__
]
=
resol
(
0
,
Model
,
options_
,
oo__
);
if
info
skipline
()
disp
(
sprintf
(
'Cannot solve the model on the prior mode (info = %s, %s)'
,
num2str
(
info
(
1
)),
interpret_resol_info
(
info
)));
skipline
()
return
end
% Compute and display second order moments
oo__
=
disp_th_moments
(
oo__
.
dr
,
[],
Model
,
options__
,
oo__
);
skipline
(
2
)
...
...
This diff is collapsed.
Click to expand it.
matlab/interpret_resol_info.m
0 → 100644
+
60
−
0
View file @
83bc67f0
function
message
=
interpret_resol_info
(
info
)
% Returns a message describing problem encountered during the resolution of
% a model.
%
% INPUTS
% - info [struct] Second output argument return by the resol routine
%
% OUTPUTS
% - message [string] Description of the issue preventing model's resolution.
% Copyright (C) 2001-2016 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
switch
info
(
1
)
case
0
message
=
''
;
case
1
message
=
'The model doesn
''
t determine the current variable uniquely.'
;
case
2
message
=
'MJDGGES (Generalized Schur decomposition) returned an error code.'
;
case
3
message
=
'Blanchard & Kahn conditions are not satisfied: no stable equilibrium.'
;
case
4
message
=
'Blanchard & Kahn conditions are not satisfied: indeterminacy.'
;
case
5
message
=
'Blanchard & Kahn conditions are not satisfied: indeterminacy due to rank failure.'
;
case
6
message
=
'The jacobian evaluated at the deterministic steady state is complex.'
;
case
19
message
=
'The steadystate routine thrown an exception (inconsistent deep parameters).'
;
case
20
message
=
sprintf
(
'Cannot find the steady state (the sum of square residuals of the static equations is %s)'
,
num2str
(
info
(
2
)));
case
21
message
=
sprintf
(
'The steady state is complex (the sum of square residuals of imaginary parts of the steady state is %s)'
,
num2str
(
info
(
2
)));
case
22
message
=
'The steady state has NaNs.'
;
case
23
message
=
'Parameters have been updated in the steadystate routine and some have complex values.'
;
case
24
message
=
'Parameters have been updated in the steadystate routine and some are NaNs.'
;
case
30
message
=
'Ergodic variance can
''
t be computed.'
;
otherwise
message
=
'Unknown issue!'
;
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment