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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
048e059b
Commit
048e059b
authored
3 years ago
by
Johannes Pfeifer
Browse files
Options
Downloads
Patches
Plain Diff
evaluate_planner_objective.m: add warning if NaN are encountered
parent
e8fd1f53
No related branches found
No related tags found
1 merge request
!1949
evaluate_planner_objective.m: suppress output
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/evaluate_planner_objective.m
+7
-0
7 additions, 0 deletions
matlab/evaluate_planner_objective.m
with
7 additions
and
0 deletions
matlab/evaluate_planner_objective.m
+
7
−
0
View file @
048e059b
...
...
@@ -168,6 +168,13 @@ if options_.ramsey_policy
options_
.
noprint
=
0
;
end
if
any
(
isnan
(
oo_
.
mean
))
||
any
(
isnan
(
oo_
.
mean
))
fprintf
(
'evaluate_planner_objective: encountered NaN moments in the endogenous variables often associated\n'
)
fprintf
(
'evaluate_planner_objective: with either non-stationary variables or singularity due e.g. including\n'
)
fprintf
(
'evaluate_planner_objective: the planner objective function (or additive parts of it) in the model.\n'
)
fprintf
(
'evaluate_planner_objective: I will replace the NaN with a large number, but tread carefully,\n'
)
fprintf
(
'evaluate_planner_objective: check your model, and watch out for strange results.\n'
)
end
oo_
.
mean
(
isnan
(
oo_
.
mean
))
=
options_
.
huge_number
;
oo_
.
var
(
isnan
(
oo_
.
var
))
=
options_
.
huge_number
;
...
...
This diff is collapsed.
Click to expand it.
Johannes Pfeifer
@JohannesPfeifer
mentioned in commit
97e23ff8
·
3 years ago
mentioned in commit
97e23ff8
mentioned in commit 97e23ff8d77645836226b31b0ed73e7d852e738a
Toggle commit list
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