Merge branch 'tune_jscale' into 'master'
Fix faulty logic in checks for mh_tune_jscale Closes #46 See merge request Dynare/preprocessor!25issue#70
commit
f2f6097777
|
@ -1219,20 +1219,22 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options_list.num_options.find("mh_tune_jscale.target") != options_list.num_options.end()
|
if (auto it = options_list.num_options.find("mh_tune_jscale.status");
|
||||||
&& options_list.num_options.find("mh_jscale") != options_list.num_options.end())
|
it != options_list.num_options.end() && it->second == "true")
|
||||||
{
|
{
|
||||||
cerr << "ERROR: The mh_tune_jscale and mh_jscale options of the estimation statement are incompatible." << endl;
|
if (options_list.num_options.find("mh_jscale") != options_list.num_options.end())
|
||||||
exit(EXIT_FAILURE);
|
{
|
||||||
|
cerr << "ERROR: The mh_tune_jscale and mh_jscale options of the estimation statement are incompatible." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if (options_list.num_options.find("mh_tune_jscale.guess") != options_list.num_options.end())
|
||||||
if (options_list.num_options.find("mh_tune_jscale.guess") != options_list.num_options.end()
|
|
||||||
&& options_list.num_options.find("mh_tune_jscale.target") == options_list.num_options.end())
|
|
||||||
{
|
{
|
||||||
cerr << "ERROR: The option mh_tune_guess in estimation statement cannot be used without option mh_tune_jscale." << endl;
|
cerr << "ERROR: The option mh_tune_guess in estimation statement cannot be used without option mh_tune_jscale." << endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Check that we are not trying to estimate a parameter appearing in the
|
/* Check that we are not trying to estimate a parameter appearing in the
|
||||||
planner discount factor (see dynare#1173) */
|
planner discount factor (see dynare#1173) */
|
||||||
vector<int> estimated_params_in_planner_discount;
|
vector<int> estimated_params_in_planner_discount;
|
||||||
|
|
Loading…
Reference in New Issue