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
c470e028
Commit
c470e028
authored
8 years ago
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Ramsey: add check for complex numbers in conditional steady state
parent
01f1abb1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/evaluate_steady_state.m
+15
-0
15 additions, 0 deletions
matlab/evaluate_steady_state.m
with
15 additions
and
0 deletions
matlab/evaluate_steady_state.m
+
15
−
0
View file @
c470e028
...
@@ -93,6 +93,21 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta
...
@@ -93,6 +93,21 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta
info
(
2
)
=
resids
'*
resids
;
info
(
2
)
=
resids
'*
resids
;
return
;
return
;
end
end
if
any
(
imag
(
ys
(
n_multipliers
+
1
:
end
)))
fprintf
(
'\nevaluate_steady_state: The steady state file computation for the Ramsey problem resulted in complex numbers.\n'
)
fprintf
(
'evaluate_steady_state: The steady state was computed conditional on the following initial instrument values: \n'
)
for
ii
=
1
:
size
(
options
.
instruments
,
1
);
fprintf
(
'\t %s \t %f \n'
,
options
.
instruments
(
ii
,:),
ys_init
(
strmatch
(
options
.
instruments
(
ii
,:),
M
.
endo_names
,
'exact'
)))
end
fprintf
(
'evaluate_steady_state: If those initial values are not admissable, change them using an initval-block.\n'
)
skipline
(
2
);
check
=
1
;
info
(
1
)
=
86
;
info
(
2
)
=
resids
'*
resids
;
return
;
end
if
max
(
abs
(
resids
(
n_multipliers
+
1
:
end
)))
>
options
.
solve_tolf
%does it solve for all variables except for the Lagrange multipliers
if
max
(
abs
(
resids
(
n_multipliers
+
1
:
end
)))
>
options
.
solve_tolf
%does it solve for all variables except for the Lagrange multipliers
fprintf
(
'\nevaluate_steady_state: The steady state file does not solve the steady state for the Ramsey problem.\n'
)
fprintf
(
'\nevaluate_steady_state: The steady state file does not solve the steady state for the Ramsey problem.\n'
)
fprintf
(
'evaluate_steady_state: Conditional on the following instrument values: \n'
)
fprintf
(
'evaluate_steady_state: Conditional on the following instrument values: \n'
)
...
...
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