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
3eff2b91
Verified
Commit
3eff2b91
authored
Nov 15, 2018
by
Houtan Bastani
Browse files
rename ds variable in epilogue to a longer name
parent
a8c7fb69
Pipeline
#330
passed with stage
in 1 minute and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ModelEquationBlock.cc
View file @
3eff2b91
...
...
@@ -367,20 +367,20 @@ Epilogue::writeEpilogueFile(const string &basename) const
}
ExprNodeOutputType
output_type
=
ExprNodeOutputType
::
epilogueFile
;
output
<<
"function
ds
= epilogue(params,
ds
)"
<<
endl
<<
"% function
ds
= epilogue(params,
ds
)"
<<
endl
output
<<
"function
epilogue_dseries__
= epilogue(params,
epilogue_dseries__
)"
<<
endl
<<
"% function
epilogue_dseries__
= epilogue(params,
epilogue_dseries__
)"
<<
endl
<<
"% Epilogue file generated by Dynare preprocessor"
<<
endl
<<
endl
<<
"
epilogue_ds_first_date__ = ds.firstdate;
"
<<
endl
<<
"epilogue_loop_begin_idx__ = lastdate(
ds) - ds
.lastobservedperiod;"
<<
endl
<<
"epilogue_loop_end_idx__ = lastdate(
ds) - firstdate(ds
) + 1;"
<<
endl
<<
endl
;
<<
"
% loop range variables
"
<<
endl
<<
"epilogue_loop_begin_idx__ = lastdate(
epilogue_dseries__) - epilogue_dseries__
.lastobservedperiod;"
<<
endl
<<
"epilogue_loop_end_idx__ = lastdate(
epilogue_dseries__) - firstdate(epilogue_dseries__
) + 1;"
<<
endl
<<
endl
;
output
<<
"% endogenous"
<<
endl
;
for
(
auto
symb_id
:
endogs
)
output
<<
symbol_table
.
getName
(
symb_id
)
<<
" =
ds
."
<<
symbol_table
.
getName
(
symb_id
)
<<
".data;"
<<
endl
;
output
<<
symbol_table
.
getName
(
symb_id
)
<<
" =
epilogue_dseries__
."
<<
symbol_table
.
getName
(
symb_id
)
<<
".data;"
<<
endl
;
output
<<
endl
<<
"% exogenous"
<<
endl
;
for
(
auto
symb_id
:
exogs
)
output
<<
symbol_table
.
getName
(
symb_id
)
<<
" =
ds
."
<<
symbol_table
.
getName
(
symb_id
)
<<
".data;"
<<
endl
;
output
<<
symbol_table
.
getName
(
symb_id
)
<<
" =
epilogue_dseries__
."
<<
symbol_table
.
getName
(
symb_id
)
<<
".data;"
<<
endl
;
output
<<
endl
<<
"for epilogue_it__ = epilogue_loop_begin_idx__:epilogue_loop_end_idx__"
<<
endl
;
...
...
@@ -404,8 +404,8 @@ Epilogue::writeEpilogueFile(const string &basename) const
}
output
<<
"end"
<<
endl
<<
endl
;
for
(
auto
symb_id
:
endogs
)
output
<<
"
ds
."
<<
symbol_table
.
getName
(
symb_id
)
<<
" = dseries("
<<
symbol_table
.
getName
(
symb_id
)
<<
", epilogue_ds
_
first
_
date
__
);"
<<
endl
;
output
<<
"
epilogue_dseries__
."
<<
symbol_table
.
getName
(
symb_id
)
<<
" = dseries("
<<
symbol_table
.
getName
(
symb_id
)
<<
", epilogue_ds
eries__.
firstdate);"
<<
endl
;
output
<<
endl
<<
"end"
<<
endl
;
output
.
close
();
...
...
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