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
bb67c635
Commit
bb67c635
authored
Mar 08, 2014
by
MichelJuillard
Browse files
adding ramsey_model to ParsingDriver
parent
46bcfea9
Changes
2
Hide whitespace changes
Inline
Side-by-side
ParsingDriver.cc
View file @
bb67c635
...
...
@@ -214,7 +214,7 @@ ParsingDriver::declare_optimal_policy_discount_factor_parameter(expr_t exprnode)
string
*
optimalParName_declare
=
new
string
(
"optimal_policy_discount_factor"
);
string
*
optimalParName_init
=
new
string
(
"optimal_policy_discount_factor"
);
if
(
mod_file
->
symbol_table
.
exists
(
*
optimalParName_declare
))
error
(
"Symbol optimal_policy_discount_factor is needed by Dynare when using a
n
ramsey_policy or a discretionary_policy statement"
);
error
(
"Symbol optimal_policy_discount_factor is needed by Dynare when using a
ramsey_model, a
ramsey_policy or a discretionary_policy statement"
);
declare_parameter
(
optimalParName_declare
,
NULL
);
init_param
(
optimalParName_init
,
exprnode
);
}
...
...
@@ -1775,6 +1775,16 @@ ParsingDriver::end_planner_objective(expr_t expr)
reset_data_tree
();
}
void
ParsingDriver
::
ramsey_model
()
{
if
(
!
mod_file
->
symbol_table
.
exists
(
"optimal_policy_discount_factor"
))
declare_optimal_policy_discount_factor_parameter
(
data_tree
->
One
);
mod_file
->
addStatement
(
new
RamseyModelStatement
(
symbol_list
,
options_list
));
symbol_list
.
clear
();
options_list
.
clear
();
}
void
ParsingDriver
::
ramsey_policy
()
{
...
...
ParsingDriver.hh
View file @
bb67c635
...
...
@@ -493,6 +493,8 @@ public:
void
begin_planner_objective
();
//! End a planner objective statement
void
end_planner_objective
(
expr_t
expr
);
//! Ramsey model statement
void
ramsey_model
();
//! Ramsey policy statement
void
ramsey_policy
();
//! Discretionary policy statement
...
...
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