Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
preprocessor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
preprocessor
Commits
8b86760b
Commit
8b86760b
authored
13 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Store histval information for endogenous in M_.endo_histval
Really closes: #157
parent
8d369bd7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
NumericalInitialization.cc
+3
-4
3 additions, 4 deletions
NumericalInitialization.cc
NumericalInitialization.hh
+1
-1
1 addition, 1 deletion
NumericalInitialization.hh
with
4 additions
and
5 deletions
NumericalInitialization.cc
+
3
−
4
View file @
8b86760b
...
@@ -132,8 +132,7 @@ InitValStatement::writeOutput(ostream &output, const string &basename) const
...
@@ -132,8 +132,7 @@ InitValStatement::writeOutput(ostream &output, const string &basename) const
void
void
InitValStatement
::
writeOutputPostInit
(
ostream
&
output
)
const
InitValStatement
::
writeOutputPostInit
(
ostream
&
output
)
const
{
{
output
<<
"oo_.endo_simul=[oo_.steady_state*ones(1,M_.maximum_lag)];"
<<
endl
output
<<
"if M_.exo_nbr > 0;"
<<
endl
<<
"if M_.exo_nbr > 0;"
<<
endl
<<
"
\t
oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];"
<<
endl
<<
"
\t
oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];"
<<
endl
<<
"end;"
<<
endl
<<
"end;"
<<
endl
<<
"if M_.exo_det_nbr > 0;"
<<
endl
<<
"if M_.exo_det_nbr > 0;"
<<
endl
...
@@ -189,7 +188,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
...
@@ -189,7 +188,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
output
<<
"%"
<<
endl
output
<<
"%"
<<
endl
<<
"% HISTVAL instructions"
<<
endl
<<
"% HISTVAL instructions"
<<
endl
<<
"%"
<<
endl
<<
"%"
<<
endl
<<
"
oo
_.endo_
simu
l = zeros(M_.endo_nbr,M_.maximum_lag);"
<<
endl
;
<<
"
M
_.endo_
histva
l = zeros(M_.endo_nbr,M_.maximum_lag);"
<<
endl
;
for
(
hist_values_t
::
const_iterator
it
=
hist_values
.
begin
();
for
(
hist_values_t
::
const_iterator
it
=
hist_values
.
begin
();
it
!=
hist_values
.
end
();
it
++
)
it
!=
hist_values
.
end
();
it
++
)
...
@@ -225,7 +224,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
...
@@ -225,7 +224,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const
int
tsid
=
symbol_table
.
getTypeSpecificID
(
symb_id
)
+
1
;
int
tsid
=
symbol_table
.
getTypeSpecificID
(
symb_id
)
+
1
;
if
(
type
==
eEndogenous
)
if
(
type
==
eEndogenous
)
output
<<
"
oo
_.endo_
simu
l( "
<<
tsid
<<
", M_.maximum_lag + "
<<
lag
<<
") = "
;
output
<<
"
M
_.endo_
histva
l( "
<<
tsid
<<
", M_.maximum_lag + "
<<
lag
<<
") = "
;
else
if
(
type
==
eExogenous
)
else
if
(
type
==
eExogenous
)
output
<<
"oo_.exo_simul( M_.maximum_lag + "
<<
lag
<<
", "
<<
tsid
<<
" ) = "
;
output
<<
"oo_.exo_simul( M_.maximum_lag + "
<<
lag
<<
", "
<<
tsid
<<
" ) = "
;
else
if
(
type
!=
eExogenousDet
)
else
if
(
type
!=
eExogenousDet
)
...
...
This diff is collapsed.
Click to expand it.
NumericalInitialization.hh
+
1
−
1
View file @
8b86760b
...
@@ -71,7 +71,7 @@ public:
...
@@ -71,7 +71,7 @@ public:
InitValStatement
(
const
init_values_t
&
init_values_arg
,
InitValStatement
(
const
init_values_t
&
init_values_arg
,
const
SymbolTable
&
symbol_table_arg
);
const
SymbolTable
&
symbol_table_arg
);
virtual
void
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
;
virtual
void
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
;
//! Writes initializations for
oo_.endo_simul,
oo_.exo_simul and oo_.exo_det_simul
//! Writes initializations for oo_.exo_simul and oo_.exo_det_simul
void
writeOutputPostInit
(
ostream
&
output
)
const
;
void
writeOutputPostInit
(
ostream
&
output
)
const
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment