Skip to content
GitLab
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
ea76bc86
Verified
Commit
ea76bc86
authored
Dec 19, 2018
by
Houtan Bastani
Browse files
epilogue: use different syntax for firstobservedperiod call
parent
1393bf1d
Pipeline
#506
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 @
ea76bc86
...
...
@@ -372,12 +372,15 @@ Epilogue::writeEpilogueFile(const string &basename) const
it
.
second
->
collectVariables
(
SymbolType
::
endogenous
,
used_symbols
);
it
.
second
->
collectVariables
(
SymbolType
::
exogenous
,
used_symbols
);
it
.
second
->
collectVariables
(
SymbolType
::
epilogue
,
used_symbols
);
output
<<
"simul_begin_date = dseries__."
<<
symbol_table
.
getName
(
*
(
used_symbols
.
begin
()))
<<
".firstobservedperiod;"
<<
endl
;
for
(
auto
it1
=
next
(
used_symbols
.
begin
());
it1
!=
used_symbols
.
end
();
it1
++
)
output
<<
"if simul_begin_date < dseries__."
<<
symbol_table
.
getName
(
*
it1
)
<<
".firstobservedperiod"
<<
endl
<<
" simul_begin_date = dseries__."
<<
symbol_table
.
getName
(
*
it1
)
<<
".firstobservedperiod;"
<<
endl
<<
"end"
<<
endl
;
output
<<
"simul_begin_date = simul_begin_date + "
<<
max_lag
<<
" + 1;"
<<
endl
output
<<
"simul_begin_date = firstobservedperiod(dseries__{"
;
for
(
auto
it1
=
used_symbols
.
begin
();
it1
!=
used_symbols
.
end
();
it1
++
)
{
if
(
it1
!=
used_symbols
.
begin
())
output
<<
", "
;
output
<<
"'"
<<
symbol_table
.
getName
(
*
it1
)
<<
"'"
;
}
output
<<
"}) + "
<<
max_lag
<<
" + 1;"
<<
endl
<<
"if ~dseries__.exist('"
<<
symbol_table
.
getName
(
it
.
first
)
<<
"')"
<<
endl
<<
" dseries__ = [dseries__ dseries(NaN(dseries__.nobs,1), dseries__.firstdate, '"
<<
symbol_table
.
getName
(
it
.
first
)
<<
"')];"
<<
endl
<<
"end"
<<
endl
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment