Commit f2ea2925 authored by sebastien's avatar sebastien
Browse files

M-files and preprocessor:

* removed "options_.simul", and instead test if "options_.periods" is non-zero
* test for the incompatibility of options "periods" and "hp_filter" in "stoch_simul.m", instead of in the preprocessor
Reference manual:
* removed "simul" options, updated "periods"
* updated "order" option (for 3rd order)
* added "k_order_solver" option
* give some hints for installing a compiler for users of MATLAB for Windows


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3188 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 9780bc17
......@@ -118,14 +118,6 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct)
it = options_list.num_options.find("partial_information");
if (it != options_list.num_options.end() && it->second == "1")
mod_file_struct.partial_information = true;
// This (temporary) check is present in stoch_simul, osr and ramsey_policy
if (options_list.num_options.find("simul") != options_list.num_options.end()
&& options_list.num_options.find("hp_filter") != options_list.num_options.end())
{
cerr << "ERROR: stoch_simul: HP filter is not yet implemented when computing empirical simulations" << endl;
exit(EXIT_FAILURE);
}
}
void
......@@ -182,14 +174,6 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct)
it = options_list.num_options.find("partial_information");
if (it != options_list.num_options.end() && it->second == "1")
mod_file_struct.partial_information = true;
// This (temporary) check is present in stoch_simul, osr and ramsey_policy
if (options_list.num_options.find("simul") != options_list.num_options.end()
&& options_list.num_options.find("hp_filter") != options_list.num_options.end())
{
cerr << "ERROR: ramsey_policy: HP filter is not yet implemented when computing empirical simulations" << endl;
exit(EXIT_FAILURE);
}
}
void
......@@ -316,7 +300,6 @@ void
PeriodsStatement::writeOutput(ostream &output, const string &basename) const
{
output << "options_.periods = " << periods << ";" << endl;
output << "options_.simul = 1;" << endl;
}
DsampleStatement::DsampleStatement(int val1_arg) : val1(val1_arg), val2(-1)
......@@ -747,14 +730,6 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct)
it = options_list.num_options.find("partial_information");
if (it != options_list.num_options.end() && it->second == "1")
mod_file_struct.partial_information = true;
// This (temporary) check is present in stoch_simul, osr and ramsey_policy
if (options_list.num_options.find("simul") != options_list.num_options.end()
&& options_list.num_options.find("hp_filter") != options_list.num_options.end())
{
cerr << "ERROR: osr: HP filter is not yet implemented when computing empirical simulations" << endl;
exit(EXIT_FAILURE);
}
}
void
......
......@@ -1655,13 +1655,12 @@ o_nomoments : NOMOMENTS { driver.option_num("nomoments", "1"); };
o_irf : IRF EQUAL INT_NUMBER { driver.option_num("irf", $3); };
o_hp_filter : HP_FILTER EQUAL INT_NUMBER { driver.option_num("hp_filter", $3); };
o_hp_ngrid : HP_NGRID EQUAL INT_NUMBER { driver.option_num("hp_ngrid", $3); };
o_periods : PERIODS EQUAL INT_NUMBER
{ driver.option_num("periods", $3); driver.option_num("simul", "1"); };
o_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("periods", $3); };
o_cutoff : CUTOFF EQUAL number { driver.cutoff($3); }
o_markowitz : MARKOWITZ EQUAL number { driver.option_num("markowitz", $3); };
o_minimal_solving_periods : MINIMAL_SOLVING_PERIODS EQUAL number { driver.option_num("minimal_solving_periods", $3); };
o_mfs : MFS EQUAL INT_NUMBER { driver.mfs($3); };
o_simul : SIMUL { driver.option_num("simul", "1"); };
o_simul : SIMUL; // Do nothing, only here for backward compatibility
o_simul_seed : SIMUL_SEED EQUAL INT_NUMBER { driver.option_num("simul_seed", $3); } ;
o_qz_criterium : QZ_CRITERIUM EQUAL number { driver.option_num("qz_criterium", $3); };
o_datafile : DATAFILE EQUAL filename { driver.option_str("datafile", $3); };
......
......@@ -648,9 +648,7 @@ ParsingDriver::option_num(const string &name_option, string *opt)
void
ParsingDriver::option_num(const string &name_option, const string &opt)
{
// Since "periods" option automatically sets "simul" option, we don't want to fail if user explicitly sets both "simul" and "periods"
if (name_option != "simul"
&& (options_list.num_options.find(name_option) != options_list.num_options.end()))
if (options_list.num_options.find(name_option) != options_list.num_options.end())
error("option " + name_option + " declared twice");
if ((name_option == "periods") && mod_file->block)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment