Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dynare
preprocessor
Commits
d973c2ea
Commit
d973c2ea
authored
Oct 11, 2010
by
Sébastien Villemot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preprocessor: give more explicit error message when lead or lag is used inside 'planner_objective'
parent
3218d3c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
ParsingDriver.cc
ParsingDriver.cc
+3
-0
No files found.
ParsingDriver.cc
View file @
d973c2ea
...
...
@@ -235,6 +235,9 @@ ParsingDriver::add_model_variable(int symb_id, int lag)
if
(
type
==
eModelLocalVariable
&&
lag
!=
0
)
error
(
"Model local variable "
+
mod_file
->
symbol_table
.
getName
(
symb_id
)
+
" cannot be given a lead or a lag."
);
if
(
dynamic_cast
<
StaticModel
*>
(
model_tree
)
!=
NULL
&&
lag
!=
0
)
error
(
"Leads and lags on variables are forbidden in 'planner_objective'."
);
// It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped
return
model_tree
->
AddVariable
(
symb_id
,
lag
);
}
...
...
Write
Preview
Markdown
is supported
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