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
97e23ff8
Verified
Commit
97e23ff8
authored
3 years ago
by
Johannes Pfeifer
Committed by
Sébastien Villemot
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
evaluate_planner_objective.m: add warning if NaN are encountered
(cherry picked from commit
048e059b
)
parent
c218be23
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#6182
failed
3 years ago
Stage: build
Stage: test
Stage: pkg
Changes
1
Pipelines
1
Hide 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 @
97e23ff8
...
...
@@ -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.
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