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
Dóra Kocsis
dynare
Commits
551db4a4
Commit
551db4a4
authored
Feb 04, 2011
by
Sébastien Villemot
Browse files
Workaround for ticket #157
parent
e95defd1
Changes
5
Hide whitespace changes
Inline
Side-by-side
preprocessor/ComputingTasks.cc
View file @
551db4a4
...
...
@@ -135,6 +135,15 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct)
cerr
<<
"ERROR: in 'stoch_simul', you cannot use option 'pruning' with 'k_order_solver' option or with 3rd order approximation"
<<
endl
;
exit
(
EXIT_FAILURE
);
}
// Workaround for ticket #157
it
=
options_list
.
num_options
.
find
(
"periods"
);
if
(
it
!=
options_list
.
num_options
.
end
()
&&
atoi
(
it
->
second
.
c_str
())
>
0
&&
mod_file_struct
.
histval_present
)
{
cerr
<<
"ERROR: the 'periods' option of 'stoch_simul' is not compatible with a 'histval' block"
<<
endl
;
exit
(
EXIT_FAILURE
);
}
}
void
...
...
preprocessor/NumericalInitialization.cc
View file @
551db4a4
...
...
@@ -177,6 +177,12 @@ HistValStatement::HistValStatement(const hist_values_t &hist_values_arg,
{
}
void
HistValStatement
::
checkPass
(
ModFileStructure
&
mod_file_struct
)
{
mod_file_struct
.
histval_present
=
true
;
}
void
HistValStatement
::
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
{
...
...
preprocessor/NumericalInitialization.hh
View file @
551db4a4
/*
* Copyright (C) 2003-201
0
Dynare Team
* Copyright (C) 2003-201
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -100,6 +100,8 @@ private:
public:
HistValStatement
(
const
hist_values_t
&
hist_values_arg
,
const
SymbolTable
&
symbol_table_arg
);
//! Workaround for trac ticket #157
virtual
void
checkPass
(
ModFileStructure
&
mod_file_struct
);
virtual
void
writeOutput
(
ostream
&
output
,
const
string
&
basename
)
const
;
};
...
...
preprocessor/Statement.cc
View file @
551db4a4
/*
* Copyright (C) 2006-201
0
Dynare Team
* Copyright (C) 2006-201
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -33,6 +33,7 @@ ModFileStructure::ModFileStructure() :
identification_present
(
false
),
partial_information
(
false
),
shocks_present
(
false
),
histval_present
(
false
),
k_order_solver
(
false
),
calibrated_measurement_errors
(
false
),
dsge_prior_weight_in_estimated_params
(
false
),
...
...
preprocessor/Statement.hh
View file @
551db4a4
/*
* Copyright (C) 2006-201
0
Dynare Team
* Copyright (C) 2006-201
1
Dynare Team
*
* This file is part of Dynare.
*
...
...
@@ -61,6 +61,9 @@ public:
//! Whether a shocks or mshocks block is present
/*! Used for the workaround for trac ticket #35 */
bool
shocks_present
;
//! Whether a histval bloc is present
/*! Used for the workaround for trac ticket #157 */
bool
histval_present
;
//! Whether the "k_order_solver" option is used (explictly, or implicitly if order >= 3)
bool
k_order_solver
;
//! Whether there is a calibrated measurement error
...
...
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