Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
preprocessor
Commits
18ae7894
Commit
18ae7894
authored
Jul 15, 2014
by
Sébastien Villemot
Browse files
Better error message when block option when a variable does not appear at current period.
parent
3c548d6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ModelTree.cc
View file @
18ae7894
...
...
@@ -207,8 +207,17 @@ ModelTree::computeNonSingularNormalization(jacob_map_t &contemporaneous_jacobian
dynamic_jacobian
[
make_pair
(
0
,
make_pair
(
it
->
first
.
first
,
it
->
first
.
second
))]
=
0
;
if
(
contemporaneous_jacobian
.
find
(
make_pair
(
it
->
first
.
first
,
it
->
first
.
second
))
==
contemporaneous_jacobian
.
end
())
contemporaneous_jacobian
[
make_pair
(
it
->
first
.
first
,
it
->
first
.
second
)]
=
0
;
if
(
first_derivatives
.
find
(
make_pair
(
it
->
first
.
first
,
getDerivID
(
symbol_table
.
getID
(
eEndogenous
,
it
->
first
.
second
),
0
)))
==
first_derivatives
.
end
())
first_derivatives
[
make_pair
(
it
->
first
.
first
,
getDerivID
(
symbol_table
.
getID
(
eEndogenous
,
it
->
first
.
second
),
0
))]
=
Zero
;
try
{
if
(
first_derivatives
.
find
(
make_pair
(
it
->
first
.
first
,
getDerivID
(
symbol_table
.
getID
(
eEndogenous
,
it
->
first
.
second
),
0
)))
==
first_derivatives
.
end
())
first_derivatives
[
make_pair
(
it
->
first
.
first
,
getDerivID
(
symbol_table
.
getID
(
eEndogenous
,
it
->
first
.
second
),
0
))]
=
Zero
;
}
catch
(
DataTree
::
UnknownDerivIDException
&
e
)
{
cerr
<<
"The variable "
<<
symbol_table
.
getName
(
symbol_table
.
getID
(
eEndogenous
,
it
->
first
.
second
))
<<
" does not appear at the current period (i.e. with no lead and no lag); this case is not handled by the 'block' option of the 'model' block."
<<
endl
;
exit
(
EXIT_FAILURE
);
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment