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
dea58be5
Commit
dea58be5
authored
Feb 17, 2014
by
Sébastien Villemot
Browse files
Fix size of M_.endo_histval.
Should fix crashes on models with leads/lags of more than one on exogenous. Closes #617
parent
58d71bb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
NumericalInitialization.cc
View file @
dea58be5
/*
* Copyright (C) 2003-201
3
Dynare Team
* Copyright (C) 2003-201
4
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -269,7 +269,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
output
<<
"%"
<<
endl
<<
"% HISTVAL instructions"
<<
endl
<<
"%"
<<
endl
<<
"M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_lag);"
<<
endl
;
<<
"M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_
endo_
lag);"
<<
endl
;
for
(
hist_values_t
::
const_iterator
it
=
hist_values
.
begin
();
it
!=
hist_values
.
end
();
it
++
)
...
...
@@ -305,7 +305,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
int
tsid
=
symbol_table
.
getTypeSpecificID
(
symb_id
)
+
1
;
if
(
type
==
eEndogenous
)
output
<<
"M_.endo_histval( "
<<
tsid
<<
", M_.maximum_lag + "
<<
lag
<<
") = "
;
output
<<
"M_.endo_histval( "
<<
tsid
<<
", M_.maximum_
endo_
lag + "
<<
lag
<<
") = "
;
else
if
(
type
==
eExogenous
)
output
<<
"oo_.exo_simul( M_.maximum_lag + "
<<
lag
<<
", "
<<
tsid
<<
" ) = "
;
else
if
(
type
!=
eExogenousDet
)
...
...
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